arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2609.07917v1 [cs.LG] 07 Sep 2026

AVCG: A Generalized Variational Framework for Counterfactual Generation under Hypothesis Distributions

Jamie Duell    Alejandro Jimenez Rodriguez    Mahault Albarracin
Abstract

Counterfactual explanations formalize “what-if" scenarios by identifying modifications to an input instance that obtain a desired alternative prediction. Traditionally, whether generated via instance-specific optimization or amortized single-pass models, these approaches rely on a single, deterministic point-estimate predictor. However, this ignores predictive uncertainty and hypothesis variability, leading to brittle explanations that frequently become invalid if the underlying model is retrained or updated. To address this fragility, we propose the Amortized Variational Counterfactual Generator (AVCG), a generalized optimization framework that formulates counterfactual generation as optimization over an arbitrary distribution of plausible predictive hypotheses rather than a single deterministic predictor. This formulation naturally accommodates Bayesian posteriors, Rashomon-restricted hypothesis spaces, and other uncertainty representations within a unified optimization framework. Evaluation across multiple benchmark datasets demonstrates that the AVCG framework produces counterfactual explanations that remain highly valid under predictive uncertainty and model changes, while maintaining competitive plausibility and single-pass runtime performance.

1School of Computing and Digital Technologies, Sheffield Hallam University

2Centre of Excellence in AI and Robotics (CEAIR), Sheffield Hallam University

3Laboratoire d’analyse cognitive de l’information (LANCI), Université du Québec à Montréal

4Institut Santé et société (ISS), Université du Québec à Montréal

5Institut de recherches et d’études féministes (IREF), Université du Québec à Montréal

j.duell@shu.ac.uk

Introduction

The deployment of machine learning models in high-stakes domains has necessitated the development of algorithmic recourse, typically provided through counterfactual explanations. However, a critical vulnerability in standard counterfactual generation is its reliance on a single, fixed predictive model. Explanations optimized against a deterministic decision boundary are often notoriously brittle; they frequently fail to remain valid if the model is retrained with a different random seed, subjected to minor data shifts, or if there is inherent epistemic uncertainty in the parameter space (Jiang et al. 2024; Sokol and Hüllermeier 2025).

To provide reliable recourse, counterfactual generation must transition from targeting a single point-estimate predictor to optimizing over distributions of plausible hypotheses. Such hypothesis distributions arise naturally in several settings. Bayesian predictive models represent predictive uncertainty through posterior inference, as expressed through Bayesian Neural Networks (Blundell et al. 2015) and Monte Carlo Dropout (Gal and Ghahramani 2016), while model multiplicity motivates restricting attention to empirically near-optimal hypotheses, such as the Rashomon set. Many existing uncertainty-aware counterfactual approaches, however, are typically tied to a specific uncertainty representation and frequently rely on computationally expensive post-hoc optimization at inference time. Notably, existing approaches remain specialized to particular uncertainty representations e.g., (Schut et al. 2021; Duell et al. 2024) rather than providing a unified optimization framework capable of operating over arbitrary hypothesis distributions. For example, while Bayesian approaches optimize robustness in expectation under a posterior distribution, they do not directly support optimization over constrained hypothesis spaces, such as the Rashomon set (Hsu et al. 2025), where the objective is robustness across empirically near-optimal models rather than posterior expectation alone. Recent work has shown that Monte Carlo Dropout can be used to construct empirical approximations of such Rashomon sets by applying dropout to pretrained weights (Hsu et al. 2024).

To address these limitations, we propose the Amortized Variational Counterfactual Generator (AVCG), a generalized optimization framework for counterfactual generation over arbitrary hypothesis distributions. Unlike existing uncertainty-aware approaches (Duell et al. 2024; Batten et al. 2025; Schut et al. 2021) that predominantly generate explanations through iterative post-hoc optimization at inference time, AVCG learns a single amortized generator that produces counterfactuals in one forward pass while optimizing expected validity with respect to an arbitrary hypothesis distribution. Thus, the proposed AVCG framework generalizes the optimization objective beyond deterministic or Bayesian predictors and retains the computational efficiency required for practical deployment. Thus, to summarise AVCG shifts counterfactual generation from optimizing against a single decision boundary to optimizing against an entire distribution of plausible decision boundaries. This abstraction decouples the optimization objective from the mechanism used to represent uncertainty, allowing new uncertainty models or constrained hypothesis spaces to be incorporated without redesigning the counterfactual generation framework.

To this end, the contributions of this work can be summarized as follows:

  1. 1.

    We formulate counterfactual generation as optimization over arbitrary hypothesis distributions, introducing AVCG, a generalized variational framework independent of any specific uncertainty representation.

  2. 2.

    We derive a generalized variational lower bound whose predictive objective is taken with respect to arbitrary hypothesis distributions, subsuming existing Bayesian formulations as special cases.

  3. 3.

    We demonstrate the generality of AVCG by instantiating two fundamentally different robustness paradigms: Bayesian uncertainty and Rashomon model multiplicity, within a single optimization framework.

  4. 4.

    We provide theoretical and empirical evaluations demonstrating robustness, validity and inference speed.

Preliminaries

We formalize our framework by assuming a generalized predictive space that accounts for hypothesis variability. Given some parametric model fθ:ℝd→[0,1]f_{\theta}:\mathbb{R}^{d}\rightarrow[0,1], let PΦ​(θ)P_{\Phi}(\theta) denote a generalized probability distribution over the model parameters θ\theta, defining the space of plausible hypotheses.

Definition 1 (Hypothesis Distribution).

Let ℋ={fθ:θ∈Θ}\mathcal{H}=\{f_{\theta}:\theta\in\Theta\} denote a hypothesis space of predictive models parameterized by θ\theta. A hypothesis distribution PΦ​(θ)P_{\Phi}(\theta), parameterized by Φ\Phi, is a probability distribution over the parameter space Θ\Theta representing a practitioner’s prior beliefs or constraints over plausible predictors.

Definition 2 (Generalized Predictive Distribution).

Given a parametric model fθ(⋅)=p(y∣⋅,θ)f_{\theta}(\cdot)=p(y\mid\cdot,\theta) and a hypothesis distribution PΦ​(θ)P_{\Phi}(\theta), the predictive distribution for any input 𝐱∈ℝd\mathbf{x}\in\mathbb{R}^{d} is defined by marginalizing over the hypothesis space:

pΦ​(y∣𝐱)=∫p⁡(y∣𝐱,θ)​PΦ​(θ)​𝑑θ,\displaystyle p_{\Phi}(y\mid\mathbf{x})=\int p(y\mid\mathbf{x},\theta)\,P_{\Phi}(\theta)\,d\theta,

which can equivalently be written as the expectation

𝔼θ∼PΦ​(θ)​[fθ​(𝐱)].\displaystyle\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}[f_{\theta}(\mathbf{x})].

A counterfactual instance is traditionally generated to flip the prediction of a single point-estimate model. A counterfactual instance in a model structured for a pointwise estimate is such that:

Definition 3 (Counterfactual Instance).

Given an instance 𝐱∈ℝd\mathbf{x}\in\mathbb{R}^{d}, an instance 𝐱′∈ℝd\mathbf{x}^{\prime}\in\mathbb{R}^{d}, is said to be a counterfactual instance of 𝐱\mathbf{x}, if for some counterfactual generator g:ℝd→ℝdg:\mathbb{R}^{d}\rightarrow\mathbb{R}^{d} s.t. g⁡(𝐱)=𝐱′g(\mathbf{x})=\mathbf{x}^{\prime}, then:

arg⁡max𝑦​fθ​(𝐱)≠arg⁡max𝑦​fθ​(𝐱′).\displaystyle\underset{y}{\arg\max}\ f_{\theta}(\mathbf{x})\neq\underset{y}{\arg\max}\ f_{\theta}(\mathbf{x}^{\prime}).

To ensure robustness over hypothesis distributions, we define a robust counterfactual instance as follows:

Definition 4 (Robust Counterfactual Instance).

Given a factual instance 𝐱∈ℝd\mathbf{x}\in\mathbb{R}^{d} and a counterfactual generator g:ℝd→ℝdg:\mathbb{R}^{d}\rightarrow\mathbb{R}^{d} such that g⁡(𝐱)=𝐱′g(\mathbf{x})=\mathbf{x}^{\prime}, the instance 𝐱′\mathbf{x}^{\prime} is a robust counterfactual instance if:

arg⁡max𝑦​pΦ​(y∣𝐱)≠arg⁡max𝑦​pΦ​(y∣𝐱′).\displaystyle\underset{y}{\arg\max}\ p_{\Phi}(y\mid\mathbf{x})\neq\underset{y}{\arg\max}\ p_{\Phi}(y\mid\mathbf{x}^{\prime}).

Methodology

We derive a novel, generalized variational objective for counterfactual generation that accounts for predictive uncertainty by taking the expectation over PΦ​(θ)P_{\Phi}(\theta). We then instantiate this general framework into two distinct mechanisms to handle different robustness desiderata: the Bayesian posterior (AVCG-B) and the Rashomon-restricted posterior (AVCG-R).

Refer to caption
Figure 1: Overview of the AVCG Framework. In this work, PΦP_{\Phi} is instantiated as a Bayesian parametric posterior P⁡(θ∣D)P(\theta\mid D) or Rashomon set PR​(θ)P_{R}(\theta).

The Generalized AVCG Framework

To construct an amortized counterfactual generator, our goal is to maximize the predictive probability that the generated counterfactual samples achieve the desired label y′y^{\prime} given the factual input 𝐱\mathbf{x}. Operating within a latent-variable generative model, the true predictive distribution requires marginalizing over both the latent space 𝐳\mathbf{z} and the classifier’s parameter space θ\theta.

Assuming the prior over the latent distribution p⁡(𝐳)p(\mathbf{z}) is independent of the model’s hypothesis space PΦ​(θ)P_{\Phi}(\theta), and that the generator gϕg_{\phi} is parameterized independently of θ\theta, we express the predictive objective as a double integral. We introduce a variational posterior qψ​(𝐳∣y′,𝐱)q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x}) to derive the lower bound:

ℒ⁡(𝐱,y′)=log⁡∫∫⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))​p​(𝐳)​PΦ​(θ)​𝑑𝐳​𝑑θ\displaystyle\mathcal{L}(\mathbf{x},y^{\prime})=\log\int\int P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))p(\mathbf{z})P_{\Phi}(\theta)d\mathbf{z}d\theta
=log⁡∫∫⁡qψ​(𝐳∣y′,𝐱)​Pθ​(y′∣gϕ​(𝐱,y′,𝐳))​p​(𝐳)​PΦ​(θ)qψ​(𝐳∣y′,𝐱)​𝑑𝐳​𝑑θ\displaystyle=\log\int\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\frac{P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))p(\mathbf{z})P_{\Phi}(\theta)}{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}d\mathbf{z}d\theta
≥∫qψ​(𝐳∣y′,𝐱)​(∫PΦ​(θ)​log⁡(Pθ​(y′∣gϕ​(𝐱,y′,𝐳)))​𝑑θ)​𝑑𝐳\displaystyle\geq\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\bigg(\int P_{\Phi}(\theta)\log\ (P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z})))d\theta\bigg)d\mathbf{z}
+∫qψ(𝐳∣y′,𝐱)logp⁡(𝐳)qψ​(𝐳∣y′,𝐱)d𝐳\displaystyle+\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\log\ \frac{p(\mathbf{z})}{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}d\mathbf{z}
(Jensen’s inequality and qψ​(𝐳∣y′,𝐱)⟂PΦ​(θ)q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\perp P_{\Phi}(\theta))
=𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼PΦ​(θ)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]]\displaystyle=\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}\bigg[\log\ P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg]
+∫qψ(𝐳∣y′,𝐱)logp⁡(𝐳)qψ​(𝐳∣y′,𝐱)d𝐳\displaystyle+\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\log\ \frac{p(\mathbf{z})}{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}d\mathbf{z}
=𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼PΦ​(θ)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]]\displaystyle=\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}\bigg[\log\ P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg]
+(−DK​L(qψ(𝐳∣y′,𝐱)∣∣p(𝐳))).\displaystyle+\bigg(-D_{KL}(q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\mid\mid p(\mathbf{z}))\bigg).

Where qψq_{\psi} is the encoder, gϕg_{\phi} is the generative model, and PθP_{\theta} is the target parametric predictor.

Proximity Regularization

Finally, to align with standard counterfactual desiderata ensuring that interventions remain realistically actionable (Mothilal et al. 2020; Sokol and Hüllermeier 2025), we incorporate a proximity constraint using a distance function d⁡(⋅)d(\cdot):

𝔼qψ​(𝐳∣y′,𝐱)​[d⁡(gϕ​(𝐱,y′,𝐳),𝐱)].\displaystyle\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[d(g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}),\mathbf{x})\bigg].

Let Dtrain={(𝐱i,yi′)}i=1ND_{\text{train}}=\{(\mathbf{x}_{i},y^{\prime}_{i})\}_{i=1}^{N}, and

RΦ​(𝐱′)=𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼PΦ​(θ)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]]\displaystyle R_{\Phi}(\mathbf{x}^{\prime})=\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}\bigg[\log\ P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg]

The final dataset-level objective for the generalized framework is:

G(ϕ,ψ)=∑i=1N[−RΦ(𝐱′)\displaystyle{G}(\phi,\psi)=\sum^{N}_{i=1}\bigg[-R_{\Phi}(\mathbf{x}^{\prime}) +DK​L(qψ(𝐳∣yi′,𝐱i)∣∣p(𝐳))\displaystyle+D_{KL}(q_{\psi}(\mathbf{z}\mid y_{i}^{\prime},\mathbf{x}_{i})\mid\mid p(\mathbf{z}))
+λ𝔼qψ​(𝐳∣yi′,𝐱)[d(gϕ(𝐱i,yi′,𝐳),𝐱)]].\displaystyle+\lambda\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y_{i}^{\prime},\mathbf{x})}\bigg[d(g_{\phi}(\mathbf{x}_{i},y^{\prime}_{i},\mathbf{z}),\mathbf{x})\bigg]\bigg].

whereby, optimal parameters ϕ∗\phi^{*} and ψ∗\psi^{*} are obtained by minimising the objective, such that:

{ϕ∗,ψ∗}=arg⁡minϕ,ψ​G​(𝐱).\displaystyle\{\phi^{*},\psi^{*}\}=\underset{\phi,\psi}{\arg\min}\ {G}(\mathbf{x}).

AVCG-B: The Bayesian Instantiation

When the practitioner’s goal is to account for epistemic uncertainty and optimize for expected likelihood, we instantiate the general framework by setting PΦ​(θ)P_{\Phi}(\theta) to the full Bayesian posterior P⁡(θ∣D)P(\theta\mid D), such that our risk function is defined as:

RB​(𝐱′)=𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼P⁡(θ∣D)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]],\displaystyle R_{B}(\mathbf{x}^{\prime})=\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P(\theta\mid D)}\bigg[\log\ P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg],

where we can substitute RΦ​(𝐱′)R_{\Phi}(\mathbf{x}^{\prime}) with RB​(𝐱′)R_{B}(\mathbf{x}^{\prime}) for the Bayesian posterior.

In practice, we approximate this posterior using stochastic weight masking via Monte Carlo Dropout (Gal and Ghahramani 2016). During the training of AVCG, the generator optimizes against a dynamically sampled distribution of stochastic dropout masks. This forces the generated counterfactuals to achieve validity in expectation across the uncertainty of the network’s weights, making it ideal for average-case generalization.

AVCG-R: The Rashomon-Restricted Instantiation

While the Bayesian posterior provides a probabilistic distribution of models, it does not explicitly enforce hard performance boundaries. In high-stakes domains, robustness across a constrained set of empirically near-optimal models may be desirable, namely the Rashomon set.

To target robustness over this empirically constrained hypothesis space, we instantiate PΦ​(θ)P_{\Phi}(\theta) as the Rashomon-restricted distribution PR​(θ)P_{R}(\theta). We define the empirical Rashomon set ΘR\Theta_{R} as:

ΘR={θ:L⁡(θ)≤L∗+ϵ},\displaystyle\Theta_{R}=\{\theta:L(\theta)\leq L^{*}+\epsilon\},

where ϵ\epsilon specifies the maximum allowable deviation from the optimal validation loss L∗L^{*}. The corresponding restricted posterior is:

PR​(θ)=P(θ∣D)𝟏[θ∈ΘR]∫ΘRP⁡(θ∣D)​𝑑θ.\displaystyle P_{R}(\theta)=\frac{P(\theta\mid D)\mathbf{1}[\theta\in\Theta_{R}]}{\int_{\Theta_{R}}P(\theta\mid D)\,d\theta}.

To implement this reliably, AVCG-R replaces the stochastic dropout of the Bayesian instantiation with a set of deterministic, frozen weight masks. Each mask is independently evaluated on a validation set, and only those satisfying L⁡(θi)≤L∗+ϵL(\theta_{i})\leq L^{*}+\epsilon are retained. The generator then optimizes uniformly over this fixed hypothesis space.

Modifying our loss function, we can instead integrate over the PR​(θ)P_{R}(\theta), such that our risk function conditioned on some ϵ\epsilon is defined as:

Rϵ​(𝐱′)=𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼PR​(θ)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]],\displaystyle R_{\epsilon}(\mathbf{x}^{\prime})=\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P_{R}(\theta)}\bigg[\log\ P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg],

where we can substitute RΦ​(𝐱′)R_{\Phi}(\mathbf{x}^{\prime}) with Rϵ​(𝐱′)R_{\epsilon}(\mathbf{x}^{\prime}).

Theoretical Analysis

We begin by analysing the stability of the AVCG objective under divergence between hypothesis distributions.

Theorem 1 (AVCG Stability).

Assume that there exists a constant M>0M>0 such that

|log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))|≤M|\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))|\leq M

for every θ\theta in the supports of PΦaP_{\Phi}^{a} and PΦbP_{\Phi}^{b}. Let

La​(ϕ,ψ)=RΦa​(𝐱′)\displaystyle L_{a}(\phi,\psi)=R^{a}_{\Phi}(\mathbf{x}^{\prime}) +DK​L(qψ(𝐳∣yi′,𝐱i)∣∣p(𝐳))\displaystyle+D_{KL}(q_{\psi}(\mathbf{z}\mid y_{i}^{\prime},\mathbf{x}_{i})\mid\mid p(\mathbf{z}))
+λ​𝔼qψ​(𝐳∣yi′,𝐱)​[d⁡(gϕ​(𝐱i,yi′,𝐳),𝐱)],\displaystyle+\lambda\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y_{i}^{\prime},\mathbf{x})}\bigg[d(g_{\phi}(\mathbf{x}_{i},y^{\prime}_{i},\mathbf{z}),\mathbf{x})\bigg],

and

Lb​(ϕ,ψ)=RΦb​(𝐱′)\displaystyle L_{b}(\phi,\psi)=R^{b}_{\Phi}(\mathbf{x}^{\prime}) +DK​L(qψ(𝐳∣yi′,𝐱i)∣∣p(𝐳))\displaystyle+D_{KL}(q_{\psi}(\mathbf{z}\mid y_{i}^{\prime},\mathbf{x}_{i})\mid\mid p(\mathbf{z}))
+λ​𝔼qψ​(𝐳∣yi′,𝐱)​[d⁡(gϕ​(𝐱i,yi′,𝐳),𝐱)],\displaystyle+\lambda\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y_{i}^{\prime},\mathbf{x})}\bigg[d(g_{\phi}(\mathbf{x}_{i},y^{\prime}_{i},\mathbf{z}),\mathbf{x})\bigg],

denote the AVCG objectives induced by the hypothesis distributions PΦaP_{\Phi}^{a} and PΦbP_{\Phi}^{b}, respectively, such that:

RΦ(⋅)​(𝐱′)=𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼PΦ(⋅)​(θ)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]]\displaystyle R^{(\cdot)}_{\Phi}(\mathbf{x}^{\prime})=\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P^{(\cdot)}_{\Phi}(\theta)}\bigg[\log\ P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg]

where (⋅){(\cdot)} can be aa and bb respectively. Then, for fixed encoder and generator parameters (ϕ,ψ)(\phi,\psi),

|La​(ϕ,ψ)−Lb​(ϕ,ψ)|≤2​M​DK​L(PΦa∣∣PΦb).|L_{a}(\phi,\psi)-L_{b}(\phi,\psi)|\leq\sqrt{2}M\sqrt{D_{KL}(P_{\Phi}^{a}\mid\mid P_{\Phi}^{b})}.

This illustrates that small changes in the learned hypothesis distribution induce proportionally small changes in the optimization objective, providing stability under hypothesis class uncertainty.

Proposition 1.

Let fθ​(𝐱′):=Pθ​(y′∣gϕ​(⋅))f_{\theta}(\mathbf{x}^{\prime}):=P_{\theta}(y^{\prime}\mid g_{\phi}(\cdot)). For any 0<γ<10<\gamma<1 and fθ​(𝐱′)∈[0,1],f_{\theta}(\mathbf{x}^{\prime})\in[0,1],

ℙ⁡(fθ​(𝐱′)≥γ)≥1−1−𝔼θ∼PΦ​(θ)​[fθ​(𝐱′)]1−γ.\displaystyle\mathbb{P}(f_{\theta}(\mathbf{x}^{\prime})\geq\gamma)\geq 1-\frac{1-\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}[f_{\theta}(\mathbf{x}^{\prime})]}{1-\gamma}.

This bound shows that optimizing the generalized AVCG objective specifically under some hypothesis set PΦ​(θ)P_{\Phi}(\theta) satisfies fθ​(𝐱′)≥γf_{\theta}(\mathbf{x}^{\prime})\geq\gamma with high probability.

Rashomon Example

Consider a newly trained model θ∗\theta^{*}, assuming the newly trained model belongs to the hypothesis set, in this case for the Rashomon set this can be expressed via the assumption that θ∗∼PR​(θ)\theta^{*}\sim P_{R}(\theta). Repeated training with stochastic initialization produces solutions with comparable empirical loss, which can be treated as approximate empirical samples from the Rashomon-restricted posterior PR​(θ)P_{R}(\theta), leading to Corollary 1.

Assumption 1.

The variance over a Rashomon set of models is bounded, such that:

𝕍θ∼PR​(θ)​(fθ​(𝐱′))≤σ2.\displaystyle\mathbb{V}_{\theta\sim P_{R}(\theta)}(f_{\theta}(\mathbf{x}^{\prime}))\leq\sigma^{2}.
Corollary 1.

Let σ2=Varθ∼PR​(fθ​(𝐱′))\sigma^{2}=\mathrm{Var}_{\theta\sim P_{R}}(f_{\theta}(\mathbf{x}^{\prime})). Then for any β>0\beta>0,

ℙθ∗∼PR​(fθ∗​(𝐱′)>𝔼θ∼PR​[fθ​(𝐱′)]−β)≥1−σ2β2.\displaystyle\mathbb{P}_{\theta^{*}\sim P_{R}}\Big(f_{\theta^{*}}(\mathbf{x}^{\prime})>\mathbb{E}_{\theta\sim P_{R}}[f_{\theta}(\mathbf{x}^{\prime})]-\beta\Big)\geq 1-\frac{\sigma^{2}}{\beta^{2}}.
Table 1: Amortized Counterfactual Evaluation on Adult Income and Breast Cancer (Mean ±\pm std over 5 seeds). Methods are grouped by the evaluation environment: Strict Empirical Bound (ϵ=0.0\epsilon=0.0) and Relaxed Empirical Bound (ϵ=0.8\epsilon=0.8).
Method Val ↑\uparrow IM1 ↓\downarrow Imp ↓\downarrow Div ↑\uparrow CMV ↑\uparrow NE ↓\downarrow RIC ↓\downarrow RVR ↑\uparrow Time (s) ↓\downarrow
Dataset: Adult Income
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
Batten et al. 0.910 ±\pm 0.286 1.403 ±\pm 1.722 11.639 ±\pm 3.361 0.000 ±\pm 0.000 0.749 ±\pm 0.278 0.0054 ±\pm 0.0073 0.0342 ±\pm 0.1030 0.675 ±\pm 0.388 0.0171 ±\pm 0.1092
QUCE 0.918 ±\pm 0.274 0.963 ±\pm 0.322 9.807 ±\pm 2.055 0.000 ±\pm 0.000 0.883 ±\pm 0.252 0.0012 ±\pm 0.0031 0.0054 ±\pm 0.0156 0.923 ±\pm 0.251 0.0102 ±\pm 0.0740
Schut et al. 0.982 ±\pm 0.133 1.943 ±\pm 2.378 12.033 ±\pm 3.225 0.000 ±\pm 0.000 0.951 ±\pm 0.163 0.0036 ±\pm 0.0052 0.0163 ±\pm 0.1533 0.915 ±\pm 0.185 0.0443 ±\pm 0.1013
AVCG-B 1.000 ±\pm 0.000 0.769 ±\pm 0.214 8.320 ±\pm 0.047 0.030 ±\pm 0.010 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.785 ±\pm 0.178 8.303 ±\pm 0.059 0.017 ±\pm 0.006 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
Batten et al. 0.912 ±\pm 0.283 1.403 ±\pm 1.722 11.639 ±\pm 3.361 0.000 ±\pm 0.000 0.749 ±\pm 0.278 0.0057 ±\pm 0.0090 0.0355 ±\pm 0.0903 0.774 ±\pm 0.197 0.0171 ±\pm 0.1092
QUCE 0.918 ±\pm 0.274 0.963 ±\pm 0.322 9.807 ±\pm 2.055 0.000 ±\pm 0.000 0.883 ±\pm 0.252 0.0013 ±\pm 0.0040 0.0047 ±\pm 0.0144 0.919 ±\pm 0.235 0.0102 ±\pm 0.0740
Schut et al. 0.982 ±\pm 0.133 1.943 ±\pm 2.378 12.033 ±\pm 3.225 0.000 ±\pm 0.000 0.951 ±\pm 0.163 0.0037 ±\pm 0.0055 0.0173 ±\pm 0.1483 0.955 ±\pm 0.131 0.0443 ±\pm 0.1013
AVCG-B 1.000 ±\pm 0.000 0.769 ±\pm 0.214 8.320 ±\pm 0.047 0.030 ±\pm 0.010 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 0.764 ±\pm 0.209 8.308 ±\pm 0.051 0.022 ±\pm 0.007 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
Dataset: Breast Cancer
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
Batten et al. 0.948 ±\pm 0.222 1.425 ±\pm 0.714 7.225 ±\pm 1.204 0.000 ±\pm 0.000 0.655 ±\pm 0.336 0.0051 ±\pm 0.0063 0.0142 ±\pm 0.0623 0.870 ±\pm 0.187 0.0111 ±\pm 0.0062
QUCE 1.000 ±\pm 0.000 0.787 ±\pm 0.520 6.173 ±\pm 1.117 0.000 ±\pm 0.000 0.992 ±\pm 0.046 0.0012 ±\pm 0.0028 0.0004 ±\pm 0.0031 0.995 ±\pm 0.033 0.0103 ±\pm 0.0056
Schut et al. 1.000 ±\pm 0.000 1.163 ±\pm 0.330 8.036 ±\pm 1.371 0.000 ±\pm 0.000 0.662 ±\pm 0.313 0.0017 ±\pm 0.0018 0.0153 ±\pm 0.0542 0.996 ±\pm 0.023 0.0862 ±\pm 0.0480
AVCG-B 1.000 ±\pm 0.000 0.579 ±\pm 0.153 5.317 ±\pm 0.594 1.135 ±\pm 0.171 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0477 ±\pm 0.0391 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.658 ±\pm 0.147 5.364 ±\pm 0.544 1.078 ±\pm 0.209 1.000 ±\pm 0.000 0.0001 ±\pm 0.0002 0.0443 ±\pm 0.0459 1.000 ±\pm 0.000 0.0010 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
Batten et al. 0.948 ±\pm 0.222 1.425 ±\pm 0.714 7.225 ±\pm 1.204 0.000 ±\pm 0.000 0.655 ±\pm 0.336 0.0045 ±\pm 0.0047 0.0138 ±\pm 0.0522 0.855 ±\pm 0.161 0.0111 ±\pm 0.0062
QUCE 1.000 ±\pm 0.000 0.787 ±\pm 0.520 6.173 ±\pm 1.117 0.000 ±\pm 0.000 0.992 ±\pm 0.046 0.0010 ±\pm 0.0022 0.0003 ±\pm 0.0021 0.995 ±\pm 0.020 0.0103 ±\pm 0.0056
Schut et al. 1.000 ±\pm 0.000 1.163 ±\pm 0.330 8.036 ±\pm 1.371 0.000 ±\pm 0.000 0.662 ±\pm 0.313 0.0018 ±\pm 0.0021 0.0246 ±\pm 0.0967 0.992 ±\pm 0.017 0.0862 ±\pm 0.0480
AVCG-B 1.000 ±\pm 0.000 0.579 ±\pm 0.153 5.317 ±\pm 0.594 1.135 ±\pm 0.171 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0466 ±\pm 0.0397 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 0.639 ±\pm 0.129 5.377 ±\pm 0.584 1.112 ±\pm 0.176 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0455 ±\pm 0.0361 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
Table 2: Amortized Counterfactual Evaluation on Heart Disease and Spambase (Mean ±\pm std over 5 seeds).
Method Val ↑\uparrow IM1 ↓\downarrow Imp ↓\downarrow Div ↑\uparrow CMV ↑\uparrow NE ↓\downarrow RIC ↓\downarrow RVR ↑\uparrow Time (s) ↓\downarrow
Dataset: Heart Disease
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
Batten et al. 0.891 ±\pm 0.312 1.085 ±\pm 0.427 4.740 ±\pm 0.459 0.000 ±\pm 0.000 0.591 ±\pm 0.329 0.0029 ±\pm 0.0027 0.0292 ±\pm 0.0853 0.712 ±\pm 0.224 0.0126 ±\pm 0.0060
QUCE 0.985 ±\pm 0.122 0.780 ±\pm 0.498 3.844 ±\pm 0.375 0.000 ±\pm 0.000 0.934 ±\pm 0.158 0.0012 ±\pm 0.0012 0.0005 ±\pm 0.0045 0.966 ±\pm 0.096 0.0084 ±\pm 0.0040
Schut et al. 1.000 ±\pm 0.000 0.802 ±\pm 0.201 5.203 ±\pm 0.518 0.000 ±\pm 0.000 0.997 ±\pm 0.030 0.0008 ±\pm 0.0009 0.0113 ±\pm 0.0492 1.000 ±\pm 0.000 0.0701 ±\pm 0.0250
AVCG-B 1.000 ±\pm 0.000 0.407 ±\pm 0.163 3.616 ±\pm 0.123 0.670 ±\pm 0.127 1.000 ±\pm 0.000 0.0002 ±\pm 0.0002 0.0211 ±\pm 0.0180 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.477 ±\pm 0.174 3.661 ±\pm 0.145 0.695 ±\pm 0.130 1.000 ±\pm 0.000 0.0002 ±\pm 0.0003 0.0235 ±\pm 0.0208 1.000 ±\pm 0.000 0.0010 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
Batten et al. 0.884 ±\pm 0.321 1.085 ±\pm 0.427 4.740 ±\pm 0.459 0.000 ±\pm 0.000 0.591 ±\pm 0.329 0.0032 ±\pm 0.0037 0.0209 ±\pm 0.0534 0.707 ±\pm 0.150 0.0126 ±\pm 0.0060
QUCE 0.993 ±\pm 0.086 0.780 ±\pm 0.498 3.844 ±\pm 0.375 0.000 ±\pm 0.000 0.934 ±\pm 0.158 0.0011 ±\pm 0.0017 0.0002 ±\pm 0.0010 0.946 ±\pm 0.104 0.0084 ±\pm 0.0040
Schut et al. 1.000 ±\pm 0.000 0.802 ±\pm 0.201 5.203 ±\pm 0.518 0.000 ±\pm 0.000 0.997 ±\pm 0.030 0.0007 ±\pm 0.0006 0.0107 ±\pm 0.0490 1.000 ±\pm 0.002 0.0701 ±\pm 0.0250
AVCG-B 1.000 ±\pm 0.000 0.407 ±\pm 0.163 3.616 ±\pm 0.123 0.670 ±\pm 0.127 1.000 ±\pm 0.000 0.0002 ±\pm 0.0002 0.0218 ±\pm 0.0195 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 0.438 ±\pm 0.194 3.646 ±\pm 0.176 0.706 ±\pm 0.140 0.996 ±\pm 0.039 0.0002 ±\pm 0.0003 0.0250 ±\pm 0.0241 0.999 ±\pm 0.011 0.0011 ±\pm 0.0001
Dataset: Spambase
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
Batten et al. 0.926 ±\pm 0.262 2.443 ±\pm 2.198 9.521 ±\pm 3.533 0.000 ±\pm 0.000 0.755 ±\pm 0.320 0.0159 ±\pm 0.0203 0.0306 ±\pm 0.1054 0.806 ±\pm 0.268 0.0096 ±\pm 0.0120
QUCE 0.546 ±\pm 0.498 2.084 ±\pm 1.874 8.357 ±\pm 2.860 0.000 ±\pm 0.000 0.530 ±\pm 0.416 0.0107 ±\pm 0.0176 0.0024 ±\pm 0.0096 0.541 ±\pm 0.440 0.0118 ±\pm 0.0138
Schut et al. 0.990 ±\pm 0.100 2.213 ±\pm 1.742 9.878 ±\pm 3.477 0.000 ±\pm 0.000 0.773 ±\pm 0.310 0.0127 ±\pm 0.0279 0.0073 ±\pm 0.0220 0.966 ±\pm 0.120 0.0963 ±\pm 0.1233
AVCG-B 1.000 ±\pm 0.000 0.983 ±\pm 0.244 6.276 ±\pm 0.091 0.776 ±\pm 0.128 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0271 ±\pm 0.0295 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.976 ±\pm 0.199 6.301 ±\pm 0.093 0.747 ±\pm 0.149 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0247 ±\pm 0.0263 1.000 ±\pm 0.000 0.0010 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
Batten et al. 0.916 ±\pm 0.277 2.443 ±\pm 2.198 9.521 ±\pm 3.533 0.000 ±\pm 0.000 0.755 ±\pm 0.320 0.0161 ±\pm 0.0240 0.0321 ±\pm 0.0949 0.816 ±\pm 0.183 0.0096 ±\pm 0.0120
QUCE 0.540 ±\pm 0.498 2.084 ±\pm 1.874 8.357 ±\pm 2.860 0.000 ±\pm 0.000 0.530 ±\pm 0.416 0.0118 ±\pm 0.0225 0.0028 ±\pm 0.0130 0.544 ±\pm 0.408 0.0118 ±\pm 0.0138
Schut et al. 0.990 ±\pm 0.100 2.213 ±\pm 1.742 9.878 ±\pm 3.477 0.000 ±\pm 0.000 0.773 ±\pm 0.310 0.0118 ±\pm 0.0252 0.0091 ±\pm 0.0431 0.958 ±\pm 0.103 0.0963 ±\pm 0.1233
AVCG-B 1.000 ±\pm 0.000 0.983 ±\pm 0.244 6.276 ±\pm 0.091 0.776 ±\pm 0.128 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0266 ±\pm 0.0298 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 1.037 ±\pm 0.238 6.332 ±\pm 0.087 0.690 ±\pm 0.108 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0208 ±\pm 0.0215 1.000 ±\pm 0.000 0.0011 ±\pm 0.0001

Intuitively, minimal predictive variance within the defined model space leads to highly robust counterfactual instances.

Example 1 (Empirical Example).

Taking the Rashomon set at ϵ=0.10\epsilon=0.10 on the Adult Income dataset yields a measured predictive variance of ∼0.002\sim 0.002, assume then AVCG-R produces a highly confident counterfactual such that 𝔼θ∼PR​[fθ​(𝐱′)]=0.95\mathbb{E}_{\theta\sim P_{R}}[f_{\theta}(\mathbf{x}^{\prime})]=0.95. Given a new predictive model can be interpreted as an approximate draw from PR​(θ)P_{R}(\theta), we seek the probability that the counterfactual remains valid (fθ∗​(𝐱′)>0.5f_{\theta^{*}}(\mathbf{x}^{\prime})>0.5). Setting β=0.45\beta=0.45, we have:

ℙθ∗∼PR​(fθ∗​(𝐱′)>0.95−0.45)≥1−0.0020.452\displaystyle\mathbb{P}_{\theta^{*}\sim P_{R}}\Big(f_{\theta^{*}}(\mathbf{x}^{\prime})>0.95-0.45\Big)\geq 1-\frac{0.002}{0.45^{2}}
⟹ℙθ∗∼PR​(fθ∗​(𝐱′)>0.5)≥0.99\displaystyle\implies\mathbb{P}_{\theta^{*}\sim P_{R}}\Big(f_{\theta^{*}}(\mathbf{x}^{\prime})>0.5\Big)\geq 0.99

Thus, with a 99%99\% probability, a counterfactual evaluated by a newly sampled model θ∗\theta^{*} drawn from the Rashomon set will remain valid.

Computing AVCG

We proceed by defining the implementation of our proposed AVCG.

We derive gradients for the predictive term noting that gradients of the KL and proximity terms follow standard formulations and are computed via automatic differentiation. Thus, by the chain rule, we are optimizing our counterfactual generative model gϕg_{\phi} under the predictor PθP_{\theta} over parameters θ\theta via the computational graph defined by:

𝔼θ∼PΦ​(θ),𝐳∼qψ​[∂l​o​g​Pθ∂𝐱′⋅∂gϕ∂ϕ],\displaystyle\mathbb{E}_{\theta\sim P_{\Phi}(\theta),\mathbf{z}\sim q_{\psi}}\bigg[\frac{\partial\ log\ P_{\theta}}{\partial\mathbf{x}^{\prime}}\cdot\frac{\partial g_{\phi}}{\partial\phi}\bigg],

where PθP_{\theta} is defined by a pre-trained Bayesian predictor.

To enable gradient propagation through stochastic latent samples, we adopt the reparameterisation trick (Kingma and Welling 2014), such that:

𝐳=μ+σ⊙κ,κ∼N⁡(0,I).\displaystyle\mathbf{z}=\mu\ +\sigma\odot\kappa,\ \kappa\sim{N}(0,I).

Furthermore, the encoder is updated via the path:

𝔼θ∼PΦ​(θ)​[𝔼𝐳∼qψ​[∂l​o​g​Pθ∂𝐱′⋅∂gϕ∂𝐳⋅∂𝐳∂ψ]].\displaystyle\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}\bigg[\mathbb{E}_{\mathbf{z}\sim q_{\psi}}\bigg[\frac{\partial\ log\ P_{\theta}}{\partial\mathbf{x}^{\prime}}\cdot\frac{\partial g_{\phi}}{\partial\mathbf{z}}\cdot\frac{\partial\mathbf{z}}{\partial\psi}\bigg]\bigg].

where using the reparameterization trick, gradients can propagate through 𝐳\mathbf{z} with respect to the encoders parameters ψ\psi. Implementation details are provided in the supplementary material.

Experimental Setup

We use a validation set for determining which models belong in the Rashomon set, and then utilize the test set for evaluating the quality of generated counterfactuals across performance metrics. For each dataset, we first split our data into 80% training and 20% test. We then take 15% of our training data as a hold-out validation set. All experiments are run across 5 seeds across 100 instances per dataset, with the mean and standard deviation recorded.

Experiments were conducted on a workstation equipped with an Intel Core i9-14900 CPU and an NVIDIA RTX 2000 Ada Generation GPU.

Datasets

For the experiments in this work, we focus on four benchmark datasets. We adopt the tabular datasets, namely the adult income dataset (Becker and Kohavi 1996), heart disease (Janosi et al. 1989), Wisconsin breast cancer (Wolberg et al. 1993) and spambase dataset (Hopkins et al. 1999) used frequently in counterfactual literature (Batten et al. 2025; Schut et al. 2021; Noorani et al. 2025).

Baselines

We compare our proposed AVCG approach against two Bayesian-based counterfactual explainers: Schut et al. (Schut et al. 2021) and Batten et al. (Batten et al. 2025). Finally, we compare against QUCE (Duell et al. 2024), but we instead operate over the expected prediction as opposed to a single point estimate.

Metrics

In this section, we formally define the evaluation metrics utilized in our experiments to assess the efficacy, plausibility, and stability of the generated counterfactuals. Let 𝐱∈ℝd\mathbf{x}\in\mathbb{R}^{d} be the factual instance, and let 𝐱′∈ℝd\mathbf{x}^{\prime}\in\mathbb{R}^{d} be the generated counterfactual instance targeting class y′y^{\prime}. Let yo​r​i​g=arg⁡maxc​𝔼θ∼P⁡(θ∣D)​[fθ​(𝐱)c]y_{orig}=\arg\max_{c}\mathbb{E}_{\theta\sim P(\theta\mid D)}[f_{\theta}(\mathbf{x})_{c}] represent the original predicted class, where c∈{1,…,C}c\in\{1,\ldots,C\} denotes a class. We denote the indicator function as 𝕀⁡[⋅]\mathbb{I}[\cdot], and a small constant for numerical stability as η\eta. In practice the evaluation metrics are averaged over instances.

In this work we evaluate Validity (Val) (Mothilal et al. 2020), IM1 (Van Looveren and Klaise 2021; Schut et al. 2021), Implausibility (Imp) (Altmeyer et al. 2024), Diversity (Mothilal et al. 2020), Robustness to Noisy Executions (NE) (Jiang et al. 2024), Robustness to Input Changes (RIC) (Batten et al. 2025) and inference time. Furthermore, we propose two metrics, Cross Model Validity (CMV) evaluating the counterfactual validity across newly trained neural networks, and Rashomon Validity Ratio (RVR) the counterfactuals valid under a set of models defined by ϵ\epsilon. We provide the details for known metrics in the supplementary, and introduce our metrics as follows:

Rashomon Validity Ratio (RVR) quantifies the counterfactual’s robustness specifically to model multiplicity. It evaluates the fraction of valid counterfactuals across the empirically derived Rashomon set (as per validation set evaluation), ΘR​(ϵ)\Theta_{R}(\epsilon):

RVR(𝐱′,y′,ϵ)=1|ΘR​(ϵ)|∑θk∈ΘR​(ϵ)𝕀[argmaxcfθk(𝐱′)c=y′].\text{RVR}(\mathbf{x}^{\prime},y^{\prime},\epsilon)=\frac{1}{|\Theta_{R}(\epsilon)|}\sum_{\theta_{k}\in\Theta_{R}(\epsilon)}\mathbb{I}\left[\arg\max_{c}f_{\theta_{k}}(\mathbf{x}^{\prime})_{c}=y^{\prime}\right].

Cross Model Validity (CMV) evaluates the transferability of the counterfactual by testing it against a multiple surrogate models, fSf_{S}, trained on the identical data distribution:

CMV(𝐱′,y′)=1N∑s=1N𝕀[argmaxcfS(𝐱′)c=y′].\text{CMV}(\mathbf{x}^{\prime},y^{\prime})=\frac{1}{N}\sum^{N}_{s=1}\mathbb{I}\left[\arg\max_{c}f_{S}(\mathbf{x}^{\prime})_{c}=y^{\prime}\right].

for NN surrogate models. In this work we evaluate the average validity across N=5N=5 separately trained models.

Results

Refer to caption
Figure 2: ϵ\epsilon-sweep on the Spambase dataset for AVCG-R. Here we observe the impact of the ϵ\epsilon hyperparameter for the Rashomon set.

Results on Counterfactual Metrics

Robustness Under Predictive Uncertainty

The primary objective of the AVCG framework is to generate counterfactuals that remain valid across a distribution of plausible predictive hypotheses. As evidenced by the Cross-Model Validity (CMV) and Rashomon Validity Ratio (RVR) in Tables 1 and 2, standard post-hoc iterative methods are highly susceptible to model multiplicity. Several post-hoc methods exhibit substantial reductions in CMV on particular datasets. For instance, on the Spambase dataset (Table 2), Schut et al. achieves a CMV of only 0.773 and Batten et al. drops to 0.755. Furthermore, we observe that the RVR for non-AVCG methods drops. In contrast, both AVCG-B and AVCG-R maintain a cross-model validity (∼1.000\sim 1.000) and RVR (∼1.000\sim 1.000) across all four datasets. This is empirically consistent with Theorem 1 and Corollary 1.

Amortization: Diversity and Inference Efficiency

Beyond robustness, formulating counterfactual generation as a variational amortized process yields two practical advantages: inference speed and explanation diversity. First, the post-hoc baselines suffer from collapsing to single solution, uniformly recording a Diversity score of 0.0000.000 across all datasets. Because they iteratively solve a deterministic optimization problem per instance, they collapse to a single, localized solution. AVCG, operating as a conditional generative model, maps inputs to a stochastic latent space qψ​(𝐳∣y′,𝐱)q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x}). By sampling different latent vectors 𝐳\mathbf{z}, AVCG generates a diverse set of valid counterfactuals (e.g., Diversity of 1.0781.078 on Breast Cancer and 0.7470.747 on Spambase for AVCG-R), offering users multiple actionable paths for recourse. Secondly, the computational bottleneck of counterfactual deployment is inference latency. Iterative gradient-based baselines require significant time per instance (e.g., Schut et al. requires 0.040.04 seconds per instance on Adult Income). By shifting the heavy computational burden to the training phase, AVCG requires only a single forward pass at inference time, achieving generation speeds on the order of 10−310^{-3} seconds which is an efficiency improvement of over an order of magnitude, making it highly suitable for real-time deployment.

ϵ\epsilon Sweep

In Figure 2 we demonstrate the influence of the ϵ\epsilon hyperparameter recording the mean and deviation across 5 runs on each metric under different Rashomon set sizes. The result demonstrates that AVCG-R remains stable across varying Rashomon set sizes, indicating that the framework is robust to the practitioner’s choice of the empirical performance threshold ϵ\epsilon.

We observe common trends, such as diversity commonly increasing across datasets as ϵ\epsilon decreases. This is likely due to the higher epsilon which admits more models that need to evaluate a counterfactual as valid, and thus, limiting the space of potential counterfactual solutions. A similar consequence is likely for the IM1 metric as the constraints of validity become stricter.

We refer the reader to the supplementary material for ablation studies, additional baselines and further experiments on image datasets (MNIST and CIFAR10).

Conclusion

We introduced AVCG, a generalized variational framework for amortized counterfactual generation over arbitrary hypothesis distributions. Bayesian posteriors and Rashomon-restricted hypothesis spaces arise as special cases. AVCG demonstrates superior performance across key metrics with the added value of amortized inference for a decreased computational cost.

An interesting direction for future work is to characterize the amortization gap induced by Rashomon-restricted inference, whereby the amortization gap is a known concern in VAE-like models (Cremer et al. 2018). Since the proposed generator amortizes counterfactual inference across both inputs and hypothesis-space, mismatch between the instance-optimal latent representations and the shared encoder may emerge as the Rashomon set evolves. Building on analyses of amortization error in variational inference, future work could investigate adaptive refinement strategies (Kim et al. 2018) that selectively update the encoder when hypothesis-space variability induces large deviations from instance-optimal counterfactual latent representations.

Future work can explore extrapolations of our generalized framework to further hypothesis spaces. For example, one could use a Laplace approximation around the maximum a posteriori (MAP) solution.

Acknowledgments

For the purpose of open access, the author has applied a Creative Commons Attribution (CC BY) licence to any Author Accepted Manuscript version of this paper, arising from this submission.

References

  • Altmeyer et al. (2024) P. Altmeyer, M. Farmanbar, A. Deursen, and C. Liem Faithful model explanations through energy-constrained conformal counterfactuals. Proceedings of the AAAI Conference on Artificial Intelligence 38, pp. 10829–10837. External Links: Document Cited by: Metrics.
  • Batten et al. (2025) B. Batten, F. Leofante, N. Paoletti, A. Lomuscio, and M. Hosseini Uncertainty-aware counterfactual explanations using bayesian neural nets. External Links: Link Cited by: Introduction, Datasets, Baselines, Metrics.
  • Becker and Kohavi (1996) B. Becker and R. Kohavi Adult. Note: UCI Machine Learning RepositoryDOI: https://doi.org/10.24432/C5XW20 Cited by: Datasets.
  • Blundell et al. (2015) C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra Weight uncertainty in neural networks. In Proceedings of the 32nd International Conference on Machine Learning - Volume 37, ICML’15, pp. 1613–1622. Cited by: Introduction.
  • Cremer et al. (2018) C. Cremer, X. Li, and D. K. Duvenaud Inference suboptimality in variational autoencoders. In International Conference on Machine Learning, External Links: Link Cited by: Conclusion.
  • Duell et al. (2024) J. Duell, M. Seisenberger, H. Fu, and X. Fan QUCE: the minimisation and quantification of path-based uncertainty for generative counterfactual explanations. In 2024 IEEE International Conference on Data Mining (ICDM), pp. 693–698. External Links: Link, Document Cited by: Introduction, Introduction, Baselines.
  • Gal and Ghahramani (2016) Y. Gal and Z. Ghahramani Dropout as a bayesian approximation: representing model uncertainty in deep learning. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48, ICML’16, pp. 1050–1059. Cited by: Introduction, AVCG-B: The Bayesian Instantiation.
  • Hopkins et al. (1999) M. Hopkins, E. Reeber, G. Forman, and J. Suermondt Spambase. Note: UCI Machine Learning RepositoryDOI: https://doi.org/10.24432/C53G6X Cited by: Datasets.
  • Hsu et al. (2025) E. Hsu, T. Cao, L. Semenova, and C. Zhong The rashomon set has it all: analyzing trustworthiness of trees under multiplicity. In The Thirty-ninth Annual Conference on Neural Information Processing Systems Datasets and Benchmarks Track, External Links: Link Cited by: Introduction.
  • Hsu et al. (2024) H. Hsu, G. Li, S. Hu, and C. Chen Dropout-based rashomon set exploration for efficient predictive multiplicity estimation. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024, External Links: Link Cited by: Appendix A, Appendix A, Introduction.
  • Janosi et al. (1989) A. Janosi, W. Steinbrunn, M. Pfisterer, and R. Detrano Heart Disease. Note: UCI Machine Learning RepositoryDOI: https://doi.org/10.24432/C52P4X Cited by: Datasets.
  • Jiang et al. (2024) J. Jiang, F. Leofante, A. Rago, and F. Toni Robust counterfactual explanations in machine learning: a survey. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence, IJCAI ’24. External Links: ISBN 978-1-956792-04-1, Link, Document Cited by: Introduction, Metrics.
  • Kim et al. (2018) Y. Kim, S. Wiseman, A. Miller, D. Sontag, and A. Rush Semi-amortized variational autoencoders. In Proceedings of the 35th International Conference on Machine Learning, J. Dy and A. Krause (Eds.), Proceedings of Machine Learning Research, Vol. 80, pp. 2678–2687. External Links: Link Cited by: Conclusion.
  • Kingma and Welling (2014) D. P. Kingma and M. Welling Auto-encoding variational bayes. In 2nd International Conference on Learning Representations, ICLR 2014, Banff, AB, Canada, April 14-16, 2014, Conference Track Proceedings, Y. Bengio and Y. LeCun (Eds.), External Links: Link Cited by: Appendix A, Appendix A, Computing AVCG.
  • Mothilal et al. (2020) R. K. Mothilal, A. Sharma, and C. Tan Explaining machine learning classifiers through diverse counterfactual explanations. In Proceedings of the 2020 Conference on Fairness, Accountability, and Transparency, FAT* ’20, pp. 607–617. External Links: Link, Document Cited by: Proximity Regularization, Metrics.
  • Noorani et al. (2025) E. Noorani, P. Dissanayake, F. Hamman, and S. Dutta Counterfactual explanations for model ensembles using entropic risk measures. In Proceedings of the 24th International Conference on Autonomous Agents and Multiagent Systems, AAMAS ’25, Richland, SC, pp. 1566–1575. External Links: ISBN 9798400714269 Cited by: Datasets.
  • Schut et al. (2021) L. Schut, O. Key, R. McGrath, L. Costabello, B. Sacaleanu, M. Corcoran, and Y. Gal Generating interpretable counterfactual explanations by implicit minimisation of epistemic and aleatoric uncertainties. In International Conference on Artificial Intelligence and Statistics, External Links: Link Cited by: Introduction, Introduction, Datasets, Baselines, Metrics.
  • Sohn et al. (2015) K. Sohn, H. Lee, and X. Yan Learning structured output representation using deep conditional generative models. In Advances in Neural Information Processing Systems, C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett (Eds.), Vol. 28, pp. . External Links: Link Cited by: Appendix A, Appendix A.
  • Sokol and Hüllermeier (2025) K. Sokol and E. Hüllermeier All you need for counterfactual explainability is principled and reliable estimate of aleatoric and epistemic uncertainty. External Links: 2502.17007, Link Cited by: Introduction, Proximity Regularization.
  • Van Looveren and Klaise (2021) A. Van Looveren and J. Klaise Interpretable counterfactual explanations guided by prototypes. In Machine Learning and Knowledge Discovery in Databases. Research Track, N. Oliver, F. Pérez-Cruz, S. Kramer, J. Read, and J. A. Lozano (Eds.), Cham, pp. 650–665. External Links: ISBN 978-3-030-86520-7 Cited by: Metrics.
  • Wachter et al. (2018) S. Wachter, B. Mittelstadt, and C. Russell Counterfactual explanations without opening the black box: automated decisions and the gdpr. Harvard journal of law & technology 31, pp. 841–887. External Links: Document Cited by: Appendix D.
  • Wolberg et al. (1993) W. Wolberg, O. Mangasarian, N. Street, and W. Street Breast Cancer Wisconsin (Diagnostic). Note: UCI Machine Learning RepositoryDOI: https://doi.org/10.24432/C5DW2B Cited by: Datasets.

Appendix A Appendix

Proof of Theorem 1

Proof.

Since RΦ​(𝐱′)R_{\Phi}(\mathbf{x}^{\prime}) is the only term dependent on θ\theta, we reduce the difference to the terms

𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼PΦa​(θ)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]]\displaystyle\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P^{a}_{\Phi}(\theta)}\bigg[\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg]
−𝔼qψ​(𝐳∣y′,𝐱)​[𝔼θ∼PΦb​(θ)​[log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))]]\displaystyle-\mathbb{E}_{q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})}\bigg[\mathbb{E}_{\theta\sim P^{b}_{\Phi}(\theta)}\bigg[\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\bigg]\bigg]
=La​(𝐱′)−Lb​(𝐱′)\displaystyle=L_{a}(\mathbf{x}^{\prime})-L_{b}(\mathbf{x}^{\prime})
=∫qψ​(𝐳∣y′,𝐱)​(∫PΦa​(θ)​log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))​𝑑θ)​𝑑𝐳\displaystyle=\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\left(\int P^{a}_{\Phi}(\theta)\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\,d\theta\right)d\mathbf{z}
−∫qψ(𝐳∣y′,𝐱)(∫PΦb(θ)logPθ(y′∣gϕ(𝐱,y′,𝐳))dθ)d𝐳\displaystyle\quad-\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\left(\int P^{b}_{\Phi}(\theta)\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\,d\theta\right)d\mathbf{z}
=∫qψ​(𝐳∣y′,𝐱)​(∫(PΦa​(θ)−PΦb​(θ))​log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))​𝑑θ)​𝑑𝐳.\displaystyle=\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\left(\int\left(P^{a}_{\Phi}(\theta)-P^{b}_{\Phi}(\theta)\right)\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\,d\theta\right)d\mathbf{z}.

Taking the absolute values we have:

|La​(𝐱′)−Lb​(𝐱′)|\displaystyle|L_{a}(\mathbf{x}^{\prime})-L_{b}(\mathbf{x}^{\prime})| =|∫qψ​(𝐳∣y′,𝐱)​(∫(PΦa​(θ)−PΦb​(θ))​log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))​𝑑θ)​𝑑𝐳|\displaystyle=\bigg|\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\left(\int\left(P^{a}_{\Phi}(\theta)-P^{b}_{\Phi}(\theta)\right)\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\,d\theta\right)d\mathbf{z}\bigg|
≤∫qψ​(𝐳∣y′,𝐱)​(∫|(PΦa​(θ)−PΦb​(θ))​log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))|​𝑑θ)​𝑑𝐳\displaystyle\leq\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\left(\int\bigg|\left(P^{a}_{\Phi}(\theta)-P^{b}_{\Phi}(\theta)\right)\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\,\bigg|d\theta\right)d\mathbf{z}
≤∫qψ​(𝐳∣y′,𝐱)​(∫|(PΦa​(θ)−PΦb​(θ))|​|log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))|​𝑑θ)​𝑑𝐳\displaystyle\leq\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\left(\int\bigg|\left(P^{a}_{\Phi}(\theta)-P^{b}_{\Phi}(\theta)\right)||\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))\,\bigg|d\theta\right)d\mathbf{z}

let |log⁡Pθ​(y′∣gϕ​(𝐱,y′,𝐳))|≤M|\log P_{\theta}(y^{\prime}\mid g_{\phi}(\mathbf{x},y^{\prime},\mathbf{z}))|\leq M then we have:

∫qψ​(𝐳∣y′,𝐱)​(M​∫|(PΦa​(θ)−PΦb​(θ))|​𝑑θ)​𝑑𝐳\displaystyle\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})\left(M\int\bigg|\left(P^{a}_{\Phi}(\theta)-P^{b}_{\Phi}(\theta)\right)\bigg|d\theta\right)d\mathbf{z}

Using the definition of total variation T​V​(P,Q)=12​∫|P−Q|TV(P,Q)=\frac{1}{2}\int|P-Q| for two distribution PP and QQ, then we obtain:

|La​(𝐱′)−Lb​(𝐱′)|\displaystyle|L_{a}(\mathbf{x}^{\prime})-L_{b}(\mathbf{x}^{\prime})| ≤2​M​T​V​(PΦa,PΦb)​∫qψ​(𝐳∣y′,𝐱)​𝑑𝐳\displaystyle\leq 2MTV(P^{a}_{\Phi},P^{b}_{\Phi})\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})d\mathbf{z}
=2​M​T​V​(PΦa,PΦb)\displaystyle=2MTV(P^{a}_{\Phi},P^{b}_{\Phi})

since ∫qψ​(𝐳∣y′,𝐱)​𝑑𝐳=1\int q_{\psi}(\mathbf{z}\mid y^{\prime},\mathbf{x})d\mathbf{z}=1, applying Pinskers inequality we have:

2​M​T​V​(PΦa,PΦb)≤2​M​12DK​L(PaΦ||PbΦ)\displaystyle 2MTV(P^{a}_{\Phi},P^{b}_{\Phi})\leq 2M\sqrt{\frac{1}{2}D_{KL}(P^{a}_{\Phi}||P^{b}_{\Phi})}
⟹|La​(𝐱′)−Lb​(𝐱′)|≤2​M​DK​L(PaΦ||PbΦ)\displaystyle\implies|L_{a}(\mathbf{x}^{\prime})-L_{b}(\mathbf{x}^{\prime})|\leq\sqrt{2}M\sqrt{D_{KL}(P^{a}_{\Phi}||P^{b}_{\Phi})}

completing the proof. ∎

Proof of Proposition 1

Proof.

Let X=1−fθ​(𝐱′)X=1-f_{\theta}(\mathbf{x}^{\prime}) and α=1−γ\alpha=1-\gamma be a random variable over θ\theta s.t. X≥0X\geq 0. Applying Markov’s inequality:

ℙ⁡(X≥α)≤𝔼⁡[X]α\displaystyle\mathbb{P}(X\geq\alpha)\leq\frac{\mathbb{E}[X]}{\alpha}

Substituting terms yields:

ℙ⁡(1−fθ​(𝐱′)≥1−γ)≤1−𝔼θ∼PΦ​(θ)​[fθ​(𝐱′)]1−γ\displaystyle\mathbb{P}(1-f_{\theta}(\mathbf{x}^{\prime})\geq 1-\gamma)\leq\frac{1-\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}[f_{\theta}(\mathbf{x}^{\prime})]}{1-\gamma}

Taking the complement, we observe:

ℙ⁡(fθ​(𝐱′)≥γ)≥1−1−𝔼θ∼PΦ​(θ)​[fθ​(𝐱′)]1−γ.\displaystyle\mathbb{P}(f_{\theta}(\mathbf{x}^{\prime})\geq\gamma)\geq 1-\frac{1-\mathbb{E}_{\theta\sim P_{\Phi}(\theta)}[f_{\theta}(\mathbf{x}^{\prime})]}{1-\gamma}.

∎

Proof of Corollary 1

Proof.

Chebyshev’s inequality:

ℙθ∼PΦ​(|fθ​(𝐱′)−𝔼θ∼PΦ​[fθ​(𝐱′)]|<β)≥1−σ2β2.\displaystyle\mathbb{P}_{\theta\sim P_{\Phi}}\Big(|f_{\theta}(\mathbf{x}^{\prime})-\mathbb{E}_{\theta\sim P_{\Phi}}[f_{\theta}(\mathbf{x}^{\prime})]|<\beta\Big)\geq 1-\frac{\sigma^{2}}{\beta^{2}}.

then, we observe that:

|fθ​(𝐱′)−𝔼θ∼PR​[fθ​(𝐱′)]|<β\displaystyle|f_{\theta}(\mathbf{x}^{\prime})-\mathbb{E}_{\theta\sim P_{R}}[f_{\theta}(\mathbf{x}^{\prime})]|<\beta
⟹−β<fθ​(𝐱′)−𝔼θ∼PR​[fθ​(𝐱′)]<β\displaystyle\implies-\beta<f_{\theta}(\mathbf{x}^{\prime})-\mathbb{E}_{\theta\sim P_{R}}[f_{\theta}(\mathbf{x}^{\prime})]<\beta
⟹−β+𝔼θ∼PR​[fθ​(𝐱′)]<fθ​(𝐱′)<β+𝔼θ∼PR​[fθ​(𝐱′)]\displaystyle\implies-\beta+\mathbb{E}_{\theta\sim P_{R}}[f_{\theta}(\mathbf{x}^{\prime})]<f_{\theta}(\mathbf{x}^{\prime})<\beta+\mathbb{E}_{\theta\sim P_{R}}[f_{\theta}(\mathbf{x}^{\prime})]

By isolating the LHS of the inequality and substituting θ\theta for θ∗\theta^{*}, under the assumption θ∗∼PR​(θ)\theta^{*}\sim P_{R}(\theta):

fθ∗​(𝐱′)>𝔼θ∗∼PR​(θ)​[fθ​(𝐱′)]−β,\displaystyle f_{\theta^{*}}(\mathbf{x}^{\prime})>\mathbb{E}_{\theta^{*}\sim P_{R}(\theta)}[f_{\theta}(\mathbf{x}^{\prime})]-\beta,

and thus:

ℙθ∗∼PR​(θ)​(fθ∗​(𝐱′)>𝔼θ∗∼PR​(θ)​[fθ​(𝐱′)]−β)≥1−σ2β2.\displaystyle\mathbb{P}_{\theta^{*}\sim P_{R}(\theta)}\Big(f_{\theta^{*}}(\mathbf{x}^{\prime})>\mathbb{E}_{\theta^{*}\sim P_{R}(\theta)}[f_{\theta}(\mathbf{x}^{\prime})]-\beta\Big)\geq 1-\frac{\sigma^{2}}{\beta^{2}}.

∎

Related Preliminaries

Our AVCG approach is naturally inspired by the architectures of Variational Autoencoders (VAE) (Kingma and Welling 2014) and Conditional Variational Autoencoders (CVAE) (Sohn et al. 2015). For completeness, we show the derived Evidence Lower Bound (ELBO) for each of the methods.

Variational Autoencoder

The Variational Autoencoder (VAE) (Kingma and Welling 2014) is a foundational approach for amortized inference in generative models. The premise of the VAE is to maximise the log-evidence of an instance 𝐱\mathbf{x} (log p⁡(𝐱)p(\mathbf{x})), this is mathematically expressed and optimised for via the Evidence Lower Bound (ELBO) as follows:

log ​p​(𝐱)\displaystyle\text{log }p(\mathbf{x}) =log ​∫p⁡(𝐱∣𝐳)​p​(𝐳)​𝑑𝐳\displaystyle=\text{log }\int p(\mathbf{x}\mid\mathbf{z})p(\mathbf{z})d\mathbf{z}
=log ​∫q⁡(𝐳∣𝐱)​p⁡(𝐱∣𝐳)​p​(𝐳)q⁡(𝐳∣𝐱)​𝑑𝐳\displaystyle=\text{log }\int q(\mathbf{z}\mid\mathbf{x})\frac{p(\mathbf{x}\mid\mathbf{z})p(\mathbf{z})}{q(\mathbf{z}\mid\mathbf{x})}d\mathbf{z}
≥∫q⁡(𝐳∣𝐱)​log ​p⁡(𝐱∣𝐳)​p​(𝐳)q⁡(𝐳∣𝐱)​𝑑𝐳\displaystyle\geq\int q(\mathbf{z}\mid\mathbf{x})\text{log }\frac{p(\mathbf{x}\mid\mathbf{z})p(\mathbf{z})}{q(\mathbf{z}\mid\mathbf{x})}d\mathbf{z}
=𝔼q⁡(𝐳∣𝐱)[log p(𝐱∣𝐳)]−DK​L(q(𝐳|𝐱)∣∣p(𝐳)).\displaystyle=\mathbb{E}_{q(\mathbf{z}\mid\mathbf{x})}\bigg[\text{log }p(\mathbf{x}\mid\mathbf{z})\bigg]-D_{KL}\bigg(q(\mathbf{z}|\mathbf{x})\mid\mid p(\mathbf{z})\bigg).

Conditional Variational Autoencoder

The Conditional Variational Autoencoder (CVAE) (Sohn et al. 2015) imposes a conditional constraint 𝐜\mathbf{c}, such that:

log ​p​(𝐱∣𝐜)\displaystyle\text{log }p(\mathbf{x}\mid\mathbf{c}) =log ​∫p⁡(𝐱∣𝐳,𝐜)​p​(𝐳∣𝐜)​𝑑𝐳\displaystyle=\text{log }\int p(\mathbf{x}\mid\mathbf{z},\mathbf{c})p(\mathbf{z}\mid\mathbf{c})d\mathbf{z}
=log ​∫q⁡(𝐳∣𝐱,𝐜)​p⁡(𝐱∣𝐳,𝐜)​p​(𝐳∣𝐜)q⁡(𝐳∣𝐱,𝐜)​𝑑𝐳\displaystyle=\text{log }\int q(\mathbf{z}\mid\mathbf{x},\mathbf{c})\frac{p(\mathbf{x}\mid\mathbf{z},\mathbf{c})p(\mathbf{z}\mid\mathbf{c})}{q(\mathbf{z}\mid\mathbf{x},\mathbf{c})}d\mathbf{z}
≥∫q⁡(𝐳∣𝐱,𝐜)​log ​p⁡(𝐱∣𝐳,𝐜)​p​(𝐳∣𝐜)q⁡(𝐳∣𝐱,𝐜)​𝑑𝐳\displaystyle\geq\int q(\mathbf{z}\mid\mathbf{x},\mathbf{c})\text{log }\frac{p(\mathbf{x}\mid\mathbf{z},\mathbf{c})p(\mathbf{z}\mid\mathbf{c})}{q(\mathbf{z}\mid\mathbf{x},\mathbf{c})}d\mathbf{z}
=𝔼q⁡(𝐳∣𝐱,𝐜)​[log ​p​(𝐱∣𝐳,𝐜)]\displaystyle=\mathbb{E}_{q(\mathbf{z}\mid\mathbf{x},\mathbf{c})}\bigg[\text{log }p(\mathbf{x}\mid\mathbf{z},\mathbf{c})\bigg]
−DK​L(q(𝐳|𝐱,𝐜)∣∣p(𝐳∣𝐜)).\displaystyle-D_{KL}\bigg(q(\mathbf{z}|\mathbf{x},\mathbf{c})\mid\mid p(\mathbf{z}\mid\mathbf{c})\bigg).

Metrics

Validity measures whether the generated counterfactual successfully alters the prediction of the primary Bayesian predictor, such that:

Validity(𝐱′,y′)=𝕀[argmaxc𝔼θ∼P⁡(θ∣D)[fθ(𝐱′)c]=y′].\text{Validity}(\mathbf{x}^{\prime},y^{\prime})=\mathbb{I}\left[\arg\max_{c}\mathbb{E}_{\theta\sim P(\theta\mid D)}[f_{\theta}(\mathbf{x}^{\prime})_{c}]=y^{\prime}\right].

Implausibility (Imp) calculates the average Euclidean distance from the generated counterfactual to all training instances belonging to the target class, denoted by the set Dy′D_{y^{\prime}}:

Imp​(𝐱′)=1|Dy′|​∑𝐱i∈Dy′‖𝐱′−𝐱i‖2.\text{Imp}(\mathbf{x}^{\prime})=\frac{1}{|D_{y^{\prime}}|}\sum_{\mathbf{x}_{i}\in D_{y^{\prime}}}||\mathbf{x}^{\prime}-\mathbf{x}_{i}||_{2}.

IM1 Score evaluates manifold alignment, let A​Ec​(⋅)AE_{c}(\cdot) denote the reconstruction by an autoencoder trained exclusively on instances of class cc:

IM1​(𝐱′,yo​r​i​g,y′)=‖𝐱′−A​Ey′​(𝐱′)‖22‖𝐱′−A​Eyo​r​i​g​(𝐱′)‖22+η.\text{IM1}(\mathbf{x}^{\prime},y_{orig},y^{\prime})=\frac{||\mathbf{x}^{\prime}-AE_{y^{\prime}}(\mathbf{x}^{\prime})||_{2}^{2}}{||\mathbf{x}^{\prime}-AE_{y_{orig}}(\mathbf{x}^{\prime})||_{2}^{2}+\eta}.

Robustness to Noisy Executions (NE) measures the smoothness of the model’s posterior predictive distribution around the counterfactual. We inject Gaussian noise δ\delta into 𝐱′\mathbf{x}^{\prime} and measure the predictive discrepancy:

NE​(𝐱′)=𝔼δ​[‖𝔼θ​[fθ​(𝐱′)]−𝔼θ​[fθ​(𝐱′+δ)]‖22].\text{NE}(\mathbf{x}^{\prime})=\mathbb{E}_{\delta}\left[\Big\|\mathbb{E}_{\theta}[f_{\theta}(\mathbf{x}^{\prime})]-\mathbb{E}_{\theta}[f_{\theta}(\mathbf{x}^{\prime}+\delta)]\Big\|_{2}^{2}\right].

Robustness to Input Changes (RI​CR_{IC}) evaluates the stability of the counterfactual generator itself, gϕ​(⋅)g_{\phi}(\cdot). We subject the original input 𝐱\mathbf{x} to an input perturbation δ\delta:

RI​C​(𝐱,σ)=‖gϕ​(𝐱+δ,y′)−gϕ​(𝐱,y′)‖22‖gϕ​(𝐱,y′)−𝐱‖22+η.\text{R}_{IC}(\mathbf{x},\sigma)=\frac{||g_{\phi}(\mathbf{x}+\delta,y^{\prime})-g_{\phi}(\mathbf{x},y^{\prime})||_{2}^{2}}{||g_{\phi}(\mathbf{x},y^{\prime})-\mathbf{x}||_{2}^{2}+\eta}.

Implementation Details

In practice, we use automatic differentiation in PyTorch. Expectations over the Rashomon-restricted posterior are approximated using 50 Monte Carlo dropout forward passes per instance providing an empirical hypothesis-space approximation since MC Dropout is used defining a Rashomon set providing predictive multiplicity estimation (Hsu et al. 2024).

Latent expectations are estimated using 5 samples from qψ​(𝐳∣𝐱,y′)q_{\psi}(\mathbf{z}\mid\mathbf{x},y^{\prime}). We approximate the Rashomon-restricted posterior using an empirical uniform distribution over retained MC-dropout predictors satisfying the validation loss constraint under a deterministic set of ϵ\epsilon, following recent results showing that dropout masks produce models that lie within the Rashomon set with high probability. (Hsu et al. 2024)

Image Dataset Results

In Table 3 we present additional results on MNIST and CIFAR10 to show our method generalises to image data.

Table 3: Amortized Counterfactual Evaluation on High-Dimensional Image Datasets (Mean ±\pm std over 5 seeds).
Method Val ↑\uparrow IM1 ↓\downarrow Imp ↓\downarrow Div ↑\uparrow CMV ↑\uparrow NE ↓\downarrow RIC ↓\downarrow RVR ↑\uparrow Time (s) ↓\downarrow
Dataset: CIFAR-10
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
Batten et al. 0.940 ±\pm 0.238 1.115 ±\pm 0.189 93.594 ±\pm 13.378 0.000 ±\pm 0.000 0.068 ±\pm 0.175 0.0097 ±\pm 0.0089 0.4985 ±\pm 0.1547 0.774 ±\pm 0.418 0.0022 ±\pm 0.0009
QUCE 0.928 ±\pm 0.259 1.082 ±\pm 0.449 90.446 ±\pm 12.771 0.000 ±\pm 0.000 0.254 ±\pm 0.307 0.0082 ±\pm 0.0058 0.0481 ±\pm 0.0391 0.622 ±\pm 0.485 0.0114 ±\pm 0.0059
Schut et al. 0.944 ±\pm 0.230 1.103 ±\pm 0.157 94.061 ±\pm 13.460 0.000 ±\pm 0.000 0.116 ±\pm 0.233 0.0126 ±\pm 0.0131 0.4461 ±\pm 0.4465 0.900 ±\pm 0.300 1.8211 ±\pm 0.5513
AVCG-B 1.000 ±\pm 0.000 1.036 ±\pm 0.166 67.878 ±\pm 5.515 6.033 ±\pm 1.056 0.774 ±\pm 0.305 0.0000 ±\pm 0.0000 0.0103 ±\pm 0.0092 1.000 ±\pm 0.000 0.0013 ±\pm 0.0001
AVCG-R (ϵ=0.0\epsilon=0.0) 0.998 ±\pm 0.045 1.085 ±\pm 0.252 67.673 ±\pm 5.397 6.485 ±\pm 2.069 0.324 ±\pm 0.380 0.0130 ±\pm 0.0157 0.0129 ±\pm 0.0165 1.000 ±\pm 0.000 0.0014 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
Batten et al. 0.926 ±\pm 0.262 1.115 ±\pm 0.189 93.582 ±\pm 13.467 0.000 ±\pm 0.000 0.068 ±\pm 0.175 0.0103 ±\pm 0.0098 0.5035 ±\pm 0.1615 0.743 ±\pm 0.227 0.0022 ±\pm 0.0009
QUCE 0.940 ±\pm 0.238 1.082 ±\pm 0.449 90.492 ±\pm 12.757 0.000 ±\pm 0.000 0.254 ±\pm 0.307 0.0085 ±\pm 0.0056 0.0460 ±\pm 0.0408 0.631 ±\pm 0.186 0.0114 ±\pm 0.0059
Schut et al. 0.952 ±\pm 0.214 1.103 ±\pm 0.157 94.145 ±\pm 13.347 0.000 ±\pm 0.000 0.116 ±\pm 0.233 0.0122 ±\pm 0.0140 0.4385 ±\pm 0.4415 0.880 ±\pm 0.204 1.8211 ±\pm 0.5513
AVCG-B 1.000 ±\pm 0.000 1.036 ±\pm 0.166 67.854 ±\pm 5.622 6.033 ±\pm 1.056 0.774 ±\pm 0.305 0.0000 ±\pm 0.0000 0.0105 ±\pm 0.0105 1.000 ±\pm 0.000 0.0013 ±\pm 0.0001
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 1.050 ±\pm 0.175 67.602 ±\pm 5.572 6.422 ±\pm 1.194 0.513 ±\pm 0.389 0.0018 ±\pm 0.0047 0.0115 ±\pm 0.0106 1.000 ±\pm 0.000 0.0014 ±\pm 0.0001
Dataset: MNIST
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
Batten et al. 0.834 ±\pm 0.372 1.410 ±\pm 0.408 34.425 ±\pm 2.324 0.000 ±\pm 0.000 0.023 ±\pm 0.102 0.0159 ±\pm 0.0145 0.6965 ±\pm 0.1516 0.670 ±\pm 0.470 0.0074 ±\pm 0.0021
QUCE 0.890 ±\pm 0.313 1.392 ±\pm 0.622 30.619 ±\pm 2.075 0.000 ±\pm 0.000 0.326 ±\pm 0.343 0.0131 ±\pm 0.0117 0.0372 ±\pm 0.0405 0.620 ±\pm 0.485 0.0310 ±\pm 0.0148
Schut et al. 0.982 ±\pm 0.133 1.337 ±\pm 0.419 34.737 ±\pm 2.480 0.000 ±\pm 0.000 0.252 ±\pm 0.298 0.0178 ±\pm 0.0213 0.5169 ±\pm 0.4543 0.928 ±\pm 0.259 1.3342 ±\pm 0.4253
AVCG-B 1.000 ±\pm 0.000 1.218 ±\pm 0.577 26.871 ±\pm 1.557 2.489 ±\pm 0.241 0.891 ±\pm 0.245 0.0000 ±\pm 0.0000 0.0138 ±\pm 0.0053 1.000 ±\pm 0.000 0.0013 ±\pm 0.0001
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 1.367 ±\pm 0.778 26.975 ±\pm 1.577 2.442 ±\pm 0.247 0.482 ±\pm 0.375 0.0031 ±\pm 0.0045 0.0138 ±\pm 0.0059 1.000 ±\pm 0.000 0.0014 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
Batten et al. 0.800 ±\pm 0.400 1.410 ±\pm 0.408 34.430 ±\pm 2.309 0.000 ±\pm 0.000 0.023 ±\pm 0.102 0.0157 ±\pm 0.0131 0.7023 ±\pm 0.1521 0.588 ±\pm 0.198 0.0074 ±\pm 0.0021
QUCE 0.882 ±\pm 0.323 1.392 ±\pm 0.622 30.602 ±\pm 2.115 0.000 ±\pm 0.000 0.326 ±\pm 0.343 0.0120 ±\pm 0.0105 0.0377 ±\pm 0.0570 0.605 ±\pm 0.207 0.0310 ±\pm 0.0148
Schut et al. 0.984 ±\pm 0.126 1.337 ±\pm 0.419 34.734 ±\pm 2.477 0.000 ±\pm 0.000 0.252 ±\pm 0.298 0.0173 ±\pm 0.0173 0.4975 ±\pm 0.4247 0.909 ±\pm 0.133 1.3342 ±\pm 0.4253
AVCG-B 1.000 ±\pm 0.000 1.218 ±\pm 0.577 26.870 ±\pm 1.501 2.489 ±\pm 0.241 0.891 ±\pm 0.245 0.0000 ±\pm 0.0000 0.0138 ±\pm 0.0055 1.000 ±\pm 0.000 0.0013 ±\pm 0.0001
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 1.243 ±\pm 0.631 26.944 ±\pm 1.596 2.369 ±\pm 0.262 0.823 ±\pm 0.273 0.0000 ±\pm 0.0000 0.0124 ±\pm 0.0053 1.000 ±\pm 0.000 0.0014 ±\pm 0.0001

Appendix B Additional ϵ\epsilon-Sweep Results

In Figures 3–5 we provide additional ϵ\epsilon-sweeps across all Tabular datasets presented in the main paper.

Refer to caption
Figure 3: ϵ\epsilon-sweep on the adult income dataset for AVCG-R. Here we observe the impact of the ϵ\epsilon hyperparameter for the Rashomon set.
Refer to caption
Figure 4: ϵ\epsilon-sweep on the breast cancer dataset for AVCG-R. Here we observe the impact of the ϵ\epsilon hyperparameter for the Rashomon set.
Refer to caption
Figure 5: ϵ\epsilon-sweep on the heart disease dataset for AVCG-R. Here we observe the impact of the ϵ\epsilon hyperparameter for the Rashomon set.

Appendix C Ablations

In Figure 6 and Figure 7 we provide ablation studies on each term across each metric.

Refer to caption
Figure 6: Ablation study on the heart disease dataset across key metrics.
Refer to caption
Figure 7: Ablation study on the spambase dataset across key metrics.

Appendix D Additional Methods

In this section we provide a brief comparison of the standard Conditional VAE (CVAE) inferencing p⁡(𝐱∣y′,𝐳)p(\mathbf{x}\mid y^{\prime},\mathbf{z}), where p⁡(𝐱∣y,𝐳)p(\mathbf{x}\mid y,\mathbf{z}) is the learned standard CVAE. We also include Wachter et al. (Wachter et al. 2018).

Table 4: Amortized Counterfactual Evaluation on Adult Income and Breast Cancer (Mean ±\pm std over 5 seeds).
Method Val ↑\uparrow IM1 ↓\downarrow Imp ↓\downarrow Div ↑\uparrow CMV ↑\uparrow NE ↓\downarrow RIC ↓\downarrow RVR ↑\uparrow Time (s) ↓\downarrow
Dataset: Adult Income
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
CF-VAE 0.226 ±\pm 0.418 1.404 ±\pm 0.966 10.246 ±\pm 2.855 2.332 ±\pm 0.568 0.224 ±\pm 0.378 0.0009 ±\pm 0.0029 0.1553 ±\pm 0.1150 0.206 ±\pm 0.393 0.0004 ±\pm 0.0001
Wachter et al. 0.762 ±\pm 0.426 2.531 ±\pm 3.570 11.712 ±\pm 3.317 0.000 ±\pm 0.000 0.550 ±\pm 0.319 0.0074 ±\pm 0.0106 0.0087 ±\pm 0.0271 0.396 ±\pm 0.368 0.0603 ±\pm 0.1166
AVCG-B 1.000 ±\pm 0.000 0.756 ±\pm 0.202 8.328 ±\pm 0.047 0.027 ±\pm 0.009 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0003 ±\pm 0.0000
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.768 ±\pm 0.202 8.346 ±\pm 0.055 0.021 ±\pm 0.009 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0004 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
CF-VAE 0.232 ±\pm 0.422 1.404 ±\pm 0.966 10.246 ±\pm 2.855 2.332 ±\pm 0.568 0.224 ±\pm 0.378 0.0009 ±\pm 0.0030 0.1570 ±\pm 0.1215 0.222 ±\pm 0.390 0.0004 ±\pm 0.0001
Wachter et al. 0.792 ±\pm 0.406 2.531 ±\pm 3.570 11.712 ±\pm 3.317 0.000 ±\pm 0.000 0.550 ±\pm 0.319 0.0065 ±\pm 0.0074 0.0096 ±\pm 0.0312 0.549 ±\pm 0.122 0.0603 ±\pm 0.1166
AVCG-B 1.000 ±\pm 0.000 0.756 ±\pm 0.202 8.328 ±\pm 0.047 0.027 ±\pm 0.009 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0003 ±\pm 0.0000
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 0.769 ±\pm 0.211 8.335 ±\pm 0.049 0.018 ±\pm 0.007 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0000 ±\pm 0.0000 1.000 ±\pm 0.000 0.0005 ±\pm 0.0001
Dataset: Breast Cancer
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
CF-VAE 0.414 ±\pm 0.493 2.909 ±\pm 2.912 6.704 ±\pm 1.094 2.031 ±\pm 0.471 0.380 ±\pm 0.460 0.0016 ±\pm 0.0036 0.2866 ±\pm 0.2297 0.411 ±\pm 0.471 0.0011 ±\pm 0.0003
Wachter et al. 0.748 ±\pm 0.434 1.609 ±\pm 0.827 7.260 ±\pm 1.236 0.000 ±\pm 0.000 0.335 ±\pm 0.319 0.0072 ±\pm 0.0076 0.0008 ±\pm 0.0024 0.583 ±\pm 0.184 0.0640 ±\pm 0.0565
AVCG-B 1.000 ±\pm 0.000 0.573 ±\pm 0.136 5.341 ±\pm 0.543 1.132 ±\pm 0.162 1.000 ±\pm 0.000 0.0000 ±\pm 0.0003 0.0473 ±\pm 0.0361 1.000 ±\pm 0.000 0.0003 ±\pm 0.0000
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.597 ±\pm 0.143 5.305 ±\pm 0.527 1.172 ±\pm 0.171 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0484 ±\pm 0.0413 1.000 ±\pm 0.000 0.0004 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
CF-VAE 0.414 ±\pm 0.493 2.908 ±\pm 2.912 6.704 ±\pm 1.094 2.031 ±\pm 0.471 0.380 ±\pm 0.460 0.0016 ±\pm 0.0036 0.3048 ±\pm 0.2510 0.417 ±\pm 0.460 0.0011 ±\pm 0.0003
Wachter et al. 0.768 ±\pm 0.422 1.609 ±\pm 0.827 7.260 ±\pm 1.236 0.000 ±\pm 0.000 0.335 ±\pm 0.319 0.0075 ±\pm 0.0079 0.0008 ±\pm 0.0020 0.576 ±\pm 0.067 0.0640 ±\pm 0.0565
AVCG-B 1.000 ±\pm 0.000 0.573 ±\pm 0.136 5.341 ±\pm 0.543 1.132 ±\pm 0.162 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0466 ±\pm 0.0397 1.000 ±\pm 0.000 0.0003 ±\pm 0.0000
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 0.591 ±\pm 0.167 5.297 ±\pm 0.591 1.101 ±\pm 0.175 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0450 ±\pm 0.0370 1.000 ±\pm 0.000 0.0004 ±\pm 0.0001
Table 5: Amortized Counterfactual Evaluation on Heart Disease and Spambase (Mean ±\pm std over 5 seeds).
Method Val ↑\uparrow IM1 ↓\downarrow Imp ↓\downarrow Div ↑\uparrow CMV ↑\uparrow NE ↓\downarrow RIC ↓\downarrow RVR ↑\uparrow Time (s) ↓\downarrow
Dataset: Heart Disease
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
CF-VAE 0.218 ±\pm 0.412 3.682 ±\pm 5.346 4.160 ±\pm 0.462 1.282 ±\pm 0.281 0.212 ±\pm 0.390 0.0006 ±\pm 0.0005 0.1212 ±\pm 0.1098 0.223 ±\pm 0.387 0.0011 ±\pm 0.0001
Wachter et al. 0.581 ±\pm 0.493 1.141 ±\pm 0.358 4.808 ±\pm 0.456 0.000 ±\pm 0.000 0.408 ±\pm 0.340 0.0034 ±\pm 0.0033 0.0040 ±\pm 0.0240 0.500 ±\pm 0.221 0.0408 ±\pm 0.0223
AVCG-B 1.000 ±\pm 0.000 0.407 ±\pm 0.163 3.616 ±\pm 0.123 0.670 ±\pm 0.127 1.000 ±\pm 0.000 0.0002 ±\pm 0.0002 0.0245 ±\pm 0.0201 1.000 ±\pm 0.000 0.0003 ±\pm 0.0001
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.407 ±\pm 0.126 3.633 ±\pm 0.126 0.699 ±\pm 0.135 1.000 ±\pm 0.000 0.0002 ±\pm 0.0002 0.0219 ±\pm 0.0180 1.000 ±\pm 0.000 0.0004 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
CF-VAE 0.226 ±\pm 0.418 3.682 ±\pm 5.346 4.160 ±\pm 0.461 1.282 ±\pm 0.281 0.212 ±\pm 0.390 0.0006 ±\pm 0.0005 0.1255 ±\pm 0.1109 0.223 ±\pm 0.376 0.0011 ±\pm 0.0001
Wachter et al. 0.581 ±\pm 0.493 1.141 ±\pm 0.358 4.808 ±\pm 0.456 0.000 ±\pm 0.000 0.408 ±\pm 0.340 0.0033 ±\pm 0.0032 0.0037 ±\pm 0.0190 0.517 ±\pm 0.067 0.0408 ±\pm 0.0223
AVCG-B 1.000 ±\pm 0.000 0.407 ±\pm 0.163 3.616 ±\pm 0.123 0.670 ±\pm 0.127 1.000 ±\pm 0.000 0.0002 ±\pm 0.0002 0.0261 ±\pm 0.0341 1.000 ±\pm 0.004 0.0003 ±\pm 0.0001
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 0.436 ±\pm 0.166 3.628 ±\pm 0.107 0.656 ±\pm 0.128 1.000 ±\pm 0.000 0.0002 ±\pm 0.0001 0.0190 ±\pm 0.0144 1.000 ±\pm 0.000 0.0004 ±\pm 0.0001
Dataset: Spambase
Environment: ϵ=0.0\epsilon=0.0 (Strict Empirical Bound)
CF-VAE 0.334 ±\pm 0.472 3.159 ±\pm 3.534 8.248 ±\pm 2.909 2.520 ±\pm 0.499 0.346 ±\pm 0.437 0.0060 ±\pm 0.0205 0.3544 ±\pm 0.2724 0.334 ±\pm 0.446 0.0011 ±\pm 0.0001
Wachter et al. 0.732 ±\pm 0.443 2.750 ±\pm 2.440 9.535 ±\pm 3.474 0.000 ±\pm 0.000 0.495 ±\pm 0.331 0.0227 ±\pm 0.0188 0.0054 ±\pm 0.0178 0.566 ±\pm 0.252 0.0301 ±\pm 0.0448
AVCG-B 1.000 ±\pm 0.000 0.983 ±\pm 0.244 6.276 ±\pm 0.091 0.744 ±\pm 0.107 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0231 ±\pm 0.0231 1.000 ±\pm 0.000 0.0003 ±\pm 0.0000
AVCG-R (ϵ=0.0\epsilon=0.0) 1.000 ±\pm 0.000 0.925 ±\pm 0.207 6.278 ±\pm 0.084 0.832 ±\pm 0.117 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0295 ±\pm 0.0293 1.000 ±\pm 0.000 0.0004 ±\pm 0.0001
Environment: ϵ=0.8\epsilon=0.8 (Relaxed Empirical Bound)
CF-VAE 0.334 ±\pm 0.472 3.216 ±\pm 3.381 8.242 ±\pm 2.946 2.454 ±\pm 0.484 0.348 ±\pm 0.432 0.0044 ±\pm 0.0103 0.3346 ±\pm 0.2369 0.333 ±\pm 0.435 0.0011 ±\pm 0.0001
Wachter et al. 0.716 ±\pm 0.451 2.750 ±\pm 2.440 9.535 ±\pm 3.475 0.000 ±\pm 0.000 0.495 ±\pm 0.331 0.0221 ±\pm 0.0179 0.0051 ±\pm 0.0168 0.569 ±\pm 0.100 0.0301 ±\pm 0.0448
AVCG-B 1.000 ±\pm 0.000 0.983 ±\pm 0.244 6.276 ±\pm 0.091 0.776 ±\pm 0.128 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0242 ±\pm 0.0249 1.000 ±\pm 0.001 0.0003 ±\pm 0.0000
AVCG-R (ϵ=0.8\epsilon=0.8) 1.000 ±\pm 0.000 1.037 ±\pm 0.238 6.332 ±\pm 0.087 0.690 ±\pm 0.108 1.000 ±\pm 0.000 0.0000 ±\pm 0.0000 0.0208 ±\pm 0.0239 1.000 ±\pm 0.000 0.0004 ±\pm 0.0001