[论文解读] A Closer Look at How Fine-tuning Changes BERT
本文通过探针技术研究微调如何改变 BERT 的表示空间,发现微调通过增加类间距离并使相似标签聚类,从而提升分类性能,同时在很大程度上保持了原始的几何结构。此外,研究还识别出一种罕见情况:微调因训练集与测试集表示的差异增大而损害性能。
Given the prevalence of pre-trained contextualized representations in today's NLP, there have been many efforts to understand what information they contain, and why they seem to be universally successful. The most common approach to use these representations involves fine-tuning them for an end task. Yet, how fine-tuning changes the underlying embedding space is less studied. In this work, we study the English BERT family and use two probing techniques to analyze how fine-tuning changes the space. We hypothesize that fine-tuning affects classification performance by increasing the distances between examples associated with different labels. We confirm this hypothesis with carefully designed experiments on five different NLP tasks. Via these experiments, we also discover an exception to the prevailing wisdom that "fine-tuning always improves performance". Finally, by comparing the representations before and after fine-tuning, we discover that fine-tuning does not introduce arbitrary changes to representations; instead, it adjusts the representations to downstream tasks while largely preserving the original spatial structure of the data points.
研究动机与目标
- 理解微调如何改变各层 BERT 表示的几何结构。
- 探究微调是否普遍提升性能,或是否存在例外情况。
- 研究微调如何重新配置表示空间以更好地支持下游任务。
- 评估微调是否保留数据点之间的原始空间关系。
- 探索表示几何在微调成功中的作用,特别是通过聚类分离的角度。
提出的方法
- 作者采用两种探针技术:基于分类器的探针(使用多层感知机)和 DirectProbe,以分析表示几何结构。
- 他们在五个 NLP 任务上微调 BERT 变体:词性标注、依存句法头预测、介词超义预测和文本分类。
- 针对每个任务,通过探针准确率和标签聚类的几何分析,比较微调前后表示的差异。
- 使用欧氏距离和聚类紧凑性度量,衡量类间距离和空间构型的变化。
- 开展跨任务微调实验,测试在相关任务上微调是否能通过几何调整提升目标任务性能。
- 分析各层的变化,重点关注高层,以评估微调是否任意改变高层,或是否保持结构。
实验结果
研究问题
- RQ1微调是否总是提升下游性能,还是存在泛化能力下降的情况?
- RQ2微调如何改变表示空间的几何结构,特别是类间与类内距离方面?
- RQ3微调在多大程度上保留了各层数据点之间的原始空间构型?
- RQ4在相关任务上微调是否能通过调整聚类几何来提升目标任务性能?
- RQ5为何高层在微调中变化更大,且这种变化是任意的还是有结构的?
主要发现
- 微调增加了不同标签聚类之间的距离,尤其在标签初始并非线性可分的表示中,从而提升分类器性能。
- 在标签已线性可分的情况下,微调进一步拉大聚类间距,形成更大的分离边界,从而增强泛化能力。
- 作者识别出一个例外情况:微调导致性能下降,这与微调后训练集与测试集表示之间最大差异相关。
- 微调并未引入任意变化;相反,它在很大程度上保持了所有层中标签聚类的相对位置,仅重新配置表示空间。
- 高层受到的改变大于低层,但变化具有结构性,未破坏数据的原始空间组织。
- 跨任务微调表明,在相关任务上微调可通过调整聚类间距离提升目标任务性能,支持了几何重构驱动性能提升的假设。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。