论文标题

GPT-2中的花园路径遍历

Garden-Path Traversal in GPT-2

论文作者

Jurayj, William, Rudman, William, Eickhoff, Carsten

论文摘要

近年来,诸如GPT-X模型家族之类的大型变压器解码器变得越来越流行。研究这些模型的行为的研究倾向于仅关注语言建模头的输出,并避免分析变压器解码器的内部状态。在这项研究中,我们提出了一系列方法来分析GPT-2的隐藏状态,并将模型的花园路径句子导航作为案例研究。为了实现这一点,我们编译了当前最大的花园路径句子数据集。我们表明,与既定的惊人方法相比,曼哈顿的距离和余弦相似性提供了更可靠的见解,该方法分析了由语言建模主管计算的下一步概率。使用这些方法,我们发现否定令牌对模型的表示形式对句子的表征产生最小的影响,而歧义只是对动词的对象的含义,但对表征对明确的句子的影响更大,其歧义的歧义会源于动词的声音。此外,我们发现分析解码器模型的隐藏状态揭示了可能在花园路径效应中得出的歧义时期,但事实并非如此,而惊喜分析通常会错过此细节。

In recent years, large-scale transformer decoders such as the GPT-x family of models have become increasingly popular. Studies examining the behavior of these models tend to focus only on the output of the language modeling head and avoid analysis of the internal states of the transformer decoder. In this study, we present a collection of methods to analyze the hidden states of GPT-2 and use the model's navigation of garden path sentences as a case study. To enable this, we compile the largest currently available dataset of garden path sentences. We show that Manhattan distances and cosine similarities provide more reliable insights compared to established surprisal methods that analyze next-token probabilities computed by a language modeling head. Using these methods, we find that negating tokens have minimal impacts on the model's representations for unambiguous forms of sentences with ambiguity solely over what the object of a verb is, but have a more substantial impact of representations for unambiguous sentences whose ambiguity would stem from the voice of a verb. Further, we find that analyzing the decoder model's hidden states reveals periods of ambiguity that might conclude in a garden path effect but happen not to, whereas surprisal analyses routinely miss this detail.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源