Counterfactual Metarules for Local and Global Recourse

Tom Bewley, Salim I. Amoukou, Saumitra Mishra, Daniele Magazzeni, Manuela Veloso · DOI

Introduction

In the field of Explainable AI (XAI), providing a "why" for a model's decision is often insufficient for end-users. For individuals affected by automated systems—such as those denied credit or insurance—the critical requirement is actionable recourse: a clear path to a favorable outcome. Counterfactual Explanations (CE) address this by identifying the minimal changes needed to flip a model's prediction (e.g., "If your income were $10,000 higher, your loan would be approved").

Despite their utility, most CE methods suffer from high computational costs, a lack of robustness to small input perturbations, and a focus on local instances that ignores the global behavior of the model. This paper introduces T-CREx (Trees for Counterfactual Rule Explanation), a model-agnostic framework that transforms recourse into a global, human-readable map using a novel "metarule" approach.

Challenges in Counterfactual Recourse

Current counterfactual methods typically search for a single point in the feature space for a specific individual. This approach presents three primary challenges:

  1. Computational Overhead: Generating explanations for large populations in real-time is often infeasible for production environments.
  2. Instability: Small changes in a user's initial state can lead to drastically different recommendations, undermining user trust.
  3. Lack of Global Oversight: Developers cannot easily audit how a model behaves across different demographic subgroups or identify systemic biases in the recourse options provided.

While previous rule-based methods attempted to address these issues, they were often limited to specific model architectures or relied on slow, iterative optimization processes that failed to scale.

The T-CREx Framework

T-CREx addresses these limitations by "front-loading" computation into a tree-based structure that maps the "recourse landscape." The framework operates in three distinct stages:

1. Surrogate Tree Construction

T-CREx first trains a tree-based surrogate model (such as a Decision Tree or Random Forest) to approximate the behavior of the black-box target model. This surrogate allows the system to extract "hyperrectangles"—axis-aligned regions in the feature space where the model’s output is highly predictable.

2. Identification of Maximal-Valid Rules

The system identifies rules that are both accurate (the target model is likely to return the desired output within the region) and feasible (the region is supported by the underlying data distribution). This ensures that the suggested recourse is not only mathematically valid but also practically reachable.

3. The Metarule Tree

The core innovation of T-CREx is the metarule tree. The framework partitions the input space into a grid and determines the optimal (e.g., lowest cost or simplest) rule for each cell. A second decision tree—the metarule tree—is then trained to aggregate these cells into large, interpretable regions. This results in a global map of recourse: "If age < 30, increase savings; if age > 30, increase credit score."

Experimental Evaluation

The researchers evaluated T-CREx across 10 diverse datasets, including classification tasks (Adult, Credit, HELOC, COMPAS) and regression tasks (Abalone, Wine Quality). These benchmarks allowed for a rigorous comparison against state-of-the-art rule-based baselines like AReS and LORE.

Key Results

  • Efficiency: T-CREx is 1,000 to 10,000 times faster than existing baselines. By converting recourse generation into a simple tree lookup, it can process entire test sets in seconds.
  • Feasibility and Accuracy: The method consistently matches or exceeds the accuracy of baselines while providing more "feasible" recourse options—avoiding "ghost" counterfactuals that exist in data-sparse regions.
  • Consistency: T-CREx ensures that similar individuals receive consistent advice, a prerequisite for fairness in automated decision-making.

Discussion and Insights

A significant finding of the study is the concept of the "metacounterfactual." Because the metarules are mapped globally, users and auditors can see how recourse options evolve as features change. For instance, one can observe how loan requirements shift as an applicant ages, providing a "future-proof" perspective on recourse.

Furthermore, the authors discovered that a single decision tree often serves as a better surrogate than a Random Forest. Single trees utilize the entire dataset for growth, leading to more robust and less fragmented rules, which ultimately improves the clarity of the generated metarules.

Limitations and Future Work

While T-CREx represents a major step forward, several areas for development remain:

  • Actionability Constraints: The current iteration does not explicitly prevent suggestions involving immutable features (e.g., changing one's age or race).
  • Geometric Constraints: The reliance on axis-aligned hyperrectangles, while highly interpretable, may struggle to capture complex, non-linear relationships between features.
  • Hyperparameter Tuning: Optimal performance requires careful selection of tree depth and accuracy thresholds, which currently necessitates manual intervention.

Conclusion

T-CREx provides a scalable, interpretable, and robust framework for counterfactual recourse. By shifting from instance-level searches to global metarules, it offers a practical tool for both individual users seeking change and developers auditing AI systems for systemic fairness and reliability.

Summary updated

BibTeX
@inproceedings{bewley2024counterfactual,
  author = {Tom Bewley and Salim I. Amoukou and Saumitra Mishra and Daniele Magazzeni and Manuela Veloso},
  title = {{Counterfactual Metarules for Local and Global Recourse}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=Ad9msn1SKC},
}
Figure