paper-with-me

Papers

Rethinking Attention: Polynomial Alternatives to Softmax in Transformers

2024-10-24 · Hemanth Saratchandran, Jianqiao Zheng, Yiping Ji, Wenbo Zhang, Simon Lucey

This paper questions whether the strong performance of softmax attention in transformers stems from producing a probability distribution over inputs. Instead, we argue that softmax's effectiveness lies in its implicit regularization of the Frobenius norm of the attention matrix, which stabilizes training. Motivated by this, we explore alternative activations, specifically polynomials, that achieve a similar regularization effect. Our theoretical analysis shows that certain polynomials can serve as effective substitutes for softmax, achieving strong performance across transformer applications despite violating softmax's typical properties of positivity, normalization, and sparsity. Extensive experiments support these findings, offering a new perspective on attention mechanisms.

📄 PDF Abstract BibTeX arXiv:2410.18613

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Attention 설명 없음
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 제목 키워드 기반

Power-Softmax: Towards Secure LLM Inference over Encrypted Data

2024-10-12 · Itamar Zimerman, Allon Adir, Ehud Aharoni, Matan Avitan 외

Modern cryptographic methods for implementing privacy-preserving LLMs such as Homomorphic Encryption (HE) require the LLMs to have a polynomial form. Forming such a representation is challenging because Transformers incl…

In-Context LearningInductive BiasPrivacy Preserving

Rethinking Attention with Performers

2020-09-30 · ICLR 2021 1 · Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song 외

We introduce Performers, Transformer architectures which can estimate regular (softmax) full-rank-attention Transformers with provable accuracy, but using only linear (as opposed to quadratic) space and time complexity, …

D4RLImage GenerationLanguage ModellingOffline RL

Escaping the Gradient Vanishing: Periodic Alternatives of Softmax in Attention Mechanism

2021-08-16 · Shulun Wang, Bin Liu, Feng Liu

Softmax is widely used in neural networks for multiclass classification, gate structure and attention mechanisms. The statistical assumption that the input is normal distributed supports the gradient stability of Softmax…

Theory, Analysis, and Best Practices for Sigmoid Self-Attention

2024-09-06 · Jason Ramapuram, Federico Danieli, Eeshan Dhekane, Floris Weers 외

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 …

Activation-Free Backbones for Image Recognition: Polynomial Alternatives within MetaFormer-Style Vision Models

2026-05-20 · Jeffrey Wang, Jonathan Gregory, Grigorios G. Chrysos arxiv

Modern vision backbones treat pointwise activations (e.g., ReLU, GELU) and exponential softmax as essential sources of nonlinearity, but we demonstrate they are not required within MetaFormer-style vision backbones. We d…

Semantic Segmentation