Learning Associative Memories with Gradient Descent

Vivien Cabannes, Berfin Simsek, A. Bietti
2/12/2026

No confident code implementation found for this paper. 1 possible match can be shown below.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cabannes2026learning,
  title  = {Learning Associative Memories with Gradient Descent},
  author = {Vivien Cabannes and Berfin Simsek and A. Bietti},
  year   = {2026},
  eprint = {2402.18724},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2402.18724},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.18724.svg)](https://codeofpaper.com/paper/2402.18724)

Discussion