Compressing Collections of Trees with Decision Equivalence

Hayden McTavish, Jon Donnelly, Margo Seltzer, Cynthia RudinNeurIPS 2026

TL;DR

Different decision trees can look completely distinct on paper while drawing the exact same decision boundary in reality—a quirk known as decision equivalence. This paper introduces fast, lossless algorithms to strip duplicate trees out of massive model collections and shrink individual trees down to their leanest mathematical forms. For practitioners, this means faster, smaller ensembles (like AdaBoost) and cleaner theoretical analysis, all without changing a single prediction or probability estimate on any possible input.

What Problem Does This Paper Address?

Decision trees rarely work alone. Usually, we encounter them in large crowds—either teamed up in ensembles like Random Forests and AdaBoost, or gathered into a Rashomon set (the complete collection of all near-optimal models for a given dataset, studied to understand variable importance, fairness, and model multiplicity).

Here is the catch: decision trees are notoriously redundant. Because of how greedy tree-building algorithms work, a single tree might take a convoluted path to define a very simple boundary. Worse, two completely different-looking trees might make the exact same classification for every conceivable data point, even out-of-distribution ones.

In ensembles, this bloats memory, slows inference, and muddies interpretability. While prior methods could compress ensembles to preserve final classifications, they often ruined the model's calibration and predicted probabilities. Meanwhile, in Rashomon sets, duplicate trees skew downstream analysis, and existing methods to filter them out hit a computational wall—relying either on NP-hard logical reductions per tree or an exploding quadratic number of pairwise checks across the whole set.

Methods

The authors tackle this redundancy with a two-part cleanup crew:

  1. Deduplicating the Crowd (SIMPLIFYCOLLECTION): Instead of comparing every tree to every other tree, the authors build a clever synthetic "fingerprint" dataset on the fly. As they iterate through a collection, they hash each tree based on its predictions on this tiny dataset. An expensive, exact pairwise equivalence check is only triggered if two trees collide in the hash map. If the trees turn out to be genuinely different, the algorithm finds one data point where they disagree, adds it to the fingerprint dataset, and moves on. Crucially, their pairwise checker also understands continuous math (knowing that age <= 30 automatically implies age <= 40), catching redundancies purely boolean methods miss.
  2. Shrinking the Survivors (SparsestFormSolver): To boil a remaining tree down to its minimal number of leaves, the authors reframe tree simplification as an optimal tree-learning problem. They turn the original tree's leaves into a compact dataset of queries containing 1 (true), 0 (false), or NA (unknown/irrelevant for that leaf). They then modify a state-of-the-art optimal decision tree solver (STreeD) using "conservative partitioning": whenever a split encounters an NA, the sample is sent down both branches, penalizing errors on either side. Any small tree that achieves zero error on this setup is mathematically guaranteed to be decision-equivalent to the original.

For ensembles like AdaBoost, when duplicate trees are removed, their weights are simply summed onto the surviving, sparsest-form representative—preserving exact probability calibration.

Datasets

The authors evaluate their methods on 12 standard tabular classification benchmarks (no new datasets are introduced):

  • Clinical, Social, and Financial: COMPAS, Broward, FICO, Wisconsin (breast cancer), Netherlands.
  • Classic ML & Synthetic: Iris (split into one-vs-rest tasks for setosa, virginica, and versicolor), Wine Quality, Tic-Tac-Toe, Coupon, and Spiral.

Key Insights and Ideas

  • Continuous awareness unlocks hidden duplicates: Prior Rashomon set filters treated splits like feature_1 <= 5 and feature_1 <= 10 as independent boolean variables. Teaching the equivalence checker basic interval logic reveals that Rashomon sets are far smaller—and more redundant—than previously realized.
  • Greedy training leaves free compression on the table: Standard ensemble trees are built greedily one split at a time, meaning they frequently miss simpler ways to represent the same logic. Optimizing them post-hoc shrinks models for "free" without touching ROC-AUC or probability estimates.
  • Sorted Rashomon sets skip the hard part: If you enumerate a Rashomon set in order of its regularized objective (which penalizes leaf count), the first tree you see in any equivalence class is already in its sparsest form—meaning you only need to run the fast deduplication step!

Key Results

  • Order-of-Magnitude Speedups: On Rashomon sets (depths 4–5), SIMPLIFYCOLLECTION runs several orders of magnitude faster than pairwise baselines and Quine-McCluskey (QM) logical compression, especially as sets grow large and trees use more splits.
Figure 1: Time to simplify the Rashomon set, using Algorithm 1 (Ours), with pairwise equivalence checks (Pairwise Baseline), or with logically simplifying each tree (QM Compression [40]). Re- sults aggregated for all datasets in our suite, and all Rashomon sets of depth bound [4, 5], epsilon [0.02, 0.05], regularization [0.01, 0.005] that terminate within 24 hours and with 100GB of memory allowed. Our approach is several orders of magnitude faster, particularly for large, diverse Rashomon sets with trees that reason on more than a few splits.
  • Deeper Rashomon Compression: Accounting for continuous feature dependencies shrinks Rashomon sets by an additional 2–3x on several datasets compared to boolean-only deduplication (e.g., dropping COMPAS from 2,135 trees down to 641, and Wine Quality from 1,409 to 436).
  • Sub-second Ensemble Diet: Across shallow AdaBoost ensembles (100 depth-3 trees), the full pipeline compresses total leaf counts by >15% on most datasets—and up to ~80% on COMPAS (0.196 compression ratio)—all in under one second (0.001s to 0.789s) with zero loss in accuracy or calibration.

Limitations and Future Work

  • Cross-feature blindness: While the method catches dependencies within a single feature, it cannot spot impossible combinations across features. On the Wisconsin dataset (compression ratio 0.972), features like cell radius, perimeter, and area are geometrically tied; trees that only disagree in physically impossible regions (e.g., massive area, tiny perimeter) aren't flagged as equivalent.
  • Binary leaves and shallow depths: The exact method currently targets trees with binary (0/1) leaves rather than continuous leaf values (like in standard gradient boosting), and finding the sparsest form remains NP-hard, limiting practical speed to relatively shallow trees. Future work could relax exact equivalence to "approximate equivalence" for continuous leaves and further optimize the solver to tackle deeper ensembles.

Summary updated

Abstract

Decision trees with binary leaves are fundamental building blocks in classical machine learning. While individual trees can be used as strong interpretable classifiers, they frequently serve as members of large collections instead: primarily as components of powerful ensembles, but also as one of the few model classes for which the entire set of near-optimal models (the Rashomon set) can be analyzed. Both types of collections are often more complex than necessary, because there are many decision tree representations for the same decision boundary, imposing unnecessary computational costs in ensembles and complicating theoretical work on Rashomon sets. We propose methods to reduce collections of trees to a subset representing each unique decision boundary in the collection, with each tree in its sparsest equivalent form. In so doing, we improve the scalability of removing provably redundant classifiers in a Rashomon set. We also compress many shallow Adaboost ensembles by >15\% of their total number of leaves, while exactly preserving the models' decisions and probability estimates on any possible observation. These methods allow practitioners to run more efficient computations over compressed collections of trees, and remove arbitrary complexity when analyzing and understanding them.
BibTeX
@inproceedings{mctavish2026compressing,
  author = {Hayden McTavish and Jon Donnelly and Margo Seltzer and Cynthia Rudin},
  title = {{Compressing Collections of Trees with Decision Equivalence}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=fwHieiqwl7},
}
Figure