A Conditional No-Hair Theorem for Transformers: How Language Models Forget Their Prompt
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 tokens. For two prompts followed by the same continuation, the difference of their hidden states decays approximately as a power law , where is the rate at which a fixed prompt's share of uniform attention shrinks. Beyond the first layers, trained models forget faster (--) than untrained ones of the same architecture (--). For finite-depth pre-LN softmax transformers with bounded attention logits and non-degenerate pre-norm activations, we prove that this offset is for prompt length and depth : 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 for any Hugging Face causal language model is publicly available.
Create a lesson
Related papers
Specialized Large Language Models for Markovian Reasoning: Structural Cache Compression, Transition Pretraining, and Dual-Loop Transformers
Shared title terminologycs.AIHaibin Tong, Liangliang Xin, Yamei Zhu et al.
A Cross-Domain Evaluation of Prompting Techniques for Large Language Models
Shared title terminologycs.AIKevin Krazius, Tim Schlippe, Paul Libbrecht
Designing Transformers for Continuous Diffusion Language Models
Shared title terminologycs.AIWeijian Luo, Yujian Chen, Hao Jiang et al.
Layer-Level Control of Language Model Execution in Agent Frameworks
Shared title terminologycs.AIRan Guan, Yiqi Lin, Xiangxi Tian et al.
Learning from Another Angle: Rotation-Based Test-Time Training for Multimodal Large Language Models
Shared title terminologycs.AIChangyu Liu, Fei Zhao, Yiyang Liu et al.
STEdgeFormer: MCU and NPU Deployable Transformer Architecture
Shared title terminologycs.AISudhakar Sah