Skip to main content
QUICK REVIEW

[Paper Review] Consistent Counterfactuals for Deep Models

Emily Black, Zifan Wang|arXiv (Cornell University)|Oct 6, 2021
Explainable Artificial Intelligence (XAI)Computer Science57 references7 citations
TL;DR

This paper proposes Stable Neighbor Search (SNS), a method to generate consistent counterfactual explanations for deep models under small training variations such as weight initialization and data perturbations. By prioritizing counterfactuals in regions of low local Lipschitz constant and high prediction confidence, SNS achieves significantly higher consistency across similar models while maintaining low counterfactual cost, outperforming existing methods in stability and reliability on tabular benchmarks.

ABSTRACT

Counterfactual examples are one of the most commonly-cited methods for explaining the predictions of machine learning models in key areas such as finance and medical diagnosis. Counterfactuals are often discussed under the assumption that the model on which they will be used is static, but in deployment models may be periodically retrained or fine-tuned. This paper studies the consistency of model prediction on counterfactual examples in deep networks under small changes to initial training conditions, such as weight initialization and leave-one-out variations in data, as often occurs during model deployment. We demonstrate experimentally that counterfactual examples for deep models are often inconsistent across such small changes, and that increasing the cost of the counterfactual, a stability-enhancing mitigation suggested by prior work in the context of simpler models, is not a reliable heuristic in deep networks. Rather, our analysis shows that a model's local Lipschitz continuity around the counterfactual is key to its consistency across related models. To this end, we propose Stable Neighbor Search as a way to generate more consistent counterfactual explanations, and illustrate the effectiveness of this approach on several benchmark datasets.

Motivation & Objective

  • To investigate the consistency of counterfactual explanations across deep models with minor training variations, such as different random seeds or leave-one-out data changes.
  • To evaluate whether increasing counterfactual cost—a heuristic from simpler models—improves consistency in deep networks.
  • To identify reliable indicators of counterfactual stability under model perturbations, particularly in deep learning settings.
  • To develop and validate a new method for generating counterfactuals that are both consistent and cost-effective across similar model variants.

Proposed method

  • Propose Stable Neighbor Search (SNS), a search-based method that identifies counterfactuals in regions of the input space with low local Lipschitz constant and high model confidence.
  • Define and compute the local Lipschitz constant around candidate counterfactuals to estimate sensitivity to model weight and data perturbations.
  • Use confidence scores from the model’s output logits to prioritize counterfactuals that are robust to small changes in the model parameters.
  • Integrate SNS as a post-processing step on top of existing counterfactual generation methods (e.g., min-ℓ₁, min-ℓ₂, PGD) to improve consistency.
  • Formulate the search objective as minimizing distance to the original input while maximizing confidence and minimizing local Lipschitz constant.
  • Empirically evaluate SNS on benchmark tabular datasets (German Credit, Seizure, CTG, Warfarin, HELOC, Taiwanese Credit) under 100 retraining runs with varying seeds and data subsets.

Experimental results

Research questions

  • RQ1How consistent are counterfactual explanations generated by standard methods across deep models with minor training variations?
  • RQ2Does increasing the cost of a counterfactual reliably improve its consistency across similar models in deep networks?
  • RQ3What model properties—such as Lipschitz continuity and prediction confidence—predict counterfactual consistency under model perturbations?
  • RQ4Can a search strategy that prioritizes low local Lipschitz and high confidence produce more consistent counterfactuals than cost-minimization alone?
  • RQ5How does the proposed Stable Neighbor Search (SNS) method compare to existing counterfactual generation techniques in terms of consistency and cost?

Key findings

  • Standard counterfactual generation methods exhibit low consistency across models with minor training changes, with invalidation rates as high as 78% on the German Credit dataset.
  • Increasing counterfactual cost is insufficient to ensure consistency in deep models, as high-cost examples still frequently fail to generalize across similar models.
  • Counterfactuals located in regions of low local Lipschitz constant and high model confidence show significantly higher consistency, with invalidation rates dropping to 0.00±0.00 across all datasets when using SNS.
  • SNS reduces counterfactual cost by up to 50% compared to baseline methods while achieving near-zero invalidation rates, e.g., ℓ₂ cost of 2.78±0.49 on Taiwanese Credit vs. 4.24±2.23 for Pawelczyk et al.
  • The method achieves near-perfect consistency (0.00±0.00 invalidation rate) across all datasets and retraining scenarios when applied to min-ℓ₁, min-ℓ₂, and PGD-based baselines.
  • Theoretical analysis confirms that small Lipschitz constants and high confidence bound the change in decision boundary under model fine-tuning, explaining the empirical success of SNS.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.