arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.04930cs.CLcs.AI
收藏

大语言模型隐式学习拉直神经句子轨迹以构建自然语言的预测性表征

Large language models implicitly learn to straighten neural sentence trajectories to construct a predictive representation of natural language

Massachusetts Institute of Technology(麻省理工学院)

Eghbal A. Hosseini, Evelina Fedorenko

AI总结:

该研究提出自回归Transformer的轨迹拉直假设,通过一维曲率指标验证发现训练模型深层曲率更低、性能与曲率降幅正相关等结论,揭示其内部表征几何结构支持下一词预测的机制。

摘要:

预测即将发生的事件对我们与环境交互的能力至关重要。经下一词预测训练的Transformer模型似乎构建了能够支持多种下游任务的语言输入表征。但预测目标如何塑造这类表征?受视觉领域近期研究(Henaff等人,2019)启发,我们检验了关于自回归Transformer预测性表征的一项假设。具体而言,我们检验句子的神经轨迹在通过网络层时是否会逐渐变得更平直。核心洞见是,更平直的轨迹应能通过线性外推促进预测。我们使用一维曲率指标量化平直度,并提出四项支持轨迹拉直假设的发现:i)在已训练模型中,曲率从网络的浅层到深层逐渐降低。ii)在下一词预测目标上表现更好的模型展现出更大的曲率降幅,表明这种拉直句子轨迹能力的提升可能是语言建模性能更优的驱动因素。iii)在相同语言语境下,模型生成的序列比语言语料库中观察到的真实续篇曲率更低,表明模型更偏好使用更平直的轨迹进行预测。iv)在模型深层中,句子的平均曲率与平均惊奇度之间存在一致关系,即轨迹更平直的句子惊奇度也更低。重要的是,未训练的模型不会表现出这些行为。综合来看,这些结果支持轨迹拉直假设,并为自回归模型内部表征的几何结构如何支持下一词预测提供了一种可能的机制。

英文摘要:

Predicting upcoming events is critical to our ability to interact with our environment. Transformer models, trained on next-word prediction, appear to construct representations of linguistic input that can support diverse downstream tasks. But how does a predictive objective shape such representations? Inspired by recent work in vision (Henaff et al., 2019), we test a hypothesis about predictive representations of autoregressive transformers. In particular, we test whether the neural trajectory of a sentence becomes progressively straighter as it passes through the network layers. The key insight is that straighter trajectories should facilitate prediction via linear extrapolation. We quantify straightness using a 1-dimensional curvature metric, and present four findings in support of the trajectory straightening hypothesis: i) In trained models, the curvature decreases from the early to the deeper layers of the network. ii) Models that perform better on the next-word prediction objective exhibit greater decreases in curvature, suggesting that this improved ability to straighten sentence trajectories may be the driver of better language modeling performance. iii) Given the same linguistic context, the sequences that are generated by the model have lower curvature than the actual continuations observed in a language corpus, suggesting that the model favors straighter trajectories for making predictions. iv) A consistent relationship holds between the average curvature and the average surprisal of sentences in the deep model layers, such that sentences with straighter trajectories also have lower surprisal. Importantly, untrained models do not exhibit these behaviors. In tandem, these results support the trajectory straightening hypothesis and provide a possible mechanism for how the geometry of the internal representations of autoregressive models supports next word prediction.

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

↑