[Paper Review] On the Connections between Counterfactual Explanations and Adversarial Examples.
This paper formally establishes theoretical and empirical connections between counterfactual explanations and adversarial examples, demonstrating that several prominent methods—such as Wachter et al. and Carlini & Wagner with MSE loss—are mathematically equivalent under specific conditions. It further bounds the distance between counterfactuals and adversarial examples for linear models and validates these findings across synthetic and real-world datasets.
Counterfactual explanations and adversarial examples have emerged as critical research areas for addressing the explainability and robustness goals of machine learning (ML). While counterfactual explanations were developed with the goal of providing recourse to individuals adversely impacted by algorithmic decisions, adversarial examples were designed to expose the vulnerabilities of ML models. While prior research has hinted at the commonalities between these frameworks, there has been little to no work on systematically exploring the connections between the literature on counterfactual explanations and adversarial examples. In this work, we make one of the first attempts at formalizing the connections between counterfactual explanations and adversarial examples. More specifically, we theoretically analyze salient counterfactual explanation and adversarial example generation methods, and highlight the conditions under which they behave similarly. Our analysis demonstrates that several popular counterfactual explanation and adversarial example generation methods such as the ones proposed by Wachter et. al. and Carlini and Wagner (with mean squared error loss), and C-CHVAE and natural adversarial examples by Zhao et. al. are equivalent. We also bound the distance between counterfactual explanations and adversarial examples generated by Wachter et. al. and DeepFool methods for linear models. Finally, we empirically validate our theoretical findings using extensive experimentation with synthetic and real world datasets.
Motivation & Objective
- To systematically explore the theoretical connections between counterfactual explanations and adversarial examples, two key areas in ML interpretability and robustness.
- To identify conditions under which widely used counterfactual and adversarial example generation methods produce equivalent results.
- To formally bound the distance between counterfactual explanations and adversarial examples for linear models.
- To empirically validate theoretical findings using synthetic and real-world datasets.
Proposed method
- Theoretical analysis of salient counterfactual explanation and adversarial example generation methods, focusing on optimization objectives and constraints.
- Formal derivation of equivalence between methods such as Wachter et al. and Carlini & Wagner (with MSE loss), and between C-CHVAE and natural adversarial examples by Zhao et al.
- Derivation of a theoretical bound on the distance between counterfactuals generated by Wachter et al. and adversarial examples from the DeepFool method for linear models.
- Empirical evaluation using both synthetic and real-world datasets to validate theoretical equivalences and bounds.
- Use of mean squared error loss as a unifying objective in the theoretical analysis of method equivalence.
- Application of gradient-based optimization techniques to generate both counterfactuals and adversarial examples under shared constraints.
Experimental results
Research questions
- RQ1Under what conditions are counterfactual explanation generation methods equivalent to adversarial example generation methods?
- RQ2How do the generated counterfactuals and adversarial examples compare in terms of perturbation distance for linear models?
- RQ3To what extent do methods like Wachter et al. and Carlini & Wagner (with MSE loss) produce identical or equivalent outputs?
- RQ4Are C-CHVAE and natural adversarial examples by Zhao et al. theoretically equivalent under the same formulation?
- RQ5How well do theoretical equivalences and bounds hold in practice across diverse datasets?
Key findings
- Several widely used counterfactual explanation and adversarial example generation methods, including those by Wachter et al. and Carlini & Wagner (with mean squared error loss), are theoretically equivalent under specific conditions.
- The C-CHVAE method for counterfactual generation is equivalent to natural adversarial examples generated by Zhao et al. under the same optimization framework.
- A theoretical upper bound on the distance between counterfactuals from Wachter et al. and adversarial examples from the DeepFool method is derived for linear models.
- Empirical results confirm the theoretical equivalences across both synthetic and real-world datasets, validating the consistency of the findings.
- The study reveals that the choice of loss function—particularly mean squared error—plays a critical role in unifying the objectives of counterfactuals and adversarial examples.
- The findings suggest that robustness and recourse can be studied through a unified lens, with shared optimization dynamics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.