Rethinking Counterfactual Explanations as Local and Regional Counterfactual Policies

Salim I. Amoukou, Nicolas J.-b. Brunel · OpenReview

Abstract

Counterfactual Explanations (CE) face several unresolved challenges, such as ensuring stability, synthesizing multiple CEs, and providing plausibility and sparsity guarantees. From a more practical point of view, recent studies show that the prescribed counterfactual recourses are often not implemented exactly by individuals and demonstrate that most state-of-the-art CE algorithms are very likely to fail in this noisy environment. To address these issues, we propose a probabilistic framework that gives a sparse local counterfactual rule for each observation, providing rules that give a range of values capable of changing decisions with high probability. These rules serve as a summary of diverse counterfactual explanations and yield robust recourses. We further aggregate these local rules into a regional counterfactual rule, identifying shared recourses for subgroups of the data. Our local and regional rules are derived from the Random Forest algorithm, which offers statistical guarantees and fidelity to data distribution by selecting recourses in high-density regions. Moreover, our rules are sparse as we first select the smallest set of variables having a high probability of changing the decision. We have conducted experiments to validate the effectiveness of our counterfactual rules in comparison to standard CE and recent similar attempts. Our methods are available as a Python package.

Introduction: The Fragility of Point-Based Recourse

Traditional Counterfactual Explanations (CE) typically provide a single point in the feature space: "If your income was exactly $50,000, your loan would be approved." While mathematically sound, this approach suffers from significant real-world limitations. First, humans rarely implement changes with surgical precision; a slight deviation (e.g., earning $49,900 instead of $50,000) might lead to a failure of the recourse. Second, standard methods often generate a multitude of diverse points, making it difficult for users or regulators to grasp a coherent policy for change.

To overcome these hurdles, we propose shifting the focus from points to Counterfactual Rules. These rules define "recourse regions"—intervals of feature values that guarantee a desired outcome with high probability.

Comparison of Local and Regional Counterfactual Rules, showing how they provide ranges rather than single points.

Methodology: Probabilistic Rules via Random Forests

Our framework leverages the inherent structure of Random Forests (RF) to identify these robust regions. The core idea is to find the smallest set of features (sparsity) and the largest possible ranges (robustness) that maintain a high Counterfactual Decision Probability (CDP).

The process follows four main steps:

  1. Learn a tree-based model: We use the axis-aligned partitions of Random Forests to represent the data distribution.
  2. Find the minimal direction $S$: We identify the smallest subset of features that, when modified, can change the decision.
  3. Find the Recourse Region: Given the direction $S$, we identify a "rectangle" in the feature space where the target outcome is highly likely (e.g., probability $\pi \geq 0.9$).
  4. Sample Counterfactual: Users can then choose any point within this region, ensuring the recourse is robust to implementation noise.
The four-step process for generating counterfactual rules: from learning the model to sampling from the recourse region.

To calculate these probabilities efficiently, we employ "Projected Forests," which allow us to estimate conditional distributions by ignoring splits on variables not included in the counterfactual change. This ensures the rules are both computationally feasible and faithful to the underlying data distribution.

Key Insights and Results

By aggregating local rules (L-CR), we can derive Regional Counterfactual Rules (R-CR). These identify shared recourses for entire subgroups, offering a path toward global model interpretability and more consistent organizational policies.

Our experiments on standard benchmarks (FICO, Compas, Diabetes) demonstrate several key advantages:

  • Robustness to Noise: L-CR maintains a stability score of 0.96–0.98 under Gaussian noise, whereas traditional point-based methods often fail when the implementation is not exact.
  • Plausibility: By selecting regions in high-density areas of the training data, our method ensures that suggested changes are realistic and not outliers.
  • High Accuracy: On datasets like Compas and Diabetes, our rules achieved near 100% accuracy in successfully changing the model's decision, significantly outperforming existing baselines like AReS and FOCUS.

Conclusion

Moving beyond single-point explanations to probabilistic rules provides a more actionable and robust form of recourse. By exploiting the geometry of Random Forests, our approach offers sparse, plausible, and stable explanations that are better suited for the complexities of real-world decision-making. Future work will explore incorporating specific cost metrics ($l_1$ or $l_2$ distances) directly into the rule-finding process to further optimize the "effort" required for recourse.

Summary updated

BibTeX
@inproceedings{amoukou2022rethinking,
  author = {Salim I. Amoukou and Nicolas J.-B. Brunel},
  title = {{Rethinking Counterfactual Explanations as Local and Regional Counterfactual Policies}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=0oQv1Ftt_gK},
}
Figure