Counterfactual Invariance to Spurious Correlations: Why and How to Pass Stress Tests
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 77 papers in the map (data through 7 Oct 2026). Builds on 28 of its 42 references that are in the map. First posted on arXiv 31 May 2021.
Builds on
28 of 42 references.
References · 28
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2015Domain-Adversarial Training of Neural Networkscited by 3,023
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2019A Survey on Bias and Fairness in Machine Learningcited by 1,911
- 2019Invariant Risk Minimizationcited by 1,832
- 2019Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalizationcited by 1,232
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
- 2017Counterfactual Fairnesscited by 802
- 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 800
- 2018Annotation Artifacts in Natural Language Inference Datacited by 656
- 2013Domain Generalization via Invariant Feature Representationcited by 622
- 2014Deep Domain Confusion: Maximizing for Domain Invariancecited by 597
16 more
- 2015Causal inference using invariant prediction: identification and confidence intervalscited by 533
- 2019Learning the Difference that Makes a Difference with Counterfactually-Augmented Datacited by 428
- 2020Weakly-Supervised Disentanglement Without Compromisescited by 237
- 2021Polyjuice: Generating Counterfactuals for Explaining, Evaluating, and Improving Modelscited by 219
- 2018Stress Test Evaluation for Natural Language Inferencecited by 211
- 2020Representation Learning via Invariant Causal Mechanismscited by 197
- 2020Data Augmentation using Pre-trained Transformer Modelscited by 168
- 2017Mind the Class Weight Bias: Weighted Maximum Mean Discrepancy for Unsupervised Domain Adaptationcited by 151
- 2018Counterfactual Fairness in Text Classification through Robustnesscited by 150
- 2021Model-Based Domain Generalizationcited by 103
- 2020Learning What Makes a Difference from Counterfactual Examples and Gradient Supervisioncited by 66
- 2020Explaining The Efficacy of Counterfactually Augmented Datacited by 64
- 2018Counterfactuals uncover the modular structure of deep generative modelscited by 51
- 2020Counterfactually-Augmented SNLI Training Data Does Not Yield Better Generalization Than Unaugmented Datacited by 27
- 2018Adversarial Alignment of Class Prediction Uncertainties for Domain Adaptationcited by 8
- 2018Counterfactual Normalization: Proactively Addressing Dataset Shift and Improving Reliability Using Causal Mechanismscited by 7
Built on by
Citing papers per year: 2021: 6; 2022: 25; 2023: 14; 2024: 10; 2025: 9; 2026: 13.
77 papers.
Sort:
By area:
- 2022Last Layer Re-Training is Sufficient for Robustness to Spurious Correlationscited by 379
- 2021Causal Inference in Natural Language Processing: Estimation, Prediction, Interpretation and Beyondcited by 177
- 2022On Feature Learning in the Presence of Spurious Correlationscited by 145
- 2021Measure and Improve Robustness in NLP Models: A Surveycited by 107
- 2021Desiderata for Representation Learning: A Causal Perspectivecited by 76
- 2022Measuring Causal Effects of Data Statistics on Language Model's `Factual' Predictionscited by 57
- 2022A Comprehensive Study of Image Classification Model Sensitivity to Foregrounds, Backgrounds, and Visual Attributescited by 56
- 2022Causal Discovery in Heterogeneous Environments Under the Sparse Mechanism Shift Hypothesiscited by 54
- 2022Diagnosing failures of fairness transfer across distribution shift in real-world medical settingscited by 45
- 2022Predictive Multiplicity in Probabilistic Classificationcited by 44
- 2021An Investigation of the (In)effectiveness of Counterfactually Augmented Datacited by 42
- 2021Out-of-distribution Generalization in the Presence of Nuisance-Induced Spurious Correlationscited by 41
38 more
- 2022OOD Link Prediction Generalization Capabilities of Message-Passing GNNs in Larger Test Graphscited by 38
- 2022Invariant and Transportable Representations for Anti-Causal Domain Shiftscited by 37
- 2022DoCoGen: Domain Counterfactual Generation for Low Resource Domain Adaptationcited by 36
- 2024CLIP the Bias: How Useful is Balancing Data in Multimodal Learning?cited by 35
- 2024How Likely Do LLMs with CoT Mimic Human Reasoning?cited by 34
- 2023Leveraging sparse and shared feature activations for disentangled representation learningcited by 32
- 2023Don't blame Dataset Shift! Shortcut Learning due to Gradients and Cross Entropycited by 30
- 2022FaiRR: Faithful and Robust Deductive Reasoning over Natural Languagecited by 29
- 2022Exploring The Landscape of Distributional Robustness for Question Answering Modelscited by 23
- 2023Spuriosity Didn't Kill the Classifier: Using Invariant Predictions to Harness Spurious Featurescited by 21
- 2022Nuisances via Negativa: Adjusting for Spurious Correlations via Data Augmentationcited by 18
- 2022Causal Intervention Improves Implicit Sentiment Analysiscited by 16
- 2024Predictive Churn with the Set of Good Modelscited by 15
- 2022Domain Generalization -- A Causal Perspectivecited by 14
- 2022DC-Check: A Data-Centric AI checklist to guide the development of reliable machine learning systemscited by 14
- 2022MMD-B-Fair: Learning Fair Representations with Statistical Testingcited by 13
- 2023Learning for Counterfactual Fairness from Observational Datacited by 13
- 2023Beyond Distribution Shift: Spurious Features Through the Lens of Training Dynamicscited by 11
- 2022Evaluating Robustness to Dataset Shift via Parametric Robustness Setscited by 10
- 2022Fairness and robustness in anti-causal predictioncited by 10
- 2022A Reduction to Binary Approach for Debiasing Multiclass Datasetscited by 9
- 2023Invariant Anomaly Detection under Distribution Shifts: A Causal Perspectivecited by 8
- 2024Clarify: Improving Model Robustness With Natural Language Correctionscited by 8
- 2022Breaking Correlation Shift via Conditional Invariant Regularizercited by 7
- 2022FAST: Improving Controllability for Text Generation with Feedback Aware Self-Trainingcited by 7
- 2024A Comprehensive Guide to Explainable AI: From Classical Models to LLMscited by 7
- 2023Are demographically invariant models and representations in medical imaging fair?cited by 6
- 2022The Causal Structure of Domain Invariant Supervised Representation Learningcited by 5
- 2023Prominent Roles of Conditionally Invariant Components in Domain Adaptation: Theory and Algorithmscited by 5
- 2024How often are errors in natural language reasoning due to paraphrastic variability?cited by 5
- 2021Learning Invariant Representations with Missing Datacited by 4
- 2023Results on Counterfactual Invariancecited by 4
- 2023Prediction without Preclusion: Recourse Verification with Reachable Setscited by 4
- 2024Causally Inspired Regularization Enables Domain General Representationscited by 4
- 2023Consistent Text Categorization using Data Augmentation in e-Commercecited by 3
- 2024Domain Generalization via Causal Adjustment for Cross-Domain Sentiment Analysiscited by 3
- 2025Measure-Theoretic Anti-Causal Representation Learningcited by 3
- 2022RealPatch: A Statistical Matching Framework for Model Patching with Real Samplescited by 2
50 most cited of 77 All 77 (JSON)
- 2026Structure-agnostic Causal Representation Learning1 Oct 2026
- 2026Beyond the Shadows of Plato's Cave: Evaluating False Memory in Autonomous Agents via Counterfactual Reasoning30 Sep 2026
- 2026Almost Human, Except When It Matters: VoxParity and the Decisions a Voice Should Change28 Sep 2026
- 2026Is invariance all you need for algorithmic fairness? Removing demographic information can create new bias25 Sep 2026
- 2026Prevalence calibration as shortcut mitigation7 Sep 2026
- 2026Gripper-aware Vision Language Action Models25 Aug 2026
- 2026Blind-Spots-Bench: Evaluating Blind Spots in Multimodal Models9 Jul 2026
- 2026Diagnosing Task Insensitivity in Language Agents25 Jun 2026
- 2026Faithful Action-unit Causal Reasoning for Counterfactually Faithful Emotion Explanations14 Jun 2026
- 2026MELD: Multi-Task Equilibrated Learning Detector for AI-Generated Text7 May 2026
- 2026FairMed-XGB: A Bayesian-Optimised Multi-Metric Framework with Explainability for Demographic Equity in Critical Healthcare Data16 Mar 2026
- 2026Factored Causal Representation Learning for Robust Reward Modeling in RLHF29 Jan 2026
38 more
- 2026Causal Pre-training Under the Fairness Lens: An Empirical Study of TabPFN25 Jan 2026
- 2025MIMM-X: Disentangling Spurious Correlations for Medical Image Analysis28 Nov 2025
- 2025Measure-Theoretic Anti-Causal Representation Learning16 Oct 2025
- 2025Does Weak-to-strong Generalization Happen under Spurious Correlations?28 Sep 2025
- 2025Trace Is In Sentences: Unbiased Lightweight ChatGPT-Generated Text Detector23 Sep 2025
- 2025CausalSent: Interpretable Sentiment Classification with RieszNet25 Aug 2025
- 2025Responsiveness Verification: Will Predictions Change? How Much? How Often?2 Jul 2025
- 2025DISCO: Mitigating Bias in Deep Learning with Conditional Distance Correlation13 Jun 2025
- 2025Individualised Counterfactual Examples Using Conformal Prediction Intervals28 May 2025
- 2025Automated Meta Prompt Engineering for Alignment with the Theory of Mind13 May 2025
- 2024A Comprehensive Guide to Explainable AI: From Classical Models to LLMs1 Dec 2024
- 2024Causality-Driven Audits of Model Robustness30 Oct 2024
- 2024Causally Inspired Regularization Enables Domain General Representations25 Apr 2024
- 2024IMO: Greedy Layer-Wise Sparse Representation Learning for Out-of-Distribution Text Classification with Pre-trained Models21 Apr 2024
- 2024How often are errors in natural language reasoning due to paraphrastic variability?17 Apr 2024
- 2024CLIP the Bias: How Useful is Balancing Data in Multimodal Learning?7 Mar 2024
- 2024How Likely Do LLMs with CoT Mimic Human Reasoning?25 Feb 2024
- 2024Domain Generalization via Causal Adjustment for Cross-Domain Sentiment Analysis22 Feb 2024
- 2024Predictive Churn with the Set of Good Models12 Feb 2024
- 2024Clarify: Improving Model Robustness With Natural Language Corrections6 Feb 2024
- 2023Invariant Anomaly Detection under Distribution Shifts: A Causal Perspective21 Dec 2023
- 2023Prominent Roles of Conditionally Invariant Components in Domain Adaptation: Theory and Algorithms19 Sep 2023
- 2023Prediction without Preclusion: Recourse Verification with Reachable Sets24 Aug 2023
- 2023Don't blame Dataset Shift! Shortcut Learning due to Gradients and Cross Entropy24 Aug 2023
- 2023Spuriosity Didn't Kill the Classifier: Using Invariant Predictions to Harness Spurious Features19 Jul 2023
- 2023Results on Counterfactual Invariance17 Jul 2023
- 2023Learning for Counterfactual Fairness from Observational Data17 Jul 2023
- 2023Towards Robust Aspect-based Sentiment Analysis through Non-counterfactual Augmentations24 Jun 2023
- 2023Out-of-Distribution Generalization in Text Classification: Past, Present, and Future23 May 2023
- 2023Consistent Text Categorization using Data Augmentation in e-Commerce9 May 2023
- 2023ReMask: A Robust Information-Masking Approach for Domain Counterfactual Generation4 May 2023
- 2023Are demographically invariant models and representations in medical imaging fair?2 May 2023
- 2023Leveraging sparse and shared feature activations for disentangled representation learning17 Apr 2023
- 2023Beyond Distribution Shift: Spurious Features Through the Lens of Training Dynamics18 Feb 2023
- 2022MMD-B-Fair: Learning Fair Representations with Statistical Testing15 Nov 2022
- 2022DC-Check: A Data-Centric AI checklist to guide the development of reliable machine learning systems9 Nov 2022
- 2022Exploring The Landscape of Distributional Robustness for Question Answering Models22 Oct 2022
- 2022On Feature Learning in the Presence of Spurious Correlations20 Oct 2022
50 newest of 77 All 77 (JSON)
- 2024How Likely Do LLMs with CoT Mimic Human Reasoning?cited by 34
- 2022FaiRR: Faithful and Robust Deductive Reasoning over Natural Languagecited by 29
- 2024How often are errors in natural language reasoning due to paraphrastic variability?cited by 5
- 2026Faithful Action-unit Causal Reasoning for Counterfactually Faithful Emotion Explanationscited by 0
- 2026Faithful Action-unit Causal Reasoning for Counterfactually Faithful Emotion Explanations14 Jun 2026
- 2024How often are errors in natural language reasoning due to paraphrastic variability?17 Apr 2024
- 2024How Likely Do LLMs with CoT Mimic Human Reasoning?25 Feb 2024
- 2022FaiRR: Faithful and Robust Deductive Reasoning over Natural Language19 Mar 2022
- 2026Diagnosing Task Insensitivity in Language Agentscited by 0
- 2026Diagnosing Task Insensitivity in Language Agents25 Jun 2026
- 2026Gripper-aware Vision Language Action Modelscited by 0
- 2026Gripper-aware Vision Language Action Models25 Aug 2026
- 2022Last Layer Re-Training is Sufficient for Robustness to Spurious Correlationscited by 379
- 2021Causal Inference in Natural Language Processing: Estimation, Prediction, Interpretation and Beyondcited by 177
- 2022On Feature Learning in the Presence of Spurious Correlationscited by 145
- 2021Measure and Improve Robustness in NLP Models: A Surveycited by 107
- 2021Desiderata for Representation Learning: A Causal Perspectivecited by 76
- 2022Measuring Causal Effects of Data Statistics on Language Model's `Factual' Predictionscited by 57
- 2022A Comprehensive Study of Image Classification Model Sensitivity to Foregrounds, Backgrounds, and Visual Attributescited by 56
- 2022Causal Discovery in Heterogeneous Environments Under the Sparse Mechanism Shift Hypothesiscited by 54
- 2022Diagnosing failures of fairness transfer across distribution shift in real-world medical settingscited by 45
- 2022Predictive Multiplicity in Probabilistic Classificationcited by 44
- 2021An Investigation of the (In)effectiveness of Counterfactually Augmented Datacited by 42
- 2021Out-of-distribution Generalization in the Presence of Nuisance-Induced Spurious Correlationscited by 41
12 most cited of 70 All 70 (JSON)
- 2026Structure-agnostic Causal Representation Learning1 Oct 2026
- 2026Beyond the Shadows of Plato's Cave: Evaluating False Memory in Autonomous Agents via Counterfactual Reasoning30 Sep 2026
- 2026Almost Human, Except When It Matters: VoxParity and the Decisions a Voice Should Change28 Sep 2026
- 2026Is invariance all you need for algorithmic fairness? Removing demographic information can create new bias25 Sep 2026
- 2026Prevalence calibration as shortcut mitigation7 Sep 2026
- 2026Blind-Spots-Bench: Evaluating Blind Spots in Multimodal Models9 Jul 2026
- 2026MELD: Multi-Task Equilibrated Learning Detector for AI-Generated Text7 May 2026
- 2026FairMed-XGB: A Bayesian-Optimised Multi-Metric Framework with Explainability for Demographic Equity in Critical Healthcare Data16 Mar 2026
- 2026Causal Pre-training Under the Fairness Lens: An Empirical Study of TabPFN25 Jan 2026
- 2025MIMM-X: Disentangling Spurious Correlations for Medical Image Analysis28 Nov 2025
- 2025Measure-Theoretic Anti-Causal Representation Learning16 Oct 2025
- 2025Does Weak-to-strong Generalization Happen under Spurious Correlations?28 Sep 2025
12 newest of 70 All 70 (JSON)