Counterfactual recourse provides actionable feature adjustments that reverse unfavourable predictions made by automated decision models. However, when recourse search optimizes purely against classifier confidence or narrow proxy scores over gradient-boosted decision trees (GBDT), search procedures can exploit boundary artifacts and low-density regions---an instance of Goodhart's law---yielding out-of-distribution (OOD) recommendations that appear favourable nominally while lacking manifold plausibility. In this paper, we study conformalized OOD gating coupled with actionability-constrained counterfactual search across two tabular benchmarks: Adult and Give Me Some Credit (GMSC). Calibrating finite-sample anomaly gates (gate_IF, gate_LOF, and the conjunctive gate_ALL) at significance level delta = 0.05 over isolation forest, local outlier factor, and k-nearest-neighbor signals, we audit generated counterfactuals against held-out GMM and OCSVM detectors alongside ablation studies (gen10, gen100, and relax). Across matched recourse pairs where both constrained and unconstrained searches succeed, gate_ALL significantly reduces held-out OCSVM flags on Adult (N=541, Delta flag_OCSVM = -0.0296, p_Holm = 4.0e-4) and lowers both held-out flags on GMSC (N=540, Delta flag_OCSVM = -0.0346, p = 1.0751e-4; Delta flag_GMM = -0.1663, p = 3.5679e-16) while increasing matched recourse cost (Delta cost = +0.3035, p = 1.3365e-5) and narrowing overall feasibility. Our findings formalize the cost--feasibility--plausibility trade-off and demonstrate how conformal OOD gating audits recourse reliability on tabular ensembles.
Figures & tables
Dataset
Gate
found
prob
cost
n_chg
robust
IF
LOF
kNN
GMM
OCSVM
Adult
none
0.5970
0.6246
2.8594
2.3819
0.9012
0.0938
0.0854
0.1357
0.0670
0.1625
Adult
gate_IF
0.5650
0.6253
2.7996
2.3646
0.9070
0.0195
0.0885
0.0779
0.0354
0.1044
Adult
gate_LOF
0.5940
0.6253
2.8624
2.4074
0.9020
0.0875
0.0236
0.1212
0.0623
0.1481
Adult
gate_ALL
0.5420
0.6259
2.7185
2.3598
0.9151
0.0037
0.0185
0.0203
0.0203
0.0664
GMSC
none
0.9240
0.6602
0.4361
3.0169
—
0.8342
0.4715
0.4181
0.5643
0.1637
GMSC
gate_IF
0.3383
0.7000
0.6915
3.0921
—
0.3301
0.3167
0.1094
0.1804
0.0384
Table 1: Feasibility rate ( found ) and conditional mean metrics across successful counterfactuals ( found =1 ) on Adult and GMSC .
Figure 1: Comparison of OOD flag rates across gates relative to real favourable reference baselines.
Figure 2: Trade-off behavior across gates between feasibility, cost, and distributional plausibility.
Figure 3: Paired effect sizes of conformal gates relative to unconstrained recourse ( none ) on matched recourse pairs.
Variant
Gate
found
prob
cost
n_chg
flag_IF
robust
gen10
gate_IF
0.4800
0.6296
2.8885
2.3472
0.0208
0.9097
gen10
none
0.5067
0.6283
2.9738
2.3618
0.0987
0.9035
gen100
gate_IF
0.4933
0.6270
2.9763
2.3851
0.0270
0.9009
gen100
none
0.5167
0.6261
3.0115
2.4065
0.0968
0.9032
relax
gate_IF
0.7233
0.6326
2.9935
2.9355
0.0092
0.9217
relax
none
0.7367
0.6317
2.9970
2.9231
0.0679
0.9246
Table 2: Ablation results on Adult ( τp=0.6 ) comparing gate_IF and none across gen10 , gen100 , and relax .
Counterfactual explanations show how changing an input could alter a model’s prediction, supporting model understanding, auditing, and actionable recourse.
Accurate and explainable out-of-distribution (OOD) detection is required to use machine learning systems safely. Previous work has shown that feature distance to decision boundaries can be used to identify OOD data effectively. In this paper, we build on this intuition and propose a post-hoc OOD detection method that, given an input, calculates the distance to decision boundaries by leveraging counterfactual explanations. Since computing explanations can be expensive for large architectures, we also propose strategies to improve scalability by computing counterfactuals directly in embedding space. Crucially, as the method employs counterfactual explanations, we can seamlessly use them to help interpret the results of our detector. We show that our method is in line with the state of the art on CIFAR-10, achieving 93.50% AUROC and 25.80% FPR95. Our method outperforms these methods on CIFAR-100 with 97.05% AUROC and 13.79% FPR95 and on ImageNet-200 with 92.55% AUROC and 33.55% FPR95 across four OOD datasets
Maria Stoica, Francesco Leofante, Alessio Lomuscio
A gradient-boosted ensemble predicts by summing one leaf value per tree. Read those values as coordinates rather than as intermediate results, and every instance becomes a point in R^M on which the model acts linearly: the score is the sum of the coordinates. This small change of view makes contrastive explanation exact. The difference between two instances is a vector that is identically zero wherever they share a leaf, so the gap between a rejected applicant and an accepted one is carried by a handful of coordinates, each traceable to a real split in a real tree. Nothing is fitted, sampled, or assumed additive in features -- the additivity is already there, in the right space. We build a recourse method on this representation and evaluate it on five tabular datasets under repeated cross-validation. Its recommendation reconstructs the model's own decision to 6.2 x 10^-15, so an auditor can re-check the arithmetic without the model. On the credit datasets it is Pareto-non-dominated on effort against realism. And when recommendations are restricted to changes the subject could actually make -- not their age, not a settled delinquency -- it retains 58% of its validity where the strongest baseline retains 41%, a distinction the standard evaluation cannot see because it never asks whether a recommendation can be carried out.
Counterfactual explanations are widely used to provide algorithmic recourse in high-stakes decision-making systems. Most existing methods seek the smallest change to an input that flips a model's decision. However, decision-makers often rely not only on predicted labels but also on confidence thresholds and risk margins. Counterfactuals that barely cross a decision boundary can be fragile and unstable under noise or model variation. In this paper, we propose Target-confidence Recourse Using tSeTlin machines (TRUST), a framework in which users explicitly specify the desired prediction confidence for recourse. Rather than generating counterfactuals and evaluating confidence afterward, TRUST directly searches for minimal changes that satisfy a user-defined confidence target, enabling comparison of recourse options in terms of cost, confidence, and robustness. We instantiate TRUST using a Probabilistic Tsetlin Machine (PTM) combined with Bayesian optimization. The probabilistic clause-based structure of PTM links prediction confidence to the stability of decision rules. We show that counterfactuals satisfying the same rules can still differ substantially in reliability depending on how securely they satisfy those rules, revealing whether decisions are supported by robust or fragile clause activations. Experiments on synthetic and real-world datasets demonstrate that target-confidence counterfactuals produce more robust and interpretable recourse than conventional boundary-based approaches. Across multiple benchmarks, TRUST achieves perfect robustness while maintaining low recourse cost, including an L2 distance of 0.10 on the Haberman dataset at 0.92 confidence. By explicitly controlling confidence and exposing rule-level stability, TRUST provides actionable recourse for high-stakes decision support.
K. Darshana Abeyrathna, Sara El Mekkaoui, Nils Enric Canut Taugbøl +1
Group Research and Development Det Norske Veritas (DNV) Oslo, Norway