mlsanityData to 7 Oct 2026

Beyond Scaling Laws: Understanding Transformer Performance with Associative Memory

arXiv 2405.08707 ↗First posted 14 May 2024cs.LGcited by 12

Not on the map. Why?

Abstract (arXiv)

Increasing the size of a Transformer does not always lead to enhanced performance. This phenomenon cannot be explained by the empirical scaling laws. Furthermore, the model's enhanced performance is closely associated with its memorization of the training samples. We present a theoretical framework that sheds light on the memorization during pre-training of transformer-based language models. We model the behavior of Transformers with associative memories using Hopfield networks, such that each transformer block effectively conducts an approximate nearest-neighbor search. In particular, the energy function in modern continuous Hopfield networks serves as an explanation for the attention mechanism, which we approximate with a distance-based energy function. By observing that the softmax function corresponds to the gradient of the LogSumExp function in the energy, and employing the majorization-minimization technique, we construct a global energy function designed to capture the layered architecture. We demonstrate a dependency between the model size and the dataset size for the model to achieve optimal performance, and we show that the achievable cross-entropy loss is bounded from below.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 47 of its 64 references that are in the map. First posted on arXiv 14 May 2024.

Builds on

47 of 64 references.

References · 47

  1. 2017Attention Is All You Needcited by 59,932
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  3. 2020Scaling Laws for Neural Language Modelscited by 6,411
  4. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  5. 2023Mistral 7Bcited by 3,065
  6. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  7. 2020Extracting Training Data from Large Language Modelscited by 2,144
  8. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  9. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
  10. 2023PaLM 2 Technical Reportcited by 1,154
  11. 2018Reconciling modern machine learning practice and the bias-variance trade-offcited by 919
  12. 2020On Layer Normalization in the Transformer Architecturecited by 906
35 more
  1. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
  2. 2024MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategiescited by 694
  3. 2019Deep Double Descent: Where Bigger Models and More Data Hurtcited by 667
  4. 2023Baichuan 2: Open Large-scale Language Modelscited by 664
  5. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
  6. 2022Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Modelcited by 557
  7. 2020Hopfield Networks is All You Needcited by 461
  8. 2019Your Classifier is Secretly an Energy Based Model and You Should Treat it Like Onecited by 402
  9. 2023Scaling Data-Constrained Language Modelscited by 391
  10. 2023Effective Long-Context Scaling of Foundation Modelscited by 301
  11. 2016Using the Output Embedding to Improve Language Modelscited by 266
  12. 2016Dense Associative Memory for Pattern Recognitioncited by 230
  13. 2022Memorization Without Overfitting: Analyzing the Training Dynamics of Large Language Modelscited by 218
  14. 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
  15. 2023Emergent and Predictable Memorization in Large Language Modelscited by 147
  16. 2024Language models scale reliably with over-training and on downstream taskscited by 105
  17. 2024Understanding Emergent Abilities of Language Models from the Loss Perspectivecited by 94
  18. 2019Augmenting Self-attention with Persistent Memorycited by 92
  19. 2023Language Model Behavior: A Comprehensive Surveycited by 92
  20. 2024OpenELM: An Efficient Language Model Family with Open Training and Inference Frameworkcited by 74
  21. 2020Does syntax need to grow on trees? Sources of hierarchical inductive bias in sequence-to-sequence networkscited by 72
  22. 2023Energy Transformercited by 69
  23. 2018A standardized Project Gutenberg corpus for statistical analysis of natural language and quantitative linguisticscited by 64
  24. 2020Triple descent and the two kinds of overfitting: Where & why do they appear?cited by 64
  25. 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
  26. 2022Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Modelscited by 52
  27. 2023Extending Context Window of Large Language Models via Semantic Compressioncited by 45
  28. 2021Word Acquisition in Neural Language Modelscited by 41
  29. 2023On Sparse Modern Hopfield Modelcited by 41
  30. 2024Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Modelscited by 38
  31. 2024Outlier-Efficient Hopfield Layers for Large Transformer-Based Modelscited by 38
  32. 2021Hierarchical Associative Memorycited by 34
  33. 2024Transformers Can Represent n-gram Language Modelscited by 31
  34. 2024RAGGED: Towards Informed Design of Scalable and Stable RAG Systemscited by 24
  35. 2023End-to-end Differentiable Clustering with Associative Memoriescited by 15

Built on by

Cited by year (2026 to 7 Oct)

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

12 papers.