paper-with-me

홈 › Papers

Linear Complexity Randomized Self-attention Mechanism

2022-04-10 · Lin Zheng, Chong Wang, Lingpeng Kong

Recently, random feature attentions (RFAs) are proposed to approximate the softmax attention in linear time and space complexity by linearizing the exponential kernel. In this paper, we first propose a novel perspective to understand the bias in such approximation by recasting RFAs as self-normalized importance samplers. This perspective further sheds light on an \emph{unbiased} estimator for the whole softmax attention, called randomized attention (RA). RA constructs positive random features via query-specific distributions and enjoys greatly improved approximation fidelity, albeit exhibiting quadratic complexity. By combining the expressiveness in RA and the efficiency in RFA, we develop a novel linear complexity self-attention mechanism called linear randomized attention (LARA). Extensive experiments across various domains demonstrate that RA and LARA significantly improve the performance of RFAs by a substantial margin.

📄 PDF Abstract BibTeX arXiv:2204.04667

Code (1)

hkunlp/efficient-attention pytorch

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Linformer: Self-Attention with Linear Complexity

2020-06-08 · Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang 외

Large transformer models have shown extraordinary success in achieving state-of-the-art results in many natural language processing applications. However, training and deploying these models can be prohibitively costly f…

Language Modelling

Revisiting Linformer with a modified self-attention with linear complexity

2020-12-16 · Madhusudan Verma

Although Transformer models such as Google's BERT and OpenAI's GPT-3 are successful in many natural language processing tasks, training and deploying these models are costly and inefficient.Even if pre-trained models are…

Beyond Self-attention: External Attention using Two Linear Layers for Visual Tasks

2021-05-05 · Meng-Hao Guo, Zheng-Ning Liu, Tai-Jiang Mu, Shi-Min Hu

Attention mechanisms, especially self-attention, have played an increasingly important role in deep feature representation for visual tasks. Self-attention updates the feature at each position by computing a weighted sum…

image-classificationImage ClassificationImage GenerationInstance Segmentation+4

Polynomial Mixing for Efficient Self-supervised Speech Encoders

2026-02-28 · Eva Feillet, Ryan Whetten, David Picard, Alexandre Allauzen arxiv

State-of-the-art speech-to-text models typically employ Transformer-based encoders that model token dependencies via self-attention mechanisms. However, the quadratic complexity of self-attention in both memory and compu…

Representation LearningSpeech Recognition

On The Computational Complexity of Self-Attention

2022-09-11 · Feyza Duman Keles, Pruthuvi Mahesakya Wijewardena, Chinmay Hegde

Transformer architectures have led to remarkable progress in many state-of-art applications. However, despite their successes, modern transformers rely on the self-attention mechanism, whose time- and space-complexity is…