mlsanityData to 14 Oct 2026

How Do Transformers Learn to Associate Tokens: Gradient Leading Terms Bring Mechanistic Interpretability

arXiv 2601.19208 ↗First posted 27 Jan 2026cs.CL cs.LGcited by 3

On the map: Mechanistic interpretability → Knowledge and representations inside LLMs

Abstract (arXiv)

Semantic associations such as the link between "bird" and "flew" are foundational for language modeling as they enable models to go beyond memorization and instead generalize and generate coherent text. Understanding how these associations are learned and represented in language models is essential for connecting deep learning with linguistic theory and developing a mechanistic foundation for large language models. In this work, we analyze how these associations emerge from natural language data in attention-based language models through the lens of training dynamics. By leveraging a leading-term approximation of the gradients, we develop closed-form expressions for the weights at early stages of training that explain how semantic associations first take shape. Through our analysis, we reveal that each set of weights of the transformer has closed-form expressions as simple compositions of three basis functions (bigram, token-interchangeability, and context mappings), reflecting the statistics of the text corpus and uncovering how each component of the transformer captures semantic associations based on these compositions. Experiments on real-world LLMs demonstrate that our theoretical weight characterizations closely match the learned weights, and qualitative analyses further show how our theorem shines light on interpreting the learned associations in transformers.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Knowledge and representations inside LLMs, one of 13 directions in Mechanistic interpretability. Builds on 36 of its 47 references that are in the map. First posted on arXiv 27 Jan 2026.

Builds on

36 of 47 references.

References · 36

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  5. 2025Qwen3 Technical Reportcited by 8,820
  6. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
  7. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  8. 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
  9. 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,302
  10. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
  11. 2022Mass-Editing Memory in a Transformercited by 1,001
  12. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
24 more
  1. 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 449
  2. 2024Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Modelscited by 435
  3. 2024Not All Language Model Features Are One-Dimensionally Linearcited by 212
  4. 2023Birth of a Transformer: A Memory Viewpointcited by 161
  5. 2022High-dimensional Asymptotics of Feature Learning: How One Gradient Step Improves the Representationcited by 150
  6. 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
  7. 2024How Transformers Learn Causal Structure with Gradient Descentcited by 118
  8. 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
  9. 2022Learning Single-Index Models with Shallow Neural Networkscited by 92
  10. 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 86
  11. 2024On the Origins of Linear Representations in Large Language Modelscited by 79
  12. 2023How Two-Layer Neural Networks Learn, One (Giant) Step at a Timecited by 68
  13. 2024Transformers Provably Solve Parity Efficiently with Chain of Thoughtcited by 50
  14. 2024Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscapecited by 46
  15. 2024Neural network learns low-dimensional polynomials with SGD near the information-theoretic limitcited by 46
  16. 2023Gradient-Based Feature Learning under Structured Datacited by 32
  17. 2024A phase transition between positional and semantic learning in a solvable model of dot-product attentioncited by 30
  18. 2024Nonlinear spiked covariance matrices and signal propagation in deep neural networkscited by 26
  19. 2024Non-asymptotic Convergence of Training Transformers for Next-token Predictioncited by 13
  20. 2025An Analysis for Reasoning Bias of Language Models with Small Initializationcited by 13
  21. 2025Fundamental limits of learning in sequence multi-index models and deep attention networks: High-dimensional asymptotics and sharp thresholdscited by 12
  22. 2025Hidden Dynamics of Massive Activations in Transformer Trainingcited by 10
  23. 2024Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysiscited by 9
  24. 2025Attention-Only Transformers via Unrolled Subspace Denoisingcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026LLMs Explain't: A Post-Mortem on Semantic Interpretability in Transformer Models
  2. 2025The Birth of Knowledge: Emergent Features across Time, Space, and Scale in Large Language Models
  3. 2024The Labyrinth of Links: Navigating the Associative Maze of Multi-modal LLMs
  4. 2025TRACE: Training and Inference-Time Interpretability Analysis for Language Models
  5. 2025Bridging the Dimensional Chasm: Uncover Layer-wise Dimensional Reduction in Transformers through Token Correlation
  6. 2024Rethinking Associative Memory Mechanism in Induction Head
  7. 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layers
  8. 2025From Words to Waves: Analyzing Concept Formation in Speech and Text-Based Foundation Models