Distributional Counterfactual Explanations With Optimal Transport
Lei You, Lele Cao, Mattias Nilsson, Bo Zhao, Lei Lei
TL;DR
This work reframes counterfactual explanations from pointwise edits to distributional shifts by leveraging optimal transport (OT) to align counterfactual and factual distributions. It introduces distributional counterfactual explanations (DCE) formulated as a chance-constrained optimization using the sliced Wasserstein distance $\mathcal{SW}^2$ and the Wasserstein distance $\mathcal{W}^2$, with statistical confidence guarantees via quantile-based intervals. The Discount algorithm, based on Riemannian optimization, balances input similarity and output alignment through adaptive $\eta$ and two strategies (Set Shrinking and Interval Narrowing), with proofs of partial optimality and convergence rate. Empirically, Discount achieves superior distributional proximity and favorable input-output distributional trade-offs across multiple datasets and models, demonstrating practical utility for strategic decision-making and governance of model behavior under distributional shifts.
Abstract
Counterfactual explanations (CE) are the de facto method for providing insights into black-box decision-making models by identifying alternative inputs that lead to different outcomes. However, existing CE approaches, including group and global methods, focus predominantly on specific input modifications, lacking the ability to capture nuanced distributional characteristics that influence model outcomes across the entire input-output spectrum. This paper proposes distributional counterfactual explanation (DCE), shifting focus to the distributional properties of observed and counterfactual data, thus providing broader insights. DCE is particularly beneficial for stakeholders making strategic decisions based on statistical data analysis, as it makes the statistical distribution of the counterfactual resembles the one of the factual when aligning model outputs with a target distribution\textemdash something that the existing CE methods cannot fully achieve. We leverage optimal transport (OT) to formulate a chance-constrained optimization problem, deriving a counterfactual distribution aligned with its factual counterpart, supported by statistical confidence. The efficacy of this approach is demonstrated through experiments, highlighting its potential to provide deeper insights into decision-making models.
