English
Related papers

Related papers: Replacing softmax with ReLU in Vision Transformers

200 papers

Recently, it has been argued that encoder-decoder models can be made more interpretable by replacing the softmax function in the attention with its sparse variants. In this work, we introduce a novel, simple method for achieving sparsity in…

Computation and Language · Computer Science 2021-10-07 Biao Zhang , Ivan Titov , Rico Sennrich

We provide a systematic recipe for translating ReLU approximation results to softmax attention mechanism. This recipe covers many common approximation targets. Importantly, it yields target-specific, economic resource bounds beyond…

Machine Learning · Computer Science 2026-04-29 Jerry Yao-Chieh Hu , Mingcheng Lu , Yi-Chen Lee , Han Liu

The Transformer architecture consists of self-attention and feed-forward networks (FFNs) which can be viewed as key-value memories according to previous works. However, FFN and traditional memory utilize different activation functions…

Computation and Language · Computer Science 2023-02-14 Kai Shen , Junliang Guo , Xu Tan , Siliang Tang , Rui Wang , Jiang Bian

To enhance the computational efficiency of quantized Transformers, we replace the dot-product and Softmax-based attention with an alternative mechanism involving addition and ReLU activation only. This side-steps the expansion to double…

Machine Learning · Computer Science 2025-10-02 Rickard Brännvall , Andrei Stoian

Attention is a key part of the transformer architecture. It is a sequence-to-sequence mapping that transforms each sequence element into a weighted sum of values. The weights are typically obtained as the softmax of dot products between…

We prove that with linear transformations, both (i) two-layer self-attention and (ii) one-layer self-attention followed by a softmax function are universal approximators for continuous sequence-to-sequence functions on compact domains. Our…

Machine Learning · Computer Science 2025-12-17 Jerry Yao-Chieh Hu , Hude Liu , Hong-Yu Chen , Weimin Wu , Han Liu

Vision Transformers (ViTs) have recently taken computer vision by storm. However, the softmax attention underlying ViTs comes with a quadratic complexity in time and memory, hindering the application of ViTs to high-resolution images. We…

Computer Vision and Pattern Recognition · Computer Science 2025-02-17 Chuanyang Zheng

The Softmax attention mechanism in Transformer models is notoriously computationally expensive, particularly due to its quadratic complexity, posing significant challenges in vision applications. In contrast, linear attention provides a far…

Computer Vision and Pattern Recognition · Computer Science 2025-03-12 Qihang Fan , Huaibo Huang , Ran He

The quadratic computation complexity of self-attention has been a persistent challenge when applying Transformer models to vision tasks. Linear attention, on the other hand, offers a much more efficient alternative with its linear…

Computer Vision and Pattern Recognition · Computer Science 2023-09-04 Dongchen Han , Xuran Pan , Yizeng Han , Shiji Song , Gao Huang

Transformers have improved drastically the performance of natural language processing (NLP) and computer vision applications. The computation of transformers involves matrix multiplications and non-linear activation functions such as…

Hardware Architecture · Computer Science 2024-02-19 Christodoulos Peltekis , Kosmas Alexandridis , Giorgos Dimitrakopoulos

Large transformer models have achieved state-of-the-art results in numerous natural language processing tasks. Among the pivotal components of the transformer architecture, the attention mechanism plays a crucial role in capturing token…

Computation and Language · Computer Science 2026-03-16 Yichuan Deng , Zhao Song , Kaijun Yuan , Tianyi Zhou

Transformers have had tremendous impact for several sequence related tasks, largely due to their ability to retrieve from any part of the sequence via softmax based dot-product attention. This mechanism plays a crucial role in Transformer's…

Machine Learning · Computer Science 2025-07-15 Sai Surya Duvvuri , Inderjit S. Dhillon

Vision Transformers (ViTs) based vision foundation models (VFMs) have achieved remarkable performance across diverse vision tasks, but suffer from quadratic complexity that limits scalability to long sequences. Existing linear attention…

Computer Vision and Pattern Recognition · Computer Science 2026-03-18 Yifan Li , Seunghyun Yoon , Viet Dac Lai , Franck Dernoncourt , Jason Kuen , Yu Kong , Trung Bui

While the Transformer architecture dominates many fields, its quadratic self-attention complexity hinders its use in large-scale applications. Linear attention offers an efficient alternative, but its direct application often degrades…

Computer Vision and Pattern Recognition · Computer Science 2026-01-15 Kewei Zhang , Ye Huang , Yufan Deng , Jincheng Yu , Junsong Chen , Huan Ling , Enze Xie , Daquan Zhou

The transformer architecture has driven many successes in a variety of tasks within the field of deep learning, in particular the recent advances in natural language processing (NLP) culminating with large language models (LLM). Adding to…

Computer Vision and Pattern Recognition · Computer Science 2025-11-27 Abdullah Nazhat Abdullah , Tarkan Aydin

Vision transformers have shown great success on numerous computer vision tasks. However, its central component, softmax attention, prohibits vision transformers from scaling up to high-resolution images, due to both the computational…

Computer Vision and Pattern Recognition · Computer Science 2023-07-21 Weixuan Sun , Zhen Qin , Hui Deng , Jianyuan Wang , Yi Zhang , Kaihao Zhang , Nick Barnes , Stan Birchfield , Lingpeng Kong , Yiran Zhong

As the core operator of Transformers, Softmax Attention exhibits excellent global modeling capabilities. However, its quadratic complexity limits its applicability to vision tasks. In contrast, Linear Attention shares a similar formulation…

Computer Vision and Pattern Recognition · Computer Science 2025-08-05 Qihang Fan , Huaibo Huang , Yuang Ai , Ran He

Vision transformers (ViTs) have pushed the state-of-the-art for various visual recognition tasks by patch-wise image tokenization followed by self-attention. However, the employment of self-attention modules results in a quadratic…

Computer Vision and Pattern Recognition · Computer Science 2022-05-03 Jiachen Lu , Jinghan Yao , Junge Zhang , Xiatian Zhu , Hang Xu , Weiguo Gao , Chunjing Xu , Tao Xiang , Li Zhang

Widely adopted in modern Vision Transformer designs, Softmax attention can effectively capture long-range visual information; however, it incurs excessive computational cost when dealing with high-resolution inputs. In contrast, linear…

Computer Vision and Pattern Recognition · Computer Science 2024-12-10 Dongchen Han , Yifan Pu , Zhuofan Xia , Yizeng Han , Xuran Pan , Xiu Li , Jiwen Lu , Shiji Song , Gao Huang

Vision Transformers have achieved impressive performance in video classification, while suffering from the quadratic complexity caused by the Softmax attention mechanism. Some studies alleviate the computational costs by reducing the number…

Computer Vision and Pattern Recognition · Computer Science 2022-10-18 Kaiyue Lu , Zexiang Liu , Jianyuan Wang , Weixuan Sun , Zhen Qin , Dong Li , Xuyang Shen , Hui Deng , Xiaodong Han , Yuchao Dai , Yiran Zhong
‹ Prev 1 2 3 10 Next ›