Eureka-Moments in Transformers: Multi-Step Tasks Reveal Softmax Induced Optimization Problems
Not on the map. Why?
Abstract (arXiv)
In this work, we study rapid improvements of the training loss in transformers when being confronted with multi-step decision tasks. We found that transformers struggle to learn the intermediate task and both training and validation loss saturate for hundreds of epochs. When transformers finally learn the intermediate task, they do this rapidly and unexpectedly. We call these abrupt improvements Eureka-moments, since the transformer appears to suddenly learn a previously incomprehensible concept. We designed synthetic tasks to study the problem in detail, but the leaps in performance can be observed also for language modeling and in-context learning (ICL). We suspect that these abrupt transitions are caused by the multi-step nature of these tasks. Indeed, we find connections and show that ways to improve on the synthetic multi-step tasks can be used to improve the training of language modeling and ICL. Using the synthetic data we trace the problem back to the Softmax function in the self-attention block of transformers and show ways to alleviate the problem. These fixes reduce the required number of training steps, lead to higher likelihood to learn the intermediate task, to higher final accuracy and training becomes more robust to hyper-parameters.
Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 37 of its 54 references that are in the map. First posted on arXiv 19 Oct 2023.
Builds on
37 of 54 references.
References · 37
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2023Adding Conditional Control to Text-to-Image Diffusion Modelscited by 5,503
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
- 2017Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithmscited by 4,349
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,998
- 2020Shortcut Learning in Deep Neural Networkscited by 1,969
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2019Contrastive Multiview Codingcited by 1,301
25 more
- 2022In-context Learning and Induction Headscited by 964
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
- 2023Scaling Vision Transformers to 22 Billion Parameterscited by 694
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2023Are Emergent Abilities of Large Language Models a Mirage?cited by 523
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 419
- 2021XCiT: Cross-Covariance Image Transformerscited by 338
- 2019Learning Deep Transformer Models for Machine Translationcited by 309
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 309
- 2021Escaping the Big Data Paradigm with Compact Transformerscited by 264
- 2020Information-Theoretic Probing with Minimum Description Lengthcited by 232
- 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 230
- 2018Adaptive Input Representations for Neural Language Modelingcited by 226
- 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 187
- 2023Stabilizing Transformer Training by Preventing Attention Entropy Collapsecited by 161
- 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 146
- 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 141
- 2023Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMscited by 124
- 2022The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenoncited by 94
- 2023A Study on ReLU and Softmax in Transformercited by 53
- 2020GMAT: Global Memory Augmentation for Transformerscited by 36
- 2022Accumulated Trivial Attention Matters in Vision Transformers on Small Datasetscited by 15
- 2020Guiding Attention for Self-Supervised Learning with Transformerscited by 14
- 2021Escaping the Gradient Vanishing: Periodic Alternatives of Softmax in Attention Mechanismcited by 7
Built on by
Citing papers per year: 2024: 5; 2025: 6; 2026: 3.
14 papers.
Sort:
By area:
- 2024The Power of Noise: Redefining Retrieval for RAG Systemscited by 281
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 46
- 2024Improving fine-grained understanding in image-text pre-trainingcited by 44
- 2024A Percolation Model of Emergence: Analyzing Transformers Trained on a Formal Languagecited by 26
- 2024Abrupt Learning in Transformers: A Case Study on Matrix Completioncited by 11
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformerscited by 7
- 2025Quantum Doubly Stochastic Transformerscited by 6
- 2025Unpacking Softmax: How Temperature Drives Representation Collapse, Compression, and Generalizationcited by 3
- 2026Convergent World Representations and Divergent Taskscited by 2
- 2024A Mechanistic Study of Transformers Training Dynamicscited by 1
- 2025Cross-modal Full-mode Fine-grained Alignment for Text-to-Image Person Retrievalcited by 1
- 2025Algorithm Development in Neural Networks: Insights from the Streaming Parity Taskcited by 0
2 more
- 2026Pretraining Transformers with Quantized Softmax in Attention27 Sep 2026
- 2026Memory as a cache: Exact context reuse and deletion by construction26 Sep 2026
- 2026Convergent World Representations and Divergent Tasks31 Jan 2026
- 2025Cross-modal Full-mode Fine-grained Alignment for Text-to-Image Person Retrieval17 Sep 2025
- 2025Algorithm Development in Neural Networks: Insights from the Streaming Parity Task14 Jul 2025
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformers16 Jun 2025
- 2025Unpacking Softmax: How Temperature Drives Representation Collapse, Compression, and Generalization2 Jun 2025
- 2025Quantum Doubly Stochastic Transformers22 Apr 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
- 2024A Mechanistic Study of Transformers Training Dynamics31 Oct 2024
- 2024Abrupt Learning in Transformers: A Case Study on Matrix Completion29 Oct 2024
- 2024A Percolation Model of Emergence: Analyzing Transformers Trained on a Formal Language22 Aug 2024
2 more
- 2024The Power of Noise: Redefining Retrieval for RAG Systems26 Jan 2024
- 2024Improving fine-grained understanding in image-text pre-training18 Jan 2024
- 2024The Power of Noise: Redefining Retrieval for RAG Systemscited by 281
- 2024The Power of Noise: Redefining Retrieval for RAG Systems26 Jan 2024
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 46
- 2024Improving fine-grained understanding in image-text pre-trainingcited by 44
- 2024A Percolation Model of Emergence: Analyzing Transformers Trained on a Formal Languagecited by 26
- 2024Abrupt Learning in Transformers: A Case Study on Matrix Completioncited by 11
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformerscited by 7
- 2025Quantum Doubly Stochastic Transformerscited by 6
- 2025Unpacking Softmax: How Temperature Drives Representation Collapse, Compression, and Generalizationcited by 3
- 2026Convergent World Representations and Divergent Taskscited by 2
- 2024A Mechanistic Study of Transformers Training Dynamicscited by 1
- 2025Cross-modal Full-mode Fine-grained Alignment for Text-to-Image Person Retrievalcited by 1
- 2025Algorithm Development in Neural Networks: Insights from the Streaming Parity Taskcited by 0
- 2026Pretraining Transformers with Quantized Softmax in Attentioncited by 0
- 2026Pretraining Transformers with Quantized Softmax in Attention27 Sep 2026
- 2026Convergent World Representations and Divergent Tasks31 Jan 2026
- 2025Cross-modal Full-mode Fine-grained Alignment for Text-to-Image Person Retrieval17 Sep 2025
- 2025Algorithm Development in Neural Networks: Insights from the Streaming Parity Task14 Jul 2025
- 2025What Happens During the Loss Plateau? Understanding Abrupt Learning in Transformers16 Jun 2025
- 2025Unpacking Softmax: How Temperature Drives Representation Collapse, Compression, and Generalization2 Jun 2025
- 2025Quantum Doubly Stochastic Transformers22 Apr 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
- 2024A Mechanistic Study of Transformers Training Dynamics31 Oct 2024
- 2024Abrupt Learning in Transformers: A Case Study on Matrix Completion29 Oct 2024
- 2024A Percolation Model of Emergence: Analyzing Transformers Trained on a Formal Language22 Aug 2024
- 2024Improving fine-grained understanding in image-text pre-training18 Jan 2024