Table of Contents
Fetching ...

Provably Robust Bayesian Counterfactual Explanations under Model Changes

Jamie Duell, Xiuyi Fan

TL;DR

This work tackles the fragility of counterfactual explanations under evolving models by introducing Probabilistically Safe Counterfactual Explanations (PSCE), which enforce δ-safe and ε-robust properties via a Bayesian framework. PSCE optimizes a composite objective that balances validity, robustness under model changes, plausibility on the data manifold, and proximity to the original instance, using posterior predictive distributions and ELBO-based plausibility. The authors prove theoretical bounds (Theorem 1 and Theorem 2) linking model-change robustness to the KL divergence between successive posteriors, and validate PSCE empirically against Bayesian baselines across multiple datasets, showing improved robustness and discriminativeness. The results suggest PSCE provides more reliable, interpretable explanations in dynamic deployment, with potential extensions to online learning and data drift scenarios.

Abstract

Counterfactual explanations (CEs) offer interpretable insights into machine learning predictions by answering ``what if?" questions. However, in real-world settings where models are frequently updated, existing counterfactual explanations can quickly become invalid or unreliable. In this paper, we introduce Probabilistically Safe CEs (PSCE), a method for generating counterfactual explanations that are $δ$-safe, to ensure high predictive confidence, and $ε$-robust to ensure low predictive variance. Based on Bayesian principles, PSCE provides formal probabilistic guarantees for CEs under model changes which are adhered to in what we refer to as the $\langle δ, ε\rangle$-set. Uncertainty-aware constraints are integrated into our optimization framework and we validate our method empirically across diverse datasets. We compare our approach against state-of-the-art Bayesian CE methods, where PSCE produces counterfactual explanations that are not only more plausible and discriminative, but also provably robust under model change.

Provably Robust Bayesian Counterfactual Explanations under Model Changes

TL;DR

This work tackles the fragility of counterfactual explanations under evolving models by introducing Probabilistically Safe Counterfactual Explanations (PSCE), which enforce δ-safe and ε-robust properties via a Bayesian framework. PSCE optimizes a composite objective that balances validity, robustness under model changes, plausibility on the data manifold, and proximity to the original instance, using posterior predictive distributions and ELBO-based plausibility. The authors prove theoretical bounds (Theorem 1 and Theorem 2) linking model-change robustness to the KL divergence between successive posteriors, and validate PSCE empirically against Bayesian baselines across multiple datasets, showing improved robustness and discriminativeness. The results suggest PSCE provides more reliable, interpretable explanations in dynamic deployment, with potential extensions to online learning and data drift scenarios.

Abstract

Counterfactual explanations (CEs) offer interpretable insights into machine learning predictions by answering ``what if?" questions. However, in real-world settings where models are frequently updated, existing counterfactual explanations can quickly become invalid or unreliable. In this paper, we introduce Probabilistically Safe CEs (PSCE), a method for generating counterfactual explanations that are -safe, to ensure high predictive confidence, and -robust to ensure low predictive variance. Based on Bayesian principles, PSCE provides formal probabilistic guarantees for CEs under model changes which are adhered to in what we refer to as the -set. Uncertainty-aware constraints are integrated into our optimization framework and we validate our method empirically across diverse datasets. We compare our approach against state-of-the-art Bayesian CE methods, where PSCE produces counterfactual explanations that are not only more plausible and discriminative, but also provably robust under model change.
Paper Structure (34 sections, 2 theorems, 59 equations, 18 figures, 18 tables)

This paper contains 34 sections, 2 theorems, 59 equations, 18 figures, 18 tables.

Key Result

Theorem 1

Let $p_1(\omega \vert \mathcal{D}_{\text{prev}})$ be a probabilistic model's posterior distribution over its parameters $\omega$. After a data update $\mathcal{D}_{\text{prev}} \cup \mathcal{D}_{\text{new}}$, the new posterior is $p_2(\omega \vert \mathcal{D}_{\text{prev}} \cup \mathcal{D}_{\text{ne where, $p_2(\omega \vert \cdot) = p_2(\omega \vert \mathcal{D}_{prev} \cup \mathcal{D}_{new})$ and

Figures (18)

  • Figure 1: Counterfactual examples for a PneumoniaMNIST medmnistv1medmnistv2 image, transitioning from 'pneumonia'(on the left) to 'normal'. The output from our proposed method, PSCE, is shown alongside other Bayesian approaches discussed in this work.
  • Figure 2: Predictive distribution for a CE before (p1) and after (p2) a 5% data increment. The PSCE-generated CE remains confidently classified, and the new prediction is well-described by our theoretical lower bound.
  • Figure 3: Verification of a closed form solution to the $D_{\mathrm{KL}}$ term presented in the inequality of Theorem 1 associated with the worked example in equation \ref{['ineq_closed2']}.
  • Figure 4: 1% increments in training data evaluating the theoretical bound vs computed approximate bound subject to the posterior over model weights.
  • Figure 5: Comparison of the theoretical bound and the computed approximate bound under the posterior over model weights.
  • ...and 13 more figures

Theorems & Definitions (11)

  • Example 1
  • Definition 1: Bayesian Classifier
  • Definition 2: Counterfactual Instance
  • Definition 3: $\delta$-safe Counterfactual
  • Definition 4: $\epsilon$-robust Counterfactual
  • Definition 5: $\langle\delta,\epsilon\rangle$-Set
  • Theorem 1
  • Theorem 2
  • proof
  • proof
  • ...and 1 more