mlsanityData to 14 Oct 2026

Self-Adjust Softmax

arXiv 2502.18277 ↗First posted 25 Feb 2025cs.CLcited by 3

Not on the map. Why?

Abstract (arXiv)

The softmax function is crucial in Transformer attention, which normalizes each row of the attention scores with summation to one, achieving superior performances over other alternative functions. However, the softmax function can face a gradient vanishing issue when some elements of the attention scores approach extreme values, such as probabilities close to one or zero. In this paper, we propose Self-Adjust Softmax (SA-Softmax) to address this issue by modifying softmax(x) to x · softmax(x) and its normalized variant frac(x - min(xmin,0))max(0,xmax)-min(xmin,0) · softmax(x). We theoretically show that SA-Softmax provides enhanced gradient properties compared to the vanilla softmax function. Moreover, SA-Softmax Attention can be seamlessly integrated into existing Transformer models to their attention mechanisms with minor adjustments. We conducted experiments to evaluate the empirical performance of Transformer models using SA-Softmax compared to the vanilla softmax function. These experiments, involving models with up to 2.7 billion parameters, are conducted across diverse datasets, language tasks, and positional encoding methods.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 73 of its 113 references that are in the map. First posted on arXiv 25 Feb 2025.

Builds on

73 of 113 references.

References · 73

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  4. 2020Language Models are Few-Shot Learnerscited by 32,419
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  6. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  7. 2024The Llama 3 Herd of Modelscited by 14,715
  8. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  9. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  10. 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 7,005
  11. 2016Layer Normalizationcited by 5,669
  12. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 5,045
38 more
  1. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  2. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  4. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  5. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  6. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  7. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
  8. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  9. 2020Longformer: The Long-Document Transformercited by 3,413
  10. 2016Pointer Sentinel Mixture Modelscited by 3,096
  11. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  12. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  13. 2021Convex optimizationcited by 2,515
  14. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  15. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  16. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
  17. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
  18. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  19. 2017Arbitrary Style Transfer in Real-time with Adaptive Instance Normalizationcited by 2,010
  20. 2020Conformer: Convolution-augmented Transformer for Speech Recognitioncited by 1,863
  21. 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,729
  22. 2020Rethinking Attention with Performerscited by 1,601
  23. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  24. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  25. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  26. 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,102
  27. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  28. 2023BloombergGPT: A Large Language Model for Financecited by 939
  29. 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 861
  30. 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 807
  31. 2017Crowdsourcing Multiple Choice Science Questionscited by 765
  32. 2022Galactica: A Large Language Model for Sciencecited by 744
  33. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  34. 2019Large Batch Optimization for Deep Learning: Training BERT in 76 minutescited by 674
  35. 2016Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networkscited by 543
  36. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
  37. 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
  38. 2016A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Storiescited by 417

50 most cited of 73 All 73 (JSON)

Built on by

Cited by year

Citing papers per year: 2025: 3.

3 papers.