Lune

ICML2024Top-tier venue

Learning Associative Memories with Gradient Descent

Vivien Cabannes, Berfin Simsek, Alberto Bietti

Abstract

This work focuses on the training dynamics of one associative memory module storing outer products of token embeddings. We reduce this problem to the study of a system of particles, which interact according to properties of the data distribution and correlations between embeddings. Through theory and experiments, we provide several insights. In overparameterized regimes, we obtain logarithmic growth of the ``classification margins.'' Yet, we show that imbalance in token frequencies and memory interferences due to correlated embeddings lead to oscillatory transitory regimes. The oscillations are more pronounced with large step sizes, which can create benign loss spikes, although these learning rates speed up the dynamics and accelerate the asymptotic convergence. In underparameterized regimes, we illustrate how the cross-entropy loss can lead to suboptimal memorization schemes. Finally, we assess the validity of our findings on small Transformer models.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

15 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • BiSHop: Bi-Directional Cellular Learning for Tabular Data with Generalized Sparse Modern Hopfield Model cites Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Models
  • Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Models cites BiSHop: Bi-Directional Cellular Learning for Tabular Data with Generalized Sparse Modern Hopfield Model
  • BiSHop: Bi-Directional Cellular Learning for Tabular Data with Generalized Sparse Modern Hopfield Model cites Birth of a Transformer: A Memory Viewpoint
  • Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers cites Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Models
  • Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers cites Birth of a Transformer: A Memory Viewpoint
  • Iteration Head: A Mechanistic Study of Chain-of-Thought cites Birth of a Transformer: A Memory Viewpoint
  • Birth of a Transformer: A Memory Viewpoint cites Linear Transformers Are Secretly Fast Weight Programmers
  • Implicit Bias of Gradient Descent for Logistic Regression at the Edge of Stability cites Gradient Descent Maximizes the Margin of Homogeneous Neural Networks
  • From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamics cites Gradient Descent Maximizes the Margin of Homogeneous Neural Networks
  • From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training Dynamics cites Birth of a Transformer: A Memory Viewpoint
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers15

  1. Uniform Memory Retrieval with Larger Capacity for Modern Hopfield ModelsDennis Wu, Jerry Yao-Chieh Hu, Teng-Yun Hsiao, Han LiuICML 2024 · 44 citations
  2. Iteration Head: A Mechanistic Study of Chain-of-ThoughtVivien Cabannes, Charles Arnal, Wassim Bouaziz, Xingyu Yang et al.NeurIPS 2024 · 44 citations
  3. BiSHop: Bi-Directional Cellular Learning for Tabular Data with Generalized Sparse Modern Hopfield ModelChenwei Xu, Yu-Chao Huang, Jerry Yao-Chieh Hu, Weijian Li et al.ICML 2024 · 26 citations
  4. Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformersYibo Jiang, Goutham Rajendran, Pradeep Ravikumar, Bryon AragamNeurIPS 2024 · 19 citations
  5. From Condensation to Rank Collapse: A Two-Stage Analysis of Transformer Training DynamicsZheng-An Chen, Tao LuoNeurIPS 2025 · 13 citations

Builds on10

  1. Gradient Descent Maximizes the Margin of Homogeneous Neural NetworksKaifeng Lyu, Jian LiICLR 2020 · 402 citations
  2. Linear Transformers Are Secretly Fast Weight ProgrammersImanol Schlag, Kazuki Irie, Jürgen SchmidhuberICML 2021 · 394 citations
  3. Birth of a Transformer: A Memory ViewpointAlberto Bietti, Vivien Cabannes, Diane Bouchacourt, Hervé Jégou et al.NeurIPS 2023 · 182 citations
  4. Implicit Bias of Gradient Descent for Logistic Regression at the Edge of StabilityJingfeng Wu, Vladimir Braverman, Jason D. LeeNeurIPS 2023 · 46 citations
  5. Second-order regression models exhibit progressive sharpening to the edge of stabilityAtish Agarwala, Fabian Pedregosa, Jeffrey PenningtonICML 2023 · 37 citations

Related papers

  1. Scaling Laws for Associative MemoriesVivien Cabannes, Elvis Dohmatob, Alberto BiettiICLR 2024 · 26 citations
  2. A multiscale analysis of mean-field transformers in the moderate interaction regimeGiuseppe Bruno, Federico Pasqualotto, Andrea AgazziNeurIPS 2025 · 29 citations
  3. For Better or for Worse, Transformers Seek Patterns for MemorizationMadhur Panwar, Gail Weiss, Navin Goyal, Antoine BosselutNeurIPS 2025 · 1 citation
  4. Focus and Dilution: The Multi-stage Learning Process of AttentionZheng-An Chen, Pengxiao Lin, Zhi-Qin John Xu, Tao LuoICML 2026
  5. Learning In-context n-grams with Transformers: Sub-n-grams Are Near-Stationary PointsAditya Varre, Gizem Yüce, Nicolas FlammarionICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines