Table of Contents
Fetching ...

CONFEX: Uncertainty-Aware Counterfactual Explanations with Conformal Guarantees

Aman Bilkhoo, Mehran Hosseini, Milad Kazemi, Nicola Paoletti

TL;DR

CONFEX addresses the critical need for reliable counterfactual explanations by introducing uncertainty-aware CFX generation that provides formal, distribution-free guarantees. It combines Conformal Prediction with Mixed-Integer Linear Programming, shaping the search for counterfactuals to lie in regions of low predictive uncertainty and, when possible, to satisfy local/test-conditional coverage through Localised Conformal Prediction (LCP). The framework offers two practical instantiations: CONFEX-LCP, which encodes local CP constraints directly in MILP, and CONFEX-Tree, a fast offline variant that uses tree-based locality to precompute local quantiles. Empirical results across several datasets show that CONFEXs yield more plausible, stable, and uncertainty-aware explanations than baselines, with rigorous guarantees on uncertainty and optimality, albeit with scalability and calibration-data considerations. Overall, CONFEX provides a principled, editable path from uncertainty quantification to actionable, robust recourse in real-world decision-making.

Abstract

Counterfactual explanations (CFXs) provide human-understandable justifications for model predictions, enabling actionable recourse and enhancing interpretability. To be reliable, CFXs must avoid regions of high predictive uncertainty, where explanations may be misleading or inapplicable. However, existing methods often neglect uncertainty or lack principled mechanisms for incorporating it with formal guarantees. We propose CONFEX, a novel method for generating uncertainty-aware counterfactual explanations using Conformal Prediction (CP) and Mixed-Integer Linear Programming (MILP). CONFEX explanations are designed to provide local coverage guarantees, addressing the issue that CFX generation violates exchangeability. To do so, we develop a novel localised CP procedure that enjoys an efficient MILP encoding by leveraging an offline tree-based partitioning of the input space. This way, CONFEX generates CFXs with rigorous guarantees on both predictive uncertainty and optimality. We evaluate CONFEX against state-of-the-art methods across diverse benchmarks and metrics, demonstrating that our uncertainty-aware approach yields robust and plausible explanations.

CONFEX: Uncertainty-Aware Counterfactual Explanations with Conformal Guarantees

TL;DR

CONFEX addresses the critical need for reliable counterfactual explanations by introducing uncertainty-aware CFX generation that provides formal, distribution-free guarantees. It combines Conformal Prediction with Mixed-Integer Linear Programming, shaping the search for counterfactuals to lie in regions of low predictive uncertainty and, when possible, to satisfy local/test-conditional coverage through Localised Conformal Prediction (LCP). The framework offers two practical instantiations: CONFEX-LCP, which encodes local CP constraints directly in MILP, and CONFEX-Tree, a fast offline variant that uses tree-based locality to precompute local quantiles. Empirical results across several datasets show that CONFEXs yield more plausible, stable, and uncertainty-aware explanations than baselines, with rigorous guarantees on uncertainty and optimality, albeit with scalability and calibration-data considerations. Overall, CONFEX provides a principled, editable path from uncertainty quantification to actionable, robust recourse in real-world decision-making.

Abstract

Counterfactual explanations (CFXs) provide human-understandable justifications for model predictions, enabling actionable recourse and enhancing interpretability. To be reliable, CFXs must avoid regions of high predictive uncertainty, where explanations may be misleading or inapplicable. However, existing methods often neglect uncertainty or lack principled mechanisms for incorporating it with formal guarantees. We propose CONFEX, a novel method for generating uncertainty-aware counterfactual explanations using Conformal Prediction (CP) and Mixed-Integer Linear Programming (MILP). CONFEX explanations are designed to provide local coverage guarantees, addressing the issue that CFX generation violates exchangeability. To do so, we develop a novel localised CP procedure that enjoys an efficient MILP encoding by leveraging an offline tree-based partitioning of the input space. This way, CONFEX generates CFXs with rigorous guarantees on both predictive uncertainty and optimality. We evaluate CONFEX against state-of-the-art methods across diverse benchmarks and metrics, demonstrating that our uncertainty-aware approach yields robust and plausible explanations.
Paper Structure (45 sections, 18 equations, 9 figures, 20 tables, 2 algorithms)

This paper contains 45 sections, 18 equations, 9 figures, 20 tables, 2 algorithms.

Figures (9)

  • Figure 1: Counterfactuals produced for the same factual instance (marked in blue) for a MLP classifier using approaches MILP-MinDist, CONFEX-Naive, CONFEX-LCP, CONFEX-Tree. CONFEX approaches use bandwidth as 35% of the median pairwise distance between calibration points, and alpha as 2%.
  • Figure 2: Effect of coverage rate and kernel bandwidth on metrics for CONFEX-Tree on the CaliforniaHousing dataset, MLP. CONFEX-Naive is represented by dashed horizontal lines.
  • Figure 3: Effect of coverage rate and kernel bandwidth on metrics for CONFEX-Tree on the CaliforniaHousing dataset, RandomForest. CONFEX-Naive is represented by dashed horizontal lines.
  • Figure 4: Effect of coverage rate and kernel bandwidth on metrics for CONFEX-Tree on the GermanCredit dataset, MLP. CONFEX-Naive is represented by dashed horizontal lines.
  • Figure 5: Effect of coverage rate and kernel bandwidth on metrics for CONFEX-Tree on the GermanCredit dataset, RandomForest. CONFEX-Naive is represented by dashed horizontal lines.
  • ...and 4 more figures