arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.02800cs.LG
收藏

归纳头对N元语法进行插值

Induction Heads Interpolate N-Grams

TML Lab, EPFL, Switzerland(瑞士联邦理工学院TML实验室);IIT Madras, India(印度IIT马德拉斯)

Francesco D'Angelo, Oguz Kaan Yuksel, Swathi Shree Narashiman, Nicolas Flammarion

AI总结:

研究在k阶马尔可夫链上训练的变压器中的归纳头,识别出两种互补平滑机制,构建实现这两种机制的解缠变压器,结果表明训练后的变压器能恢复预测注意力模式,优于经典基于计数的基线。

摘要:

归纳头是变压器上下文学习背后的注意力电路,但其实现的估计器的精确特征仍难以捉摸。我们研究在k阶马尔可夫链上训练的变压器,识别出两种互补的平滑机制。我们构建了一个实现这两种机制的解缠变压器,并表明训练后的变压器恢复了预测的注意力模式。

英文摘要:

Induction heads are attention circuits believed to underlie in-context learning in transformers, yet a precise characterization of the estimators they implement remains elusive. We study transformers trained on order-$k$ Markov chains and identify two complementary smoothing mechanisms. First, at finite attention-weight scale, the circuit implements a soft context-matching estimator: it aggregates contributions from exact and partial context matches, weighted exponentially by their overlap, and induces a data-dependent interpolation across context orders analogous to Jelinek-Mercer smoothing. Second, a beginning-of-sequence (BOS) token induces additive pseudo-counts, recovering Dirichlet-style smoothing. We construct a disentangled transformer implementing both mechanisms and show that trained transformers recover the predicted attention patterns. Across settings where pseudo-count smoothing is optimal or lower-order contexts provide structured evidence, trained transformers match or outperform classical count-based baselines. Our results bridge mechanistic interpretability of induction heads with classical statistical smoothing, revealing that transformers learn to regularize in-context estimation rather than simply count.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑