arXiv:2606.29139cs.LG2026-06被引 1

发现语言模型中令牌影响随距离呈幂律衰减,揭示其长程依赖机制。

How Token Influence Decays with Distance: A Green-Function View of Trained Language Models

论文配图:How Token Influence Decays with Distance: A Green-Function View of Trained Language Models
图 1 · 摘自论文原文
  • 用梯度分析令牌间影响,发现衰减符合幂律而非指数规律
  • 实测显示中位雅可比敏感度在距离上呈幂律衰减,指数约0.8–0.9
  • 该特性是训练所得,随机初始化模型不具备,适合研究模型结构设计

我们研究自回归Transformer语言模型在早期输入令牌嵌入发生微小扰动时,对下一个令牌预测的影响变化。受微分方程求解器中算子学习与多层方法的启发,探究令牌间影响随距离衰减的规律。在域分解、多重网格和多层预处理等方法中,通常区分强局部作用与弱但关键的全局作用,后者对应格林函数的长尾部分,由粗粒度算子处理。我们利用autograd计算经验性的距离分辨梯度谱。在已训练的Pythia模型和Qwen2.5-0.5B上的实验表明,在测量距离范围内,中位雅可比敏感度更符合幂律衰减:归一化后$\overline G(r) \approx γ+β(r+1)^{-p}$,其中指数$p \approx 0.7$–$0.9$(通常为0.8–0.9)。此现象出现在古腾堡和WikiText-103的连贯文本中。令牌打乱实验显示,即使语法和预测质量崩溃,幂律仍存在;而随机初始化模型则无此特征。缓慢衰减的长程敏感性似乎是训练后自回归Transformer算子的习得属性。这提示语言模型中的分层或粗粒度机制可能能利用这种长尾敏感性。

原文摘要 · Abstract (English)

We study how the next-token prediction of an autoregressive Transformer language model changes under small perturbations of earlier input token embeddings. Motivated by operator learning and iterative solvers for differential equations, we investigate how the influence of one token on another decays with distance in a trained model. In multilevel methods for differential equations, such as domain decomposition, multigrid, and multilevel preconditioning, one often exploits a separation between strong local interactions and weaker but essential global interactions. The latter correspond to the long tail of the Green's function and are typically handled by a coarse-level operator. Inspired by this perspective, we compute an empirical, distance-resolved gradient profile of token dependencies using autograd. Experiments on trained Pythia models and Qwen2.5-0.5B show that, over the measured distance range, the median Jacobian sensitivity is much better described by a power-law-type decay than by an exponential alternative: the diagonal-normalized profile is well described by $$\overline G(r) \approx γ+β(r+1)^{-p}$$ with exponents $p \approx 0.7$--$0.9$ (typically $0.8$--$0.9$). This behavior appears on coherent text from Gutenberg and WikiText-103. Token-shuffling experiments show that the power-law profile persists even when syntax and prediction quality collapse, whereas randomly initialized models do not exhibit it. The slowly decaying long-range sensitivity thus appears to be a learned property of trained autoregressive Transformer operators. These findings suggest that hierarchical or coarse-level mechanisms in language models may be able to exploit the long-tailed sensitivity profiles.

Transformer长程依赖幂律衰减模型机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。