arXiv:2106.03764

On the Expressive Power of Self-Attention Matrices

Valerii Likhosherstov, Krzysztof Choromanski, Adrian Weller

제출 2021-06-07

원문 초록

Transformer networks are able to capture patterns in data coming from many domains (text, images, videos, proteins, etc.) with little or no change to architecture components. We perform a theoretical analysis of the core component responsible for signal propagation between elements, i.e. the self-attention matrix. In practice, this matrix typically exhibits two properties: (1) it is sparse, meaning that each token only attends to a small subset of other tokens; and (2) it changes dynamically depending on the input to the module. With these considerations in mind, we ask the following question: Can a fixed self-attention module approximate arbitrary sparse patterns depending on the input? How small is the hidden size $d$ required for such approximation? We make progress in answering this question and show that the self-attention matrix can provably approximate sparse matrices, where sparsity is in terms of a bounded number of nonzero elements in each row and column. While the parameters of self-attention are fixed, various sparse matrices can be approximated by only modifying the inputs. Our proof is based on the random projection technique and uses the seminal Johnson-Lindenstrauss lemma. Our proof is constructive, enabling us to propose an algorithm for finding adaptive inputs and fixed self-attention parameters in order to approximate a given matrix. In particular, we show that, in order to approximate any sparse matrix up to a given precision defined in terms of preserving matrix element ratios, $d$ grows only logarithmically with the sequence length $L$ (i.e. $d = O(\log L)$).

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

arXiv:2410.06665v4cs.LG공통 태그 LEMMA공식 코드 · Papers with Code

기약 표현의 관점에서 재조명한 다중 치환 등변성

Revisiting Multi-Permutation Equivariance through the Lens of Irreducible Representations

본 논문은 치환 및 관련 군(group)의 표현에 대한 등변(equivariant) 선형 레이어의 특성화를 탐구합니다. 매개변수 공유(parameter-sharing)를 통해 이러한 문제를 다루는 전통적인 접근법과 달리, 본 연구에서는 기약 표현(irreducible representation)과 슈어의 보조정리(Schur's lemma)에 기반한 대안적 방법론을 고려합니다. 이 방법론을 사용하여 DeepSets, 2-IGN 그래프 등변 네트워크, 딥 가중치 공간(DWS, Deep Weight Space) 네트워크와 같은 기존 모델에 대한 대안적 유도를 도출합니다. DWS 네트워크에 대한 유도는 기존 결과에 비해 훨씬 간단합니다. 나아가, 군의 화환곱(wreath product)에 대한 등변성이 요구되는 비정렬 대칭 집합으로 접근법을 확장합니다. 이전 연구들은 거의 모든 화환 등변 레이어가 샴(Siamese) 구조를 갖는 다소 제한적인 환경에서 이 문제를 다루었습니다. 이와 대조적으로, 본 논문에서는 이러한 경우의 레이어에 대한 완전한 특성화를 제시하며 일부 환경에서는 방대한 수의 추가적인 비-샴(non-Siamese) 레이어가 존재함을 보입니다. 또한 이러한 추가 비-샴 레이어가 그래프 이상치 탐지, 가중치 공간 정렬, 바세르슈타인 거리(Wasserstein distance) 학습과 같은 태스크에서 성능을 향상시킬 수 있음을 실증적으로 보여줍니다. 코드는 \href{https://github.com/yonatansverdlov/Irreducible-Representations-of-Deep-Weight-Spaces}{GitHub}에서 확인할 수 있습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.