English
Related papers

Related papers: A Study on ReLU and Softmax in Transformer

200 papers

Previous research observed accuracy degradation when replacing the attention softmax with a point-wise activation such as ReLU. In the context of vision transformers, we find that this degradation is mitigated when dividing by sequence…

Computer Vision and Pattern Recognition · Computer Science 2023-10-18 Mitchell Wortsman , Jaehoon Lee , Justin Gilmer , Simon Kornblith

In this paper, we share our reflections and insights on understanding Transformer architectures through the lens of associative memory--a classic psychological concept inspired by human cognition. We start with the basics of associative…

Machine Learning · Computer Science 2025-05-27 Shu Zhong , Mingyu Xu , Tenglong Ao , Guang Shi

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…

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

An essential component of modern recurrent sequence models is the forget gate. While Transformers do not have an explicit recurrent form, we show that a forget gate can be naturally incorporated into Transformers by down-weighting the…

Machine Learning · Computer Science 2025-04-02 Zhixuan Lin , Evgenii Nikishin , Xu Owen He , Aaron Courville

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

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

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

There has been a debate about the superiority between vision Transformers and ConvNets, serving as the backbone of computer vision models. Although they are usually considered as two completely different architectures, in this paper, we…

Computer Vision and Pattern Recognition · Computer Science 2023-09-20 Chong Zhou , Chen Change Loy , Bo Dai

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

Non-linear operations such as GELU, Layer normalization, and Softmax are essential yet costly building blocks of Transformer models. Several prior works simplified these operations with look-up tables or integer computations, but such…

Machine Learning · Computer Science 2021-12-07 Joonsang Yu , Junki Park , Seongmin Park , Minsoo Kim , Sihwa Lee , Dong Hyun Lee , Jungwook Choi

Transformer, composed of self-attention and Feed-Forward Network, has revolutionized the landscape of network design across various vision tasks. While self-attention is extensively explored as a key factor in performance, FFN has received…

Computer Vision and Pattern Recognition · Computer Science 2025-03-11 Seokju Yun , Dongheon Lee , Youngmin Ro

LayerNorm is a critical component in modern large language models (LLMs) for stabilizing training and ensuring smooth optimization. However, it introduces significant challenges in mechanistic interpretability, outlier feature suppression,…

Machine Learning · Computer Science 2024-11-19 Nandan Kumar Jha , Brandon Reagen

Existing analyses of the expressive capacity of Transformer models have required excessively deep layers for data memorization, leading to a discrepancy with the Transformers actually used in practice. This is primarily due to the…

Machine Learning · Computer Science 2024-01-30 Tokio Kajitsuka , Issei Sato

The softmax activation function plays a crucial role in the success of large language models (LLMs), particularly in the self-attention mechanism of the widely adopted Transformer architecture. However, the underlying learning dynamics that…

Machine Learning · Computer Science 2026-01-27 Yang Cao , Yingyu Liang , Zhenmei Shi , Zhao Song

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

Transformers have transformed the field of natural language processing. This performance is largely attributed to the use of stacked self-attention layers, each of which consists of matrix multiplies as well as softmax operations. As a…

Hardware Architecture · Computer Science 2021-03-18 Jacob R. Stevens , Rangharajan Venkatesan , Steve Dai , Brucek Khailany , Anand Raghunathan

Transformers have outperformed recurrent neural networks (RNNs) in natural language generation. But this comes with a significant computational cost, as the attention mechanism's complexity scales quadratically with sequence length.…

Computation and Language · Computer Science 2021-09-21 Jungo Kasai , Hao Peng , Yizhe Zhang , Dani Yogatama , Gabriel Ilharco , Nikolaos Pappas , Yi Mao , Weizhu Chen , Noah A. Smith

Transformer-based models have achieved state-of-the-art results in many natural language processing tasks. The self-attention architecture allows transformer to combine information from all elements of a sequence into context-aware…

Computation and Language · Computer Science 2021-02-17 Mikhail S. Burtsev , Yuri Kuratov , Anton Peganov , Grigory V. Sapunov

Owing to their ability to both effectively integrate information over long time horizons and scale to massive amounts of data, self-attention architectures have recently shown breakthrough success in natural language processing (NLP),…

‹ Prev 1 2 3 10 Next ›