Interpretable Model-Aware Counterfactual Explanations for Random Forest

Joshua S. Harvey, Guanchao Feng, Sai Anusha Meesala, Tina Zhao, Dhagash Mehta
10/31/2025
stat.MLcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Despite their enormous predictive power, machine learning models are often unsuitable for applications in regulated industries such as finance, due to their limited capacity to provide explanations. While model-agnostic frameworks such as Shapley values have proved to be convenient and popular, they rarely align with the kinds of causal explanations that are typically sought after. Counterfactual case-based explanations, where an individual is informed of which circumstances would need to be different to cause a change in outcome, may be more intuitive and actionable. However, finding appropriate counterfactual cases is an open challenge, as is interpreting which features are most critical for the change in outcome. Here, we pose the question of counterfactual search and interpretation in terms of similarity learning, exploiting the representation learned by the random forest predictive model itself. Once a counterfactual is found, the feature importance of the explanation is computed as a function of which random forest partitions are crossed in order to reach it from the original instance. We demonstrate this method on both the MNIST hand-drawn digit dataset and the German credit dataset, finding that it generates explanations that are sparser and more useful than Shapley values.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{harvey2025interpretable,
  title  = {Interpretable Model-Aware Counterfactual Explanations for Random Forest},
  author = {Joshua S. Harvey and Guanchao Feng and Sai Anusha Meesala and Tina Zhao and Dhagash Mehta},
  year   = {2025},
  eprint = {2510.27397},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.27397v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.27397.svg)](https://codeofpaper.com/paper/2510.27397)

Discussion