Skip to main content
QUICK REVIEW

[论文解读] Robustness to Spurious Correlations in Text Classification via Automatically Generated Counterfactuals

Zhao Wang, Aron Culotta|arXiv (Cornell University)|Dec 18, 2020
Text and Document Classification Technologies参考文献 31被引用 12
一句话总结

本文提出一种方法,通过使用因果特征识别和反义词替换自动生成反事实训练样本,以提高文本分类器的鲁棒性。通过在训练数据中引入这些反事实样本——其中因果特征被替换为反义词且标签被翻转——得到的分类器在人工生成的反事实测试集上准确率提高了12%–25%,同时在原始数据上保持性能,表明通过强调因果特征并弱化虚假相关性,实现了更好的泛化能力。

ABSTRACT

Spurious correlations threaten the validity of statistical classifiers. While model accuracy may appear high when the test data is from the same distribution as the training data, it can quickly degrade when the test distribution changes. For example, it has been shown that classifiers perform poorly when humans make minor modifications to change the label of an example. One solution to increase model reliability and generalizability is to identify causal associations between features and classes. In this paper, we propose to train a robust text classifier by augmenting the training data with automatically generated counterfactual data. We first identify likely causal features using a statistical matching approach. Next, we generate counterfactual samples for the original training data by substituting causal features with their antonyms and then assigning opposite labels to the counterfactual samples. Finally, we combine the original data and counterfactual data to train a robust classifier. Experiments on two classification tasks show that a traditional classifier trained on the original data does very poorly on human-generated counterfactual samples (e.g., 10%-37% drop in accuracy). However, the classifier trained on the combined data is more robust and performs well on both the original test data and the counterfactual test data (e.g., 12%-25% increase in accuracy compared with the traditional classifier). Detailed analysis shows that the robust classifier makes meaningful and trustworthy predictions by emphasizing causal features and de-emphasizing non-causal features.

研究动机与目标

  • 解决文本分类中虚假相关性导致的模型在分布偏移或微小输入扰动下性能下降的问题。
  • 通过自动生成高质量的反事实训练样本,减少对昂贵人工标注反事实样本的依赖。
  • 通过数据增强强调因果特征并弱化非因果特征,提升模型鲁棒性。
  • 评估少量人工提供的因果特征是否能实现与大规模人工标注反事实样本相当的鲁棒性。

提出的方法

  • 使用统计最近反义匹配方法识别可能的因果特征,以找到关键词的反义词。
  • 通过将因果特征替换为其反义词并为新样本分配相反标签,生成反事实样本。
  • 将原始训练数据与自动生成的反事实数据结合,训练鲁棒分类器。
  • 使用带L2正则化的逻辑回归在合并数据集上训练最终分类器。
  • 进行系数分析,比较原始分类器与鲁棒分类器中特征重要性的变化。
  • 通过有限的人工提供的因果特征进行消融研究,评估可扩展性与性能权衡。

实验结果

研究问题

  • RQ1自动生成的反事实样本是否能提升模型在分布偏移和对抗性测试数据上的鲁棒性?
  • RQ2鲁棒分类器在原始和反事实测试集上的表现与基线分类器相比如何?
  • RQ3少量人工提供的因果特征在多大程度上能实现与大规模人工标注反事实样本相当的鲁棒性?
  • RQ4因果词与非因果词的系数变化如何促进泛化能力的提升?
  • RQ5文档长度是否会影响增加因果词权重与减少非因果词权重的相对影响?

主要发现

  • 仅在原始数据上训练的基线分类器在人工生成的反事实测试集上准确率下降了10%–37%,表明对虚假相关性高度敏感。
  • 在原始数据与自动生成的反事实数据联合训练的鲁棒分类器,在反事实测试集上相比基线分类器实现了12%–25%的绝对准确率提升。
  • 鲁棒分类器通过调整特征系数,学会强调因果词(如“awesome”、“awful”)并弱化非因果词(如“free”、“movie”),从而实现更可信的预测。
  • 仅使用50个人工提供的因果特征,模型性能即可与使用1,700个人工生成反事实样本的先前工作模型相当。
  • 对于IMDB-L数据集,增加因果词系数的影响大于减少非因果词系数的影响;而在较小数据集上则相反,表明文档长度影响系数调整的相对重要性。
  • 错误分析确认,鲁棒分类器通过增加因果词权重并减少非因果词的影响,纠正了原始模型因虚假特征误导而产生的误分类,尤其在这些情况下效果显著。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。