mlsanityData to 26 Nov 2026

How Much Information Can We Fit inside a Transformer?

arXiv 2610.34553 ↗Submitted 25 Oct 2026cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

How efficiently can transformers store factual knowledge? The answer to this question has implications for both model design and understanding the limits of transformer-based systems. Prior studies observe a linear relationship between the number of facts memorized and the number of model parameters required, substantially worse than what theoretical analyses predict is achievable. We re-examine empirical scaling: through rigorous and systematic experiments, including extensive hyperparameter search via Bayesian optimization, we determine the smallest model that can perfectly memorize a given set of facts, and measure how this minimum size scales with the number of facts. On synthetic datasets of random, independent (subject, relation, object) triples---e.g., (Paris, capitalof, France) ---drawn at random with no exploitable structure, we find that memorization capacity, the size of the largest dataset that a model memorizes completely, grows exponentially with the transformer dimension. Equivalently, the minimum transformer dimension dmin required to memorize N facts grows logarithmically in N. Across 11 dataset sizes spanning N = 45 to 49,920, a lack-of-fit F-test does not reject the logarithmic fit (with an offset), but it does reject all other tested alternatives including power-law. Along the depth axis, however, at fixed width, the maximum memorizable dataset size grows sublinearly with the number of layers over the measured range. We further extend our exploration to structured data containing symmetric relations or two-hop composition. In this setting, we find that transformers exploit these regularities to further improve capacity. All code to reproduce our results is available at https://github.com/Magronox/transformerinformationcapacity.

Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 21 of its 32 references that are in the map. Submitted 25 Oct 2026.

Builds on

21 of 32 references.

References · 21

  1. 2020Scaling Laws for Neural Language Modelscited by 7,119
  2. 2022Training Compute-Optimal Large Language Modelscited by 3,290
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,951
  4. 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,616
  5. 2020Extracting Training Data from Large Language Modelscited by 2,267
  6. 2019Language Models as Knowledge Bases?cited by 1,987
  7. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,424
  8. 2022Quantifying Memorization Across Neural Language Modelscited by 810
  9. 2021Knowledge Neurons in Pretrained Transformerscited by 635
  10. 2020Scaling Laws for Autoregressive Generative Modelingcited by 558
  11. 2020Hopfield Networks is All You Needcited by 517
  12. 2022Memorization Without Overfitting: Analyzing the Training Dynamics of Large Language Modelscited by 228
9 more
  1. 2023Linearity of Relation Decoding in Transformer Language Modelscited by 215
  2. 2024Physics of Language Models: Part 3.3, Knowledge Capacity Scaling Lawscited by 167
  3. 2024Understanding Factual Recall in Transformers via Associative Memoriescited by 65
  4. 2023Memorization Capacity of Multi-Head Attention in Transformerscited by 47
  5. 2024Scaling Laws for Fact Memorization of Large Language Modelscited by 37
  6. 2024What Can Transformer Learn with Varying Depth? Case Studies on Sequence Learning Taskscited by 22
  7. 2024Next-token prediction capacity: general upper bounds and a lower bound for transformerscited by 15
  8. 2024On the Optimal Memorization Capacity of Transformerscited by 13
  9. 2026Geometric Factual Recall in Transformerscited by 3

Built on by

Not cited yet.