[论文解读] The Bottom-up Evolution of Representations in the Transformer: A Study with Machine Translation and Language Modeling Objectives
本文研究了训练目标——机器翻译(MT)、自左向右语言模型(LM)和掩码语言模型(MLM)——如何塑造Transformer中标记表示的演化过程。通过典型相关性分析和互信息估计,研究发现LM层在逐步丢失过去上下文的同时形成对未来的预测,而MLM层则先通过遗忘标记身份来实现泛化,随后在更高层重建该身份,从而解释了MLM在预训练中表现更优的原因。
We seek to understand how the representations of individual tokens and the structure of the learned feature space evolve between layers in deep neural networks under different learning objectives. We focus on the Transformers for our analysis as they have been shown effective on various tasks, including machine translation (MT), standard left-to-right language models (LM) and masked language modeling (MLM). Previous work used black-box probing tasks to show that the representations learned by the Transformer differ significantly depending on the objective. In this work, we use canonical correlation analysis and mutual information estimators to study how information flows across Transformer layers and how this process depends on the choice of learning objective. For example, as you go from bottom to top layers, information about the past in left-to-right language models gets vanished and predictions about the future get formed. In contrast, for MLM, representations initially acquire information about the context around the token, partially forgetting the token identity and producing a more generalized token representation. The token identity then gets recreated at the top MLM layers.
研究动机与目标
- 理解学习目标如何塑造Transformer各层之间标记表示的演化过程。
- 研究在不同目标(MT、LM、MLM)下层间的信息流动动态。
- 基于表示演化,解释为何掩码语言模型(MLM)在预训练中优于自左向右语言模型(LM)。
- 分析表示如何在各层中编码和遗忘关于标记身份、上下文、位置和句法的信息。
提出的方法
- 使用互信息估计测量每一层中表示对标记身份和输出标签的保留程度。
- 使用典型相关性分析(CCA)量化不同标记表示之间的相互影响程度以及层间表示变换的程度。
- 通过基于相似性的分析,测量相邻标记、位置和CCG超标签对每种表示的重要性。
- 在保持模型架构和数据不变的前提下,比较MT、LM和MLM三种目标下的表示演化。
- 应用t-SNE可视化技术,分析基于CCG标签的标记表示(如“is”)在各层中的空间重排。
- 从瓶颈学习的视角分析表示中的信息压缩与预测之间的权衡。
实验结果
研究问题
- RQ1在不同训练目标(MT、LM、MLM)下,标记的表示在各层之间如何演化?
- RQ2在这一演化过程中,哪些信息(如标记身份、上下文、句法)被保留、丢失或获得?
- RQ3为何掩码语言模型(MLM)在预训练中表现优于自左向右语言模型(LM),尽管其架构相似?
- RQ4标记之间的相互作用如何随层变化,且在不同目标下有何差异?
- RQ5在不同目标下,表示在多大程度上编码了过去与未来上下文的信息?
主要发现
- 在自左向右语言模型(LM)中,从底层到顶层,过去信息逐渐丢失,而表示则越来越多地编码对未来的预测。
- 对于掩码语言模型(MLM),表示最初会遗忘标记身份,并通过编码上下文信息实现泛化,仅在更高层才重建身份。
- 典型相关性分析显示,MLM模型中的表示经历了显著的变换,层间影响强烈,尤其在早期层中,上下文被编码。
- 相邻标记的重要性在MLM中持续上升至第二层,之后下降,表明存在上下文编码与标记重建的两阶段过程。
- 对于LM和MLM,CCG超标签的重要性在高层均有所下降,但模式不同:LM累积了过去句法结构,而MLM则在重建前聚焦于上下文。
- t-SNE可视化证实,相同词语(如“is”)的表示会根据句法结构(CCG标签)在各层中发生重排,MLM和LM中均出现了不同的聚类模式。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。