探究BERT模型各子层对多义词的上下文编码能力,发现其效果依赖于词语位置和上下文长度。
Probing Context Localization of Polysemous Words in Pre-trained Language Model Sub-Layers
- 用线性探测法分析BERT各子层对多义词的上下文敏感度
- 顶层数在短上下文且词位于特定位置时表现最佳
- 结果不具普遍性,受词位置和上下文长度影响显著
在高性能大语言模型时代,研究者普遍认为上下文词表示是实现下游任务优异表现的关键。本文通过线性探测的实证实验,考察预训练语言模型(PLM)细粒度子层表示中编码的上下文化程度。不同于以往研究,我们特别关注自注意力、前馈激活和输出子层在上下文化中的贡献。首先,在语义差异极小的句子对中提取多义词的子层表示,并分析其在前向传播过程中的变化;其次,通过在义项识别分类任务上进行探测,实证定位上下文信息在各子层表示中的编码强度。同时,探讨了上下文长度与上下文丰富度对上下文化程度的影响。主要结论为警示性:当目标词位于句中特定位置且上下文窗口较短时,BERT在顶层子层表现出高度上下文化,但该现象无法在不同词位置和上下文规模间系统推广。
原文摘要 · Abstract (English)
In the era of high performing Large Language Models, researchers have widely acknowledged that contextual word representations are one of the key drivers in achieving top performances in downstream tasks. In this work, we investigate the degree of contextualization encoded in the fine-grained sub-layer representations of a Pre-trained Language Model (PLM) by empirical experiments using linear probes. Unlike previous work, we are particularly interested in identifying the strength of contextualization across PLM sub-layer representations (i.e. Self-Attention, Feed-Forward Activation and Output sub-layers). To identify the main contributions of sub-layers to contextualisation, we first extract the sub-layer representations of polysemous words in minimally different sentence pairs, and compare how these representations change through the forward pass of the PLM network. Second, by probing on a sense identification classification task, we try to empirically localize the strength of contextualization information encoded in these sub-layer representations. With these probing experiments, we also try to gain a better understanding of the influence of context length and context richness on the degree of contextualization. Our main conclusion is cautionary: BERT demonstrates a high degree of contextualization in the top sub-layers if the word in question is in a specific position in the sentence with a shorter context window, but this does not systematically generalize across different word positions and context sizes.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。