paper-with-me

Papers

Fast Transformers with Clustered Attention

2020-07-09 · NeurIPS 2020 12 · Apoorv Vyas, Angelos Katharopoulos, François Fleuret

Transformers have been proven a successful model for a variety of tasks in sequence modeling. However, computing the attention matrix, which is their key component, has quadratic complexity with respect to the sequence length, thus making them prohibitively expensive for large sequences. To address this, we propose clustered attention, which instead of computing the attention for every query, groups queries into clusters and computes attention just for the centroids. To further improve this approximation, we use the computed clusters to identify the keys with the highest attention per query and compute the exact key/query dot products. This results in a model with linear complexity with respect to the sequence length for a fixed number of clusters. We evaluate our approach on two automatic speech recognition datasets and show that our model consistently outperforms vanilla transformers for a given computational budget. Finally, we demonstrate that our model can approximate arbitrarily complex attention distributions with a minimal number of clusters by approximating a pretrained BERT model on GLUE and SQuAD benchmarks with only 25 clusters and no loss in performance.

📄 PDF Abstract BibTeX arXiv:2007.04825

Code (1)

idiap/fast-transformers 공식 구현 pytorch

Tasks

Automatic Speech RecognitionAutomatic Speech Recognition (ASR)speech-recognitionSpeech Recognition

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Adam 설명 없음
Linear Warmup With Linear Decay Linear Warmup With Linear Decay is a learning rate schedule in which we increase the learning rate linearly for $n$ updates and then linearly decay afterwards.
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Multi-Head Attention 설명 없음
Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Residual Connection 설명 없음

Similar Papers 제목 키워드 기반

Clustering in pure-attention hardmax transformers and its role in sentiment analysis

2024-06-26 · Albert Alcalde, Giovanni Fantuzzi, Enrique Zuazua

Transformers are extremely successful machine learning models whose mathematical properties remain poorly understood. Here, we rigorously characterize the behavior of transformers with hardmax self-attention and normaliz…

Sentiment Analysis

Representation Alignment for Just Image Transformers is not Easier than You Think

2026-03-15 · Jaeyo Shin, Jiwook Kim, Hyunjung Shim arxiv

Representation Alignment (REPA) has emerged as a simple way to accelerate Diffusion Transformers training in latent space. At the same time, pixel-space diffusion transformers such as Just image Transformers (JiT) have a…

Clustering by Attention: Leveraging Prior Fitted Transformers for Data Partitioning

2025-07-27 · Ahmed Shokry, Ayman Khalafallah arxiv

Clustering is a core task in machine learning with wide-ranging applications in data mining and pattern recognition. However, its unsupervised nature makes it inherently challenging. Many existing clustering algorithms s…

Training-Induced Escape from Token Clustering in a Mean-Field Formulation of Transformers

2026-05-08 · Noboru Isobe, Daisuke Inoue, Masaaki Imaizumi arxiv

Transformers perform inference by iteratively transforming token representations across layers. This layerwise computation has been studied empirically, and recent mean-field theories of Transformer dynamics explain how …

ClusTR: Exploring Efficient Self-attention via Clustering for Vision Transformers

2022-08-28 · Yutong Xie, Jianpeng Zhang, Yong Xia, Anton Van Den Hengel 외

Although Transformers have successfully transitioned from their language modelling origins to image-based applications, their quadratic computational complexity remains a challenge, particularly for dense prediction. In …

ClusteringDiversityLanguage Modelling