mlsanityData to 14 Oct 2026

Eureka-Moments in Transformers: Multi-Step Tasks Reveal Softmax Induced Optimization Problems

arXiv 2310.12956 ↗First posted 19 Oct 2023cs.LG cs.AI cs.CVcited by 14

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  4. 2023Adding Conditional Control to Text-to-Image Diffusion Modelscited by 5,503
  5. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  6. 2017Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithmscited by 4,349
  7. 2022Emergent Abilities of Large Language Modelscited by 2,512
  8. 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,998
  9. 2020Shortcut Learning in Deep Neural Networkscited by 1,969
  10. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
  11. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  12. 2019Contrastive Multiview Codingcited by 1,301
25 more
  1. 2022In-context Learning and Induction Headscited by 964
  2. 2020On Layer Normalization in the Transformer Architecturecited by 922
  3. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  4. 2023Scaling Vision Transformers to 22 Billion Parameterscited by 694
  5. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
  6. 2023Are Emergent Abilities of Large Language Models a Mirage?cited by 523
  7. 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 419
  8. 2021XCiT: Cross-Covariance Image Transformerscited by 338
  9. 2019Learning Deep Transformer Models for Machine Translationcited by 309
  10. 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 309
  11. 2021Escaping the Big Data Paradigm with Compact Transformerscited by 264
  12. 2020Information-Theoretic Probing with Minimum Description Lengthcited by 232
  13. 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 230
  14. 2018Adaptive Input Representations for Neural Language Modelingcited by 226
  15. 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 187
  16. 2023Stabilizing Transformer Training by Preventing Attention Entropy Collapsecited by 161
  17. 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 146
  18. 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 141
  19. 2023Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMscited by 124
  20. 2022The Slingshot Mechanism: An Empirical Study of Adaptive Optimizers and the Grokking Phenomenoncited by 94
  21. 2023A Study on ReLU and Softmax in Transformercited by 53
  22. 2020GMAT: Global Memory Augmentation for Transformerscited by 36
  23. 2022Accumulated Trivial Attention Matters in Vision Transformers on Small Datasetscited by 15
  24. 2020Guiding Attention for Self-Supervised Learning with Transformerscited by 14
  25. 2021Escaping the Gradient Vanishing: Periodic Alternatives of Softmax in Attention Mechanismcited by 7

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 5; 2025: 6; 2026: 3.

14 papers.

Sort:

By area: