# Enhanced Local Explainability and Trust Scores with Random Forest Proximities

arXiv: https://arxiv.org/abs/2310.12428 · HTML: https://mlsanity.com/paper/2310.12428/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 7 of its 27 references that are in the map.
- First posted on arXiv 19 Oct 2023.

## Builds on (most cited first, 7 of 7)

- [A Unified Approach to Interpreting Model Predictions](https://mlsanity.com/paper/1705.07874/) (2017)
- ["Why Should I Trust You?": Explaining the Predictions of Any Classifier](https://mlsanity.com/paper/1602.04938/) (2016)
- [Towards A Rigorous Science of Interpretable Machine Learning](https://mlsanity.com/paper/1702.08608/) (2017)
- [Not Just a Black Box: Learning Important Features Through Propagating Activation Differences](https://mlsanity.com/paper/1605.01713/) (2016)
- [A Survey on the Explainability of Supervised Machine Learning](https://mlsanity.com/paper/2011.07876/) (2020)
- [Quantifying Outlierness of Funds from their Categories using Supervised Similarity](https://mlsanity.com/paper/2308.06882/) (2023)
- [AXIL: Exact Instance Attribution for Gradient Boosting](https://mlsanity.com/paper/2301.01864/) (2023)

## Built on by (most cited first, 3 of 3)

- [STRAPSim: A Portfolio Similarity Metric for ETF Alignment and Portfolio Trades](https://mlsanity.com/paper/2509.24151/) (2025)
- [Revisiting Forest Proximities via Sparse Leaf-Incidence Kernels](https://mlsanity.com/paper/2601.02735/) (2026)
- [Localized Uncertainty Quantification in Random Forests via Proximities](https://mlsanity.com/paper/2509.22928/) (2025)

## Abstract (arXiv)

We initiate a novel approach to explain the predictions and out of sample performance of random forest (RF) regression and classification models by exploiting the fact that any RF can be mathematically formulated as an adaptive weighted K nearest-neighbors model. Specifically, we employ a recent result that, for both regression and classification tasks, any RF prediction can be rewritten exactly as a weighted sum of the training targets, where the weights are RF proximities between the corresponding pairs of data points. We show that this linearity facilitates a local notion of explainability of RF predictions that generates attributions for any model prediction across observations in the training set, and thereby complements established feature-based methods like SHAP, which generate attributions for a model prediction across input features. We show how this proximity-based approach to explainability can be used in conjunction with SHAP to explain not just the model predictions, but also out-of-sample performance, in the sense that proximities furnish a novel means of assessing when a given model prediction is more or less likely to be correct. We demonstrate this approach in the modeling of US corporate bond prices and returns in both regression and classification cases.
