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.
