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

通用 ridge:自然语言生成中的信息流

The Generalization Ridge: Information Flow in Natural Language Generation

Ruidi Chang, Chunyuan Deng, Hanjie Chen

AI总结:

研究揭示了 transformer 模型中信息流的非单调趋势,通过信息理论框架分析隐藏表示与目标输出间的互信息变化,发现中间层形成泛化 ridge,为理解模型泛化机制提供新视角。

摘要:

基于 transformer 的语言模型在自然语言生成(NLG)中取得了最先进的性能,但其内部机制在合成任务相关信息方面仍不够清楚。尽管先前研究表明中间层通常产生比最终层更可泛化的表示,但这种泛化能力如何在训练过程中在层之间出现和传播仍不清楚。我们提出了 InfoRidge,一个信息理论框架,以表征预测信息(即隐藏表示与目标输出之间的互信息)在训练过程中深度的变化。我们的实验在各种模型和数据集上揭示了一种一致的非单调趋势:预测信息在中间层达到峰值(形成泛化 ridge)后,在最终层下降,反映了泛化与记忆之间的转变。为进一步研究这一现象,我们进行了互补分析,利用残差缩放和注意力模式来表征各层的功能专业化。我们还通过多 token 生成实验验证了我们的发现,证实观察到的 ridge 现象在解码步骤中持续存在。这些发现为 transformer 的内部机制提供了新的见解,并强调了中间层在支持泛化中的关键作用。

英文摘要:

Transformer-based language models have achieved state-of-the-art performance in natural language generation (NLG), yet their internal mechanisms for synthesizing task-relevant information remain insufficiently understood. While prior studies suggest that intermediate layers often yield more generalizable representations than final layers, how this generalization ability emerges and propagates across layers during training remains unclear.We propose InfoRidge, an information-theoretic framework, to characterize how predictive information-the mutual information between hidden representations and target outputs-varies across depth during training. Our experiments across various models and datasets reveal a consistent non-monotonic trend: predictive information peaks in intermediate layers-forming a generalization ridge-before declining in final layers, reflecting a transition between generalization and memorization. To further investigate this phenomenon, we conduct a set of complementary analyses that leverage residual scaling and attention patterns to characterize layer-wise functional specialization. We further validate our findings with multiple-token generation experiments, verifying that the observed ridge phenomenon persists across decoding steps. Together, these findings offer new insights into the internal mechanisms of transformers and underscore the critical role of intermediate layers in supporting generalization.

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

↑