Tree Space Prototypes: Another Look at Making Tree Ensembles Interpretable

Sarah Tan, Matvey Soloviev, Giles Hooker, Martin T. Wells

TL;DR

Tree ensembles like Random Forests and Gradient Boosted Trees (GBTs) are highly accurate but notoriously difficult to interpret. This paper introduces tree space prototypes—representative data points from the training set that explain a model's predictions by example rather than by complex feature charts. By defining a novel distance metric for GBTs and developing adaptive prototype selection algorithms, the authors demonstrate that these case-based explanations match the accuracy of the original models while being significantly more intuitive for humans than popular feature-attribution methods like SHAP.

What Problem Does This Paper Address?

When deploying machine learning in high-stakes domains like healthcare or criminal justice, practitioners need to understand why a model makes a decision. For tree ensembles, standard interpretability methods typically rely on feature attribution (e.g., SHAP or LIME), which quantifies how much each input feature contributed to the final prediction. However, as the number of features grows, these explanations become overly complex and difficult for humans to digest.

An alternative approach is case-based reasoning: explaining a model's decision by showing similar, representative examples (prototypes) from the training data. The core challenge lies in defining "similarity." Standard geometric distances (like Euclidean distance) ignore what the machine learning model has actually learned. While a proximity metric existed for Random Forests based on how often data points land in the same leaf nodes, no such metric existed for GBTs, where individual trees contribute unequally to the final prediction. Furthermore, existing prototype selection methods lack the flexibility to dynamically allocate more prototypes to more complex classes.

Methods

The authors make three primary methodological contributions:

  1. GBT Proximity & Distance Metric: They generalize Random Forest proximity to GBTs by introducing a weighted average. Because GBT trees are trained sequentially and vary in importance, each tree's contribution to the proximity score is weighted by its prediction size (using the $L_2$ norm), combining the tree's step size ($\gamma_i$) and the variance of its leaf predictions.
  2. Adaptive Prototype Selection (SM-A & SM-WA): The authors frame prototype selection as a $q$-classwise $k$-medoids optimization problem. Instead of naively picking an equal number of prototypes per class, they introduce greedy submodular selection algorithms that dynamically allocate more prototypes to highly complex or diverse classes. These algorithms are backed by rigorous theoretical approximation guarantees.
  3. Supervised Greedy Selection (SG): As a simpler heuristic alternative, they propose a method that directly optimizes for classification accuracy on a validation set. This approach tends to select highly discriminative prototypes located right along the model's decision boundaries.

Datasets

The methods were evaluated across both image and tabular datasets:

  • Image Benchmarks: MNIST (specifically focusing on the easily confused digits 4 and 9) and CALTECH-256 (guitars vs. mandolins, using deep features extracted via a pre-trained ResNet-50).
  • Tabular Benchmarks: sklearn breast cancer, UCI diabetes, Right Heart Catheterization (RHC) medical data, and T-COMPAS (a recidivism risk prediction dataset).

Key Insights and Ideas

  • Model-Driven Similarity Trumps Feature Distance: Proximity derived from the tree structure captures semantic concepts that raw feature distance misses. For example, on MNIST, tree space distance successfully groups stylistic variations like a "hooked 9" or a "closed 4," whereas Euclidean distance fails to see these structural similarities.
Figure 1: Left: Prototypes with largest coverage for the classes 4 and 9 on the MNIST dataset when using Euclidean distance and random forest distance to find the prototypes. The number in blue denotes the coverage of the prototypes (percentage of test points assigned to that prototype) while the number in orange denotes the accuracy of the prototype (percentage of points assigned to that prototype that have the same label as the prototype). Note the hooked 9 and closed 4, which are only captured by RF distance but not Euclidean distance. Right: Nearest correct and incorrect test points assigned to the top prototypes. The first row denotes points with the same label as the prototype, second row are points incorrectly classified by the prototype.
  • Coverage vs. Discrimination: Unsupervised selection (SM-A) picks prototypes that evenly cover the entire data distribution space. In contrast, the Supervised Greedy (SG) method selects prototypes clustered tightly along the class boundaries, acting as highly efficient discriminative anchors.
SM-A Prototype Distribution SG Prototype Distribution
SM-A: Prototypes cover the data space evenly. SG: Prototypes target the class boundaries.
SM-A Prototype Distribution
SG Prototype Distribution
  • Humans Think in Examples: The paper validates a core cognitive intuition: humans are naturally better at learning from examples than from mathematical feature attributions. Providing prototypes allows users to form a more accurate mental model of the AI's behavior.

Key Results

  • Competitive Nearest-Prototype Classifiers: Classifiers built using just a handful of these tree space prototypes frequently matched or even outperformed the original full tree ensembles. On the Diabetes dataset, the original Random Forest achieved an accuracy of 0.72, whereas the SG prototype method reached 0.77 using only 5 prototypes.
  • Superior Human Simulatability: In a user study conducted on Amazon Mechanical Turk, participants were asked to predict what the model would output for unseen data points. Humans using prototype explanations achieved 79% accuracy, significantly outperforming those using state-of-the-art Shapley values (72% accuracy, $p \approx 0.035$).
  • Data Debugging Utility: The authors demonstrated that tree space distance rankings are highly effective at identifying mislabeled training data, outperforming standard loss-based baselines when cleaning corrupted datasets.

Limitations and Future Work

  • Weighting Variants: The GBT distance metric currently relies on an $L_2$ norm weighting scheme. The authors note that exploring an $L_1$ norm alternative remains an open question for future work.
  • Theoretical Guarantees vs. Performance: While the Supervised Greedy (SG) approach yields excellent empirical accuracy with very few prototypes, it lacks the formal submodular theoretical guarantees that back the SM-A and SM-WA methods.
  • Cognitive Load Trade-offs: A deeper exploration is needed to map the exact trade-off between the number of prototypes shown to a human (cognitive overhead) and the resulting classification accuracy.

Summary updated

Abstract

Ensembles of decision trees perform well on many problems, but are not interpretable. In contrast to existing approaches in interpretability that focus on explaining relationships between features and predictions, we propose an alternative approach to interpret tree ensemble classifiers by surfacing representative points for each class -- prototypes. We introduce a new distance for Gradient Boosted Tree models, and propose new, adaptive prototype selection methods with theoretical guarantees, with the flexibility to choose a different number of prototypes in each class. We demonstrate our methods on random forests and gradient boosted trees, showing that the prototypes can perform as well as or even better than the original tree ensemble when used as a nearest-prototype classifier. In a user study, humans were better at predicting the output of a tree ensemble classifier when using prototypes than when using Shapley values, a popular feature attribution method. Hence, prototypes present a viable alternative to feature-based explanations for tree ensembles.
BibTeX
@inproceedings{tan2016tree,
  author = {Sarah Tan and Matvey Soloviev and Giles Hooker and Martin T. Wells},
  title = {{Tree Space Prototypes: Another Look at Making Tree Ensembles Interpretable}},
  booktitle = {FODS},
  year = {2016},
  doi = {10.1145/3412815.3416893},
}
Figure