Skip to main content
QUICK REVIEW

[Paper Review] Robust Counterfactual Explanations for Neural Networks With Probabilistic Guarantees

Faisal Hamman, Erfaun Noorani|arXiv (Cornell University)|May 19, 2023
Explainable Artificial Intelligence (XAI)Computer Science3 citations
TL;DR

This paper proposes a novel stability measure for counterfactual explanations in neural networks that ensures robustness under naturally-occurring model changes—arbitrary parameter shifts with limited impact on predictions on the data manifold. By leveraging concentration bounds for Lipschitz functions of Gaussian perturbations, the method provides probabilistic guarantees that high-stability counterfactuals remain valid after model updates, outperforming prior approaches in validity, cost efficiency, and realism across multiple datasets.

ABSTRACT

There is an emerging interest in generating robust counterfactual explanations that would remain valid if the model is updated or changed even slightly. Towards finding robust counterfactuals, existing literature often assumes that the original model $m$ and the new model $M$ are bounded in the parameter space, i.e., $\| ext{Params}(M){-} ext{Params}(m)\|{<}Δ$. However, models can often change significantly in the parameter space with little to no change in their predictions or accuracy on the given dataset. In this work, we introduce a mathematical abstraction termed $ extit{naturally-occurring}$ model change, which allows for arbitrary changes in the parameter space such that the change in predictions on points that lie on the data manifold is limited. Next, we propose a measure -- that we call $ extit{Stability}$ -- to quantify the robustness of counterfactuals to potential model changes for differentiable models, e.g., neural networks. Our main contribution is to show that counterfactuals with sufficiently high value of $ extit{Stability}$ as defined by our measure will remain valid after potential $ extit{naturally-occurring}$ model changes with high probability (leveraging concentration bounds for Lipschitz function of independent Gaussians). Since our quantification depends on the local Lipschitz constant around a data point which is not always available, we also examine practical relaxations of our proposed measure and demonstrate experimentally how they can be incorporated to find robust counterfactuals for neural networks that are close, realistic, and remain valid after potential model changes. This work also has interesting connections with model multiplicity, also known as, the Rashomon effect.

Motivation & Objective

  • To address the fragility of counterfactual explanations under model updates, which can invalidate suggestions even with minor changes.
  • To formalize a new abstraction—naturally-occurring model change—allowing arbitrary parameter shifts as long as predictions on the data manifold remain stable.
  • To introduce a stability measure that quantifies counterfactual robustness and provides probabilistic guarantees of validity after such model changes.
  • To develop practical algorithms that incorporate this stability measure to generate realistic, low-cost, and robust counterfactuals for neural networks.
  • To connect the proposed framework with model multiplicity (Rashomon effect), emphasizing the likelihood of naturally occurring model variants.

Proposed method

  • Introduces the concept of 'naturally-occurring model change' as a relaxation of parameter-bound assumptions, allowing arbitrary parameter shifts as long as prediction changes on the data manifold are bounded.
  • Defines a stability measure $ R_{k, au}^{(x,m)} = \frac{1}{k}\sum_{x_i \in N_{x,k}} \left( m(x_i) - \gamma_x \|x - x_i\| \right) $, where $ \gamma_x $ is the local Lipschitz constant of the model around the counterfactual point $ x $.
  • Uses concentration inequalities for Lipschitz functions of independent Gaussians to derive probabilistic guarantees: high stability implies high probability of validity after model changes.
  • Proposes practical relaxations of the stability measure that avoid explicit Lipschitz estimation, enabling efficient optimization in neural networks.
  • Develops two algorithms: T-Rex:I (for cost-optimized counterfactuals) and T-Rex:NN (for data-supported, nearest-neighbor-like counterfactuals) that incorporate the stability measure.
  • Employs gradient-based optimization with Gaussian perturbations to estimate and maximize stability during counterfactual generation.

Experimental results

Research questions

  • RQ1Can we provide theoretical guarantees that counterfactual explanations remain valid after arbitrary, yet realistic, model updates?
  • RQ2How can we quantify the robustness of a counterfactual to model changes without assuming bounded parameter shifts?
  • RQ3What is the relationship between model multiplicity (Rashomon effect) and the robustness of counterfactual explanations?
  • RQ4Can we design practical algorithms that generate counterfactuals with high stability and thus high validity under model changes?
  • RQ5How does the proposed stability measure compare to simpler heuristics based on prediction or mean output in terms of robustness?

Key findings

  • T-Rex:I achieves significantly higher counterfactual validity than minimum-cost and nearest-neighbor baselines across HELOC, German Credit, and CTG datasets, with comparable or better cost and LOF.
  • T-Rex:I matches or exceeds the validity of SNS and ROAR while achieving lower cost and higher LOF, demonstrating superior trade-offs between robustness and feasibility.
  • The T-Rex:NN algorithm improves robustness over standard nearest-neighbor counterfactuals while maintaining high data support (LOF), at the cost of increased optimization cost.
  • Ablation studies show that incorporating variability in predictions (via Gaussian sampling) leads to more robust counterfactuals than relying solely on mean predictions or model outputs.
  • The proposed stability measure with probabilistic guarantees outperforms simpler robustness heuristics, especially under data and weight initialization shifts.
  • Theoretical analysis confirms that counterfactuals with high stability are highly likely to remain valid after naturally-occurring model changes, validated empirically across multiple datasets and metrics.

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.