[论文解读] Counterfactual Invariance to Spurious Correlations: Why and How to Pass Stress Tests
本文通过反事实不变性形式化了机器学习中的压力测试,表明当无关输入特征(如文本中的性别或情感)发生扰动时,预测器应保持不变。该研究基于因果结构推导出可观测、可测试的条件——区分因果与反因果数据模型——并提出了正则化方法,以学习对领域分布漂移具有鲁棒性的预测器,且在文本分类任务中进行了实证验证。
Informally, a 'spurious correlation' is the dependence of a model on some aspect of the input data that an analyst thinks shouldn't matter. In machine learning, these have a know-it-when-you-see-it character; e.g., changing the gender of a sentence's subject changes a sentiment predictor's output. To check for spurious correlations, we can 'stress test' models by perturbing irrelevant parts of input data and seeing if model predictions change. In this paper, we study stress testing using the tools of causal inference. We introduce counterfactual invariance as a formalization of the requirement that changing irrelevant parts of the input shouldn't change model predictions. We connect counterfactual invariance to out-of-domain model performance, and provide practical schemes for learning (approximately) counterfactual invariant predictors (without access to counterfactual examples). It turns out that both the means and implications of counterfactual invariance depend fundamentally on the true underlying causal structure of the data -- in particular, whether the label causes the features or the features cause the label. Distinct causal structures require distinct regularization schemes to induce counterfactual invariance. Similarly, counterfactual invariance implies different domain shift guarantees depending on the underlying causal structure. This theory is supported by empirical results on text classification.
研究动机与目标
- 将压力测试形式化为反事实不变性,确保模型预测在对无关输入特征进行干预时保持稳定。
- 通过分析潜在因果结构,阐明反事实不变性与分布外泛化之间的联系。
- 开发实用的、基于数据的正则化方法,以在无需访问反事实样本的情况下强制实现反事实不变性。
- 证明不同的因果结构(因果与反因果)需要不同的训练策略才能实现不变性与鲁棒性。
提出的方法
- 引入反事实不变性作为正式条件:预测器在对虚假特征 Z 进行干预时,必须在几乎所有地方产生相同的输出,即 f(X(z)) = f(X(z')) 几乎处处成立。
- 利用条件独立性和边缘独立性准则(例如 f(X) ⊥ Z | Y)推导反事实不变性的可观测影响,这些条件可在观测数据上进行检验。
- 提出在训练过程中强制执行这些独立性条件的正则化方案,从而在不生成反事实样本的情况下实现近似反事实不变性。
- 区分两种关键因果结构:(1) Y 导致 X,且 Z 影响 X(因果方向);(2) Z 与 Y 共享一个共同原因,且 X 是两者的函数(反因果方向),每种结构需采用不同的正则化策略。
- 将该框架应用于文本分类任务,利用真实世界数据集验证:在这些准则下训练的模型能够通过压力测试,并在领域分布漂移下表现出更好的泛化能力。
- 通过证明反事实不变性与公平性及领域自适应之间的等价性(如在特定解释下与人口均等性和均等机会等概念等价),建立其关联。
实验结果
研究问题
- RQ1如何利用因果推断形式化压力测试,以确保模型对虚假相关性的鲁棒性?
- RQ2在真实世界数据中,哪些可观测、可测试的条件可推导出反事实不变性?
- RQ3潜在因果结构(因果 vs. 反因果)如何影响实现反事实不变性的正则化方法设计?
- RQ4反事实不变性为分布外泛化提供了何种保证?这些保证如何随因果结构变化?
- RQ5是否可以在不访问反事实样本的情况下强制实现反事实不变性?如果可以,如何实现?
主要发现
- 反事实不变性被形式化为一个条件:要求对所有 z, z' 属于 Z 的支撑集,均有 f(X(z)) = f(X(z')),以确保预测对无关扰动保持不变。
- 本文识别出两种截然不同的因果结构——因果结构(Y → X,Z → X)与反因果结构(Z 与 Y 共享共同原因)——它们需要根本不同的正则化策略才能实现不变性。
- 推导出可观测的独立性准则(如 f(X) ⊥ Z | Y)作为反事实不变性的充分条件,从而实现在无需反事实数据情况下的训练。
- 该方法提升了分布外泛化能力,因为基于这些准则训练的模型在因果结构被正确识别时,对分布漂移表现出更强的鲁棒性。
- 在文本分类上的实证结果表明,采用所提正则化方案训练的模型能够通过压力测试,并在领域分布漂移下实现更好的泛化。
- 该框架揭示,对公平性启发的正则化方法(如来自反事实公平性的方法)在反因果设置下可能失效,凸显了结构感知设计的必要性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。