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. To address this gap, 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, attention pattern, and controlled model capacity 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.


翻译:基于Transformer的语言模型在自然语言生成(NLG)任务中已取得最先进的性能,但其合成任务相关信息的内在机制仍未得到充分理解。尽管先前研究表明中间层通常比最终层产生更具泛化能力的表征,但这种泛化能力如何在训练过程中随层间传播并形成尚不明确。为填补这一空白,我们提出InfoRidge——一个信息论框架,用于刻画预测信息(即隐藏表征与目标输出之间的互信息)在训练过程中随深度变化的规律。我们在多种模型和数据集上的实验揭示了一致的非单调趋势:预测信息在中间层达到峰值(形成“泛化岭”),随后在最终层下降,这反映了泛化与记忆之间的过渡。为进一步探究该现象,我们通过残差缩放、注意力模式分析和可控模型容量等一系列互补分析来刻画逐层功能特化。我们通过多标记生成实验进一步验证了发现,证实所观察到的“岭”现象在不同解码步骤中持续存在。这些发现共同为Transformer的内部机制提供了新见解,并强调了中间层在支持泛化中的关键作用。

0
下载
关闭预览

相关内容

【博士论文】基于知识的自然语言理解与生成,230页pdf
专知会员服务
41+阅读 · 2024年4月1日
《大型语言模型自然语言生成评估》综述
专知会员服务
72+阅读 · 2024年1月20日
专知会员服务
65+阅读 · 2021年5月29日
【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
39+阅读 · 2020年11月20日
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
NLG ≠ 机器写作 | 专家专栏
量子位
13+阅读 · 2018年9月10日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
VIP会员
相关VIP内容
【博士论文】基于知识的自然语言理解与生成,230页pdf
专知会员服务
41+阅读 · 2024年4月1日
《大型语言模型自然语言生成评估》综述
专知会员服务
72+阅读 · 2024年1月20日
专知会员服务
65+阅读 · 2021年5月29日
【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
39+阅读 · 2020年11月20日
相关资讯
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
NLG ≠ 机器写作 | 专家专栏
量子位
13+阅读 · 2018年9月10日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员