Papers
Topics
Authors
Recent
Search
2000 character limit reached

BetaRCE: Robust Counterfactual Explanations

Updated 14 July 2026
  • BetaRCE is a post-hoc, model-agnostic method for robustifying counterfactual explanations by certifying their validity under specified model changes.
  • It formalizes robustness probabilistically over a user-defined model distribution using Bernoulli trials and a Beta-posterior test to guarantee (δ, α)-robustness.
  • Empirical results show that BetaRCE preserves the proximity and plausibility of base counterfactuals while achieving competitive robustness relative to other methods.

BetaRCE is a post-hoc, model-agnostic method for robustifying counterfactual explanations (CFEs) under model change. It is designed for settings in which a counterfactual generated for a fixed predictive model may cease to be valid after retraining, bootstrap resampling, architecture variation, seed changes, or related updates. The method formalizes robustness probabilistically over a user-defined distribution of admissible changed models, and it uses a Beta-posterior test to certify whether a candidate counterfactual satisfies a specified robustness target with a specified confidence level. BetaRCE is applied alongside a chosen base CFE method, with the stated aim of facilitating a transition from the base explanation to a more robust one while preserving proximity and plausibility as much as possible (Stępka et al., 2024).

1. Formal problem setting

BetaRCE begins from a dynamic view of recourse. In the underlying framework, a counterfactual xcfx^{cf} for a model MM is robust to a model change MM' if M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf}). Rather than requiring this equality to hold for all conceivable successor models, the method introduces a user-defined model space MM\mathcal{M}_M, described as the probabilistic distribution over all models that could result from specified allowable changes. Robustness is then stated in probabilistic form: P(M(xcf)=M(xcf))δforMMM.P(M'(x^{cf}) = M(x^{cf})) \geq \delta \quad\text{for}\quad M' \sim \mathcal{M}_M .

This definition makes the target explicit. A counterfactual is not required to survive arbitrary distribution shift or unrestricted architectural change; it is required to remain valid with probability at least δ\delta under the admissible changes encoded in MM\mathcal{M}_M. This is important because a common misconception is to equate “robust” with universal invariance. BetaRCE instead addresses robustness relative to a specified operational envelope, which is narrower but statistically certifiable (Stępka et al., 2024).

To obtain a confidence statement rather than only a point estimate, the framework introduces (δ,α)(\delta,\alpha)-robustness: P(δ^>δ)>α,P(\hat{\delta} > \delta) > \alpha , where MM0 is the estimated robustness probability over sampled models. In the paper’s formulation, this provides a probabilistic guarantee that the counterfactual is likely, with confidence level MM1, to meet or exceed the desired robustness level MM2. The paper notes that this aligns conceptually with PAC-style guarantees.

2. Beta-posterior certification

The certification mechanism is Bayesian. For a fixed candidate counterfactual, robustness with respect to a sampled changed model is a binary event: the changed model either preserves the desired classification or it does not. BetaRCE therefore models repeated evaluations across sampled models as Bernoulli trials and places a Beta prior on the success probability. The prior used is BetaMM3, identified in the paper as the Jeffreys prior.

Given MM4 sampled models from MM5, the posterior is updated by incrementing the success parameter MM6 for each robust trial and the failure parameter MM7 for each failure. The decision rule is

MM8

where MM9 is the Beta CDF inverse. The corresponding algorithm initializes MM'0, samples MM'1 models, updates MM'2 or MM'3 depending on whether the candidate attains the desired class, and accepts the candidate if the quantile condition is satisfied (Stępka et al., 2024).

This construction makes the method’s guarantees interpretable. The threshold MM'4 governs the minimum acceptable robustness probability, while MM'5 governs the confidence with which that lower bound is asserted. The use of a conjugate Beta posterior also yields a computationally simple test that can be embedded in a search procedure without requiring model-specific analytical structure.

3. Post-hoc robustification procedure

Algorithmically, BetaRCE is a robustifier layered on top of an existing CFE generator. The pipeline begins with a base counterfactual produced by any preferred method; the paper explicitly mentions DiCE, GrowingSpheres, and FACE as examples. BetaRCE then solves a constrained optimization problem that seeks a nearby replacement counterfactual: MM'6 subject to validity under the current model and MM'7-robustness as verified by the Beta-posterior test.

In the reported implementation, GrowingSpheres is employed to search for nearby points satisfying both constraints, although the framework is presented as general to any black-box optimizer. The output is the closest robust CFE to the original base CFE. This preserves the post-hoc nature of the method: BetaRCE does not replace the base generator’s objective altogether, but instead perturbs the base explanation only as much as is needed to satisfy the robustness certificate (Stępka et al., 2024).

This architecture is central to the method’s positioning. Because it acts only on the generated explanation and not on the predictive model’s training loop, it is compatible with arbitrary downstream models and arbitrary upstream CFE generators. The paper characterizes this as “plug-and-play,” and the empirical discussion links that design choice to improved preservation of the base explanation’s properties, including sparsity, proximity, and plausibility, subject to the robustness constraint.

4. Hyperparameters and controllable guarantees

BetaRCE exposes three principal hyperparameters: MM'8, MM'9, and M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})0. The first is the minimum probability that the counterfactual remains valid after model change; the second is the confidence level of the guarantee; the third is the number of models sampled from M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})1 for robustness estimation. The paper emphasizes that these hyperparameters are directly tied to the semantics of the task rather than to opaque optimization heuristics.

The paper also provides the relation

M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})2

which is used to connect achievable robustness bounds to the number of sampled models. In the stated interpretation, larger M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})3 allows larger achievable M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})4 and improves statistical certainty, at the cost of additional computation (Stępka et al., 2024).

This parameterization matters because several earlier approaches to robust counterfactual generation are described as requiring extensive or dataset-specific tuning. BetaRCE instead makes the trade-off user-legible: one can specify, for example, a requirement that a counterfactual should work in at least M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})5 of likely model changes with M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})6 confidence, and then choose M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})7 accordingly. A plausible implication is that this framing makes robustness constraints easier to communicate in applied recourse settings, where stakeholders often think in terms of probabilities and confidence rather than surrogate regularization weights.

5. Empirical evaluation and comparative behavior

The empirical study reported in the paper evaluates BetaRCE on the Diabetes, HELOC, Wine, and Breast Cancer datasets, using neural networks and, in the appendix, LightGBM. The admissible model-change distributions M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})8 include architecture variation, bootstrap retraining, and seed changes. The reported metrics are empirical robustness, proximity, plausibility, and distance to base; for robustifiers, distance to base is measured as the M(xcf)=M(xcf)M(x^{cf}) = M'(x^{cf})9 distance from the robust CFE to the original CFE (Stępka et al., 2024).

The main findings are threefold. First, empirical robustness for BetaRCE is reported to closely track or exceed the specified lower credible bound across datasets and change types, even with a modest number of retrained models. Second, BetaRCE robustified CFEs are reported to be much closer to the base CFE than competing robust post-hoc methods such as RobX. Third, end-to-end robust methods such as RBR and ROAR underperform in achieved robustness compared with BetaRCE and RobX, while RobX can attain higher robustness only at a much higher cost in distance from the base CFE and sometimes more degraded plausibility.

The paper gives a concrete Diabetes example under architecture change: RobX attains empirical robustness MM\mathcal{M}_M0, distance to base MM\mathcal{M}_M1, proximity MM\mathcal{M}_M2, and plausibility MM\mathcal{M}_M3, whereas BetaRCE attains empirical robustness MM\mathcal{M}_M4, distance to base MM\mathcal{M}_M5, proximity MM\mathcal{M}_M6, and plausibility MM\mathcal{M}_M7. In that example, MM\mathcal{M}_M8 was set, and the reported interpretation is that BetaRCE reaches nearly the target robustness while remaining less than twice as far from the base explanation as RobX (Stępka et al., 2024).

The study also reports that the probabilistic bounds hold for in-distribution model changes, whereas robustness may degrade under out-of-distribution changes, although BetaRCE still improves robustness over baselines. This qualification is important: the method’s guarantees are distribution-relative, not universal, and their validity depends on how faithfully MM\mathcal{M}_M9 captures the relevant model evolution process.

6. Scope, limitations, and naming ambiguity

BetaRCE occupies a specific niche in the counterfactual-explanation literature. It is neither an end-to-end robust recourse model nor a model-specific robustness certificate. Its contribution is a post-hoc, model-agnostic robustification layer with a Beta-posterior acceptance test and user-tunable probability bounds. Its practical advantages, as stated in the paper, include model agnosticism, compatibility with any base CFE method, interpretable hyperparameters, one-time pre-sampling of models followed by relatively cheap robustification, and improved faithfulness to the base explanation (Stępka et al., 2024).

Its limitations follow directly from the same formulation. The guarantee is meaningful only relative to the admissible model-change distribution P(M(xcf)=M(xcf))δforMMM.P(M'(x^{cf}) = M(x^{cf})) \geq \delta \quad\text{for}\quad M' \sim \mathcal{M}_M .0; if that distribution is misspecified, the operational guarantee may cease to match real deployment conditions. The method also incurs computational cost through repeated evaluation on sampled models, and the achievable robustness threshold depends on P(M(xcf)=M(xcf))δforMMM.P(M'(x^{cf}) = M(x^{cf})) \geq \delta \quad\text{for}\quad M' \sim \mathcal{M}_M .1, P(M(xcf)=M(xcf))δforMMM.P(M'(x^{cf}) = M(x^{cf})) \geq \delta \quad\text{for}\quad M' \sim \mathcal{M}_M .2, and the actual stability of the prediction region around the candidate counterfactual.

The term “BetaRCE” is also ambiguous across fields. In econometrics, the 2026 paper “A Beta-Based Heteroskedasticity-Consistent Covariance Matrix Estimator” uses the label for a different object: a heteroskedasticity-consistent covariance matrix estimator for ordinary least squares regression, denoted HCB or “BetaRCE,” in which conventional leverage-based adjustment is replaced by a correction derived from a fitted Beta distribution (Cunha et al., 12 Jul 2026). That estimator belongs to the literature on robust covariance estimation rather than counterfactual explanations. The shared label reflects the use of Beta-distribution-based adjustment in both cases, but the methods address distinct problems, operate on different mathematical objects, and should not be conflated.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to BetaRCE.