cs.LGNov 1, 2026

Meta-memorization and memorization scaling laws in transformers

Authors: Alex Nguyen, Kenneth A. Norman, Gautam Reddy

Organizations: Princeton Neuroscience Institute, Princeton University, Princeton, NJ, USA · Princeton Neuroscience Institute, Department of Psychology, Princeton University, Princeton, NJ, USA · Department of Physics, Princeton University, Princeton, NJ, USA

Abstract

Larger transformers can memorize more data, with a capacity (in bits) that scales roughly linearly with the number of parameters. Counterintuitively, larger models also memorize faster, requiring fewer repetitions of a sequence during training before it is memorized. We reproduce both memorization scaling laws in transformers trained on random binary sequences, showing that rapid memorization can arise even when data contain no semantic or compositional structure. Rapid memorization is due to a meta-memorization effect, where models trained to memorize a large set of random sequences learn to memorize novel sequences more quickly. The rate r(t)r(t) at which models memorize grows with training time tt as a power-law r(t)∼tβr(t) \sim t^β with a fixed exponent ββ but an increasing upper cutoff across model scales. Meta-memorization enables even one-layer transformers to few-shot memorize a 100-bit sequence. This effect is partly explained by the formation of structured attention heads that convey position-invariant sequence information to MLPs where memorized sequences are stored. Meta-memorization is recapitulated in a simplified model of a dense associative memory where retrieval is constrained by an attentional bottleneck. Our results suggest transformers, through pre-training, acquire reusable mechanisms that enable highly efficient storage and retrieval of memories.

Figures & tables

Appendix figures & tables10 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. How Much Information Can We Fit inside a Transformer?

    Oct 25, 2026Amirhossein Basareh, Rishabh Sanjay, Daniel de Mello +1Memorization in Language ModelsTransformer

  2. Mixture of Chapters: Scaling Learnt Memory in Transformers

    Mar 22, 2026Tasmay Pankaj Tibrewal, Pritish Saha, Ankit Meda +2Memory-Augmented Language ModelsPersistent Memory for Language Models

  3. Learning to Recall with Transformers Beyond Orthogonal Embeddings

    Mar 16, 2026Nuri Mert Vural, Alberto Bietti, Mahdi Soltanolkotabi +1TransformerMemorization in Language Models