Skip to main content
QUICK REVIEW

[论文解读] Understanding and Mitigating Spurious Correlations in Text Classification with Neighborhood Analysis

Oscar Chew, Hsuan-Tien Lin|arXiv (Cornell University)|May 23, 2023
Imbalanced Data Classification TechniquesComputer Science被引用 3
一句话总结

本文通过邻域分析揭示预训练语言模型在文本分类中如何学习虚假相关性,发现虚假标记在嵌入空间中会与真实情感词汇聚集在一起。本文提出NFL(Do Not Forget Your Language)正则化方法,通过保持语义对齐显著提升模型在分布外数据上的鲁棒性,且无需辅助数据。

ABSTRACT

Recent research has revealed that machine learning models have a tendency to leverage spurious correlations that exist in the training set but may not hold true in general circumstances. For instance, a sentiment classifier may erroneously learn that the token "performances" is commonly associated with positive movie reviews. Relying on these spurious correlations degrades the classifiers performance when it deploys on out-of-distribution data. In this paper, we examine the implications of spurious correlations through a novel perspective called neighborhood analysis. The analysis uncovers how spurious correlations lead unrelated words to erroneously cluster together in the embedding space. Driven by the analysis, we design a metric to detect spurious tokens and also propose a family of regularization methods, NFL (doN't Forget your Language) to mitigate spurious correlations in text classification. Experiments show that NFL can effectively prevent erroneous clusters and significantly improve the robustness of classifiers without auxiliary data. The code is publicly available at https://github.com/oscarchew/doNt-Forget-your-Language.

研究动机与目标

  • 理解预训练语言模型为何以及如何学习虚假相关性,从而降低在分布外数据上的泛化能力。
  • 分析嵌入空间邻域结构在微调过程中虚假标记聚集现象中的作用。
  • 开发一种实用的、无需数据的检测方法,通过邻域分析评估虚假性得分。
  • 设计一种正则化框架NFL,防止模型在微调过程中对虚假与真实标记的表示产生错位。

提出的方法

  • 通过比较微调前后嵌入空间中标记的最近邻,进行邻域分析,以检测虚假相关性相关的错位现象。
  • 基于标记在微调前后邻域组成的变化,提出一种虚假性得分,识别与无关但语义相似的词聚集的标记。
  • 设计NFL(Do Not Forget Your Language)正则化技术家族,通过约束微调过程中的参数或输出变化,以保持语义结构。
  • 通过正则化模型的注意力权重或输出logits来应用NFL,防止对虚假标记的过度依赖。
  • 使用现成的预训练语言模型(如RoBERTa)作为基础模型,假设其因自监督预训练而免受下游标签偏差影响。
  • 在真实世界数据集(SST2、Amazon、Jigsaw)上评估检测与缓解性能,且无需使用无偏或辅助数据集。

实验结果

研究问题

  • RQ1虚假相关性在微调后语言模型的嵌入空间中如何表现?
  • RQ2微调后,虚假标记在嵌入空间中与真实、与标签相关的标记聚集到何种程度?
  • RQ3能否在无需无偏或辅助数据集的情况下,利用嵌入空间中的邻域分析可靠检测虚假标记?
  • RQ4通过保持嵌入中语义对齐的正则化方法,能否缓解虚假相关性并提升分布外鲁棒性?
  • RQ5NFL与现有检测和缓解方法相比,在精度和实用性方面表现如何?

主要发现

  • 邻域分析显示,微调后‘performances’和‘gay’等虚假标记在嵌入空间中与真实情感或攻击性词汇形成误导性聚类。
  • 所提出的虚假性得分能以高精度检测自然发生的虚假标记,其表现与先前方法相当,且无需多个数据集或无偏数据。
  • NFL正则化显著提升了模型鲁棒性,在情感和毒性分类任务中,分布外性能几乎达到分布内性能水平。
  • 该方法有效防止了虚假与真实标记的错误对齐,减少了对表面相关性的依赖。
  • 实验表明,NFL在无需额外数据的情况下提升了泛化能力,是一种实用且高效的缓解策略。
  • 人工评估确认,该方法检测出的高分虚假标记(如‘Canada’、‘witches’)确实具有上下文误导性,极有可能误导模型。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。