跳到正文
arXiv cs.AI· Amirhossein Basareh, Rishabh Sanjay, Daniel de Mello, Abulhair Saparov·· 2 小时前AI 评分50

Transformer 能装下多少信息?研究测量事实记忆容量的缩放规律

How Much Information Can We Fit inside a Transformer?

AI 导读

一项 arXiv 研究通过系统性实验(含贝叶斯优化超参数搜索)测量 Transformer 的事实记忆容量:在 N=45 到 49,920 的 11 个合成三元组数据集上,记忆容量随 Transformer 维度呈指数增长,即存储 N 条事实所需的最小维度 d_min 随 N 对数增长,拟合 F 检验否定了幂律等替代假设。

正文 · 原文

View PDF HTML (experimental)

Abstract: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, capital_of, 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 $d_{\min}$ 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 this https URL.
Subjects: Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.34553 [cs.AI]
  (or arXiv:2610.34553v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2610.34553

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Amirhossein Basareh [view email]
[v1] Sun, 25 Oct 2026 20:28:17 UTC (130 KB)

来源:arXiv cs.AI · arxiv.org