[论文解读] Quantifying the Contextualization of Word Representations with Semantic Class Probing
本文通过从上下文嵌入中探测语义类别(s-class)推理,量化了 BERT 中的上下文表示。研究发现,较低层对上下文表示贡献最大,局部上下文(±5 个词)已足够,微调能保留预训练的上下文知识,同时使顶层更适应特定任务。
Pretrained language models have achieved a new state of the art on many NLP tasks, but there are still many open questions about how and why they work so well. We investigate the contextualization of words in BERT. We quantify the amount of contextualization, i.e., how well words are interpreted in context, by studying the extent to which semantic classes of a word can be inferred from its contextualized embeddings. Quantifying contextualization helps in understanding and utilizing pretrained language models. We show that top layer representations achieve high accuracy inferring semantic classes; that the strongest contextualization effects occur in the lower layers; that local context is mostly sufficient for semantic class inference; and that top layer representations are more task-specific after finetuning while lower layer representations are more transferable. Finetuning uncovers task related features, but pretrained knowledge is still largely preserved.
研究动机与目标
- 量化衡量 BERT 利用语义类别推理有效理解词语在上下文中的含义的程度。
- 探究网络各层对 BERT 上下文表示的贡献。
- 评估上下文窗口大小对词语表示上下文化的影响。
- 分析微调如何改变 BERT 表示的上下文表示能力。
- 评估微调后预训练上下文知识的保留程度。
提出的方法
- 使用诊断分类器探测 BERT 的上下文嵌入,以预测目标词的语义类别(s-classes)。
- 利用基于维基百科的语义类别资源(Wiki-PSE)定义并标注语义类别,用于词义消歧。
- 在 BERT 各层、不同上下文窗口大小以及预训练与微调模型之间评估 s-class 推理性能。
- 通过 s-class 预测的 F1 分数衡量上下文表示,F1 分数越高表示上下文理解能力越强。
- 比较完整句子上下文与局部上下文窗口(如 ±5 个词)的表示,以评估上下文长度需求。
- 分析在下游任务上微调前后 s-class 推理性能的变化,研究表示的适应过程。
实验结果
研究问题
- RQ1BERT 的上下文嵌入在多大程度上能从上下文中推断出词语的语义类别?
- RQ2哪些 BERT 层对上下文表示贡献最大,这种贡献在各层之间如何变化?
- RQ3有效词语上下文表示需要多大程度的上下文(以词窗口大小衡量)?
- RQ4微调如何影响 BERT 表示的上下文表示能力?
- RQ5微调后,预训练的上下文知识在多大程度上得以保留?
主要发现
- BERT 在 s-class 推理任务中表现优异(F1 ≈ 85%),表明其具有强大的上下文理解能力,但仍存在提升空间。
- 最强的上下文表示效应出现在 BERT 的低层,顶层的增量收益最小。
- 在 10 个词的局部上下文窗口(±5 个词)内已足够实现有效的上下文表示,表明完整句子注意力可能并非必需。
- 微调显著改变了用于词级任务(如词性标注)的顶层表示,但对句级任务(如释义分类)的影响较小。
- 微调后,预训练的上下文知识得到良好保留,尤其在低层中,其表示仍具有高度可迁移性。
- 微调后,顶层表示变得更任务特定,而低层表示则保持较强的通用上下文理解能力。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。