TL;DR
The paper introduces COLA (COunterfactuals with Limited Actions), a model- and generator-agnostic framework designed to make counterfactual explanations much more practical by minimizing the number of feature changes required to alter a model's prediction. By leveraging Optimal Transport (OT) to align factual and counterfactual datasets, COLA drives a novel joint-probability-informed Shapley value method ($p$-SHAP) that identifies and executes only the most impactful feature edits. Empirically, COLA preserves the desired counterfactual outcomes while reducing the required feature modifications by 55% to 74%.
What Problem Does This Paper Address?
Counterfactual Explanations (CE) answer the question: "What is the smallest change needed in the input features to flip a machine learning model's prediction?" For example, a CE might tell a rejected loan applicant to increase their income by \$10,000 to get approved.
However, many existing CE algorithms suffer from a lack of sparsity—they recommend modifying far too many features at once (e.g., changing income, age, zip code, and employment history simultaneously), which is overwhelming and impractical for a user. While Feature Attribution (FA) methods like Shapley values are great at identifying important features, standard FA methods operate independently of the counterfactual generation process. This decoupling means they fail to account for the specific pathways required to achieve a target outcome, often leading to counterproductive or inefficient recommendations.
Methods
COLA is a post-hoc framework that refines the output of any existing counterfactual generator using a three-step pipeline:
- Optimal Transport (OT) Coupling: COLA models the group of factual instances and generated counterfactual instances as distributions. It solves an OT problem (using entropic regularization for speed) to find the optimal mathematical coupling matrix ($p_{OT}$) between the two sets. This effectively solves the "alignment problem" by pairing each factual instance with its most efficient counterfactual counterpart.
- Joint-Probability-Informed Shapley Values ($p$-SHAP): The authors generalize standard Shapley value formulations by integrating the OT coupling matrix as a joint probability distribution. This ensures that the feature attribution scores directly reflect the cost and impact of moving along the optimal transport path.
- Greedy Sparsification: Using the normalized absolute $p$-SHAP values as a guide, COLA greedily selects a user-defined maximum number of features ($C$) to modify, leaving all other features untouched.
Datasets
The authors evaluated COLA across 4 diverse tabular datasets commonly used in binary classification and algorithmic fairness benchmarking:
- HELOC (FICO home equity line of credit risk)
- German Credit (financial credit risk)
- Hotel Bookings (demand and cancellation prediction)
- COMPAS (recidivism risk scoring)
To prove the framework's versatility, they tested it across 12 different machine learning architectures (including LightGBM, XGBoost, SVMs, and Deep Neural Networks) and 5 distinct counterfactual generators (DiCE, AReS, GlobeCE, KNN, and Discount).
Key Insights and Ideas
- The Alignment Proxy: The core "aha moment" is treating the mapping between factuals and counterfactuals as an optimal transport problem. OT serves as a highly effective convex proxy for the otherwise NP-hard discrete sparsity ($L_0$) optimization problem.
- Theoretical Proximity Guarantees: The authors mathematically prove that under mild conditions, the refined, sparse counterfactuals generated by COLA are guaranteed to be no farther from the original factual data points than the unrefined originals (Theorem 5.1: Counterfactual Proximity).
- The Danger of Decoupling: The paper demonstrates that running standard feature attribution (like baseline SHAP) independently of the counterfactual pathway performs poorly. Using counterfactual information without proper distribution alignment is insufficient for achieving sparse, actionable recourse.
Key Results
- Massive Action Reduction: To achieve 100% of the original counterfactual effect, COLA required only 26% to 45% of the original feature edits. If a user is satisfied with an 80% counterfactual effect, COLA achieves it using a mere 13% to 25% of the original edits.
- Superiority Over Baselines: As shown across multiple divergence metrics (Wasserstein distance, MMD, Mean Difference), the proposed $p$-SHAP method consistently out-sparsified alternative baseline methods like Random Baseline SHAP (RB-SHAP) and Counterfactual SHAP (CF-SHAP).
- Near-Optimality: On a tractable benchmark (German Credit), the authors compared COLA against the mathematically true global optimum solved via Mixed-Integer Linear Programming (MILP). COLA achieved near-optimal performance at a fraction of the computational overhead required by heavy MILP solvers.
Limitations and Future Work
- The Alignment Gap: While OT provides an excellent proxy, a slight performance gap remains between the OT-derived alignment and the true mathematical optimum in certain instance-based settings. Finding the absolute best alignment strategy remains an open question.
- Computational Complexity of Shapley Values: Calculating exact Shapley values scales exponentially with the number of features. Although COLA utilizes weighted linear regression approximations to keep it practical, very high-dimensional feature spaces could still pose a scaling challenge.
- Lack of Causal Constraints: The current framework relies on statistical distributions rather than strict causal graphs. Incorporating Structural Causal Models (SCMs) to prevent recommending physically impossible feature changes (e.g., lowering age to get a loan) is a noted direction for future integration.
Summary updated