跳到正文
arXiv cs.AI· Shuyang Xiang·· 2 小时前AI 评分47

Transformer 的条件无毛定理:大语言模型如何在生成中“遗忘”提示词

A Conditional No-Hair Theorem for Transformers: How Language Models Forget Their Prompt

AI 导读

一篇 arXiv 论文类比黑洞无毛定理,研究自回归 Transformer 生成 t 个 token 后对提示词的保留程度:两个提示词接相同续文时,隐藏状态差异按幂律 t^{-α} 衰减,训练后的模型遗忘更快(α≈0.55–0.7,未训练模型 α≈0.2–0.5)。

正文 · 原文

View PDF HTML (experimental)

Abstract:A black hole retains only a few conserved charges of the matter it formed from. We are inspired to make the analogy and we ask how much an autoregressive transformer retains of its prompt after generating $t$ tokens. For two prompts followed by the same continuation, the difference of their hidden states decays approximately as a power law $t^{-\alpha}$, where $\alpha=1$ is the rate at which a fixed prompt's share of uniform attention shrinks. Beyond the first layers, trained models forget faster ($\alpha\approx0.55$--$0.7$) than untrained ones of the same architecture ($\alpha\approx0.2$--$0.5$). For finite-depth pre-LN softmax transformers with bounded attention logits and non-degenerate pre-norm activations, we prove that this offset is $O\big(P(\log t)^{L-1}/t\big)$ for prompt length $P$ and depth $L$: the prompt's direct influence is diluted as the context grows, and \emph{relay} through continuation tokens adds only logarithmic factors. Conditional on the generated text, the prompt's influence on the next token thus vanishes. The bound fixes only the asymptotic shape and is uninformative at the lengths we measure in trained networks; an exactly solvable linear relay model shows that it cannot be improved and accounts for the untrained curves. Cancelling the dilution with a logit bias on the prompt stops the decay early in training, and training suppresses relay by about one billion tokens, before attention sinks form. A toolkit that measures $\alpha$ for any Hugging Face causal language model is publicly available.
Subjects: Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.24133 [cs.AI]
  (or arXiv:2610.24133v2 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2610.24133

arXiv-issued DOI via DataCite

Submission history

From: Shuyang Xiang [view email]
[v1] Fri, 16 Oct 2026 19:03:20 UTC (104 KB)
[v2] Tue, 17 Nov 2026 10:37:12 UTC (105 KB)

来源:arXiv cs.AI · arxiv.org