Introduction
Tree ensembles, such as Random Forests and Gradient Boosted Decision Trees (GBDTs), are the workhorses of modern tabular machine learning. However, their high predictive performance often comes at the cost of significant model "bloat." Large ensembles require substantial memory and increase inference latency, posing challenges for deployment on resource-constrained devices.
While existing techniques like tree selection or individual node pruning exist, they often fail to find an optimal balance. Tree selection is often too coarse, while traditional node pruning can destroy the structural regularity that makes trees efficient for hardware optimization. ForestPrune introduces a "sweet spot": pruning entire depth layers. By exploiting the exponential growth of nodes with depth, ForestPrune can achieve massive compression with minimal accuracy loss.
Methodology: Optimization via Depth Pruning
The ForestPrune framework treats pruning as a regularized least-squares problem. The core innovation lies in representing trees through depth-difference matrices. Instead of storing a full tree, the model stores the incremental change in predictions at each successive depth layer. This allows the final ensemble prediction to be expressed as a linear combination of layer-wise contributions.
The optimization problem is formulated to minimize prediction error while penalizing the number of layers or nodes retained. To solve this non-convex discrete problem efficiently, the authors developed a specialized Cyclic Block Coordinate Descent (CBCD) algorithm. This solver iterates through trees, determining the optimal pruning depth for each while holding others constant. Because a tree of depth $d$ has only $d+1$ possible pruning points, each sub-problem is solved instantly via enumeration. To further improve results, the framework employs local search heuristics and a final "polishing" step to re-weight the remaining trees.
Key Results and Performance
ForestPrune was evaluated across 25 regression datasets from the OpenML repository, ranging from physical data to socio-economic indicators. The results demonstrate that the framework can reduce the total number of nodes in a Random Forest by 20x while incurring only a ~5% increase in test error. Compared to standard baselines like LASSO-based tree selection, ForestPrune achieved significantly lower error for a fixed node "budget."
A critical advantage of the ForestPrune CBCD solver is its computational efficiency. As shown in the performance comparison below, the specialized solver is orders of magnitude faster than industrial-grade solvers like MOSEK or ECOS, particularly as the number of trees and data rows increases.
Interpretability and Case Study
Beyond compression, ForestPrune enhances model interpretability. In a case study using the Census Planning Database (50,000 rows), the framework reduced a 500-tree "black box" into just 10 shallow, human-readable trees. This pruned model utilized only 14 of the original 295 features while maintaining a competitive RMSE (8.47% vs. 7.54% for the full model), making it suitable for applications where transparency is paramount.
Conclusion and Future Work
ForestPrune offers a robust framework for creating compact, fast, and interpretable tree ensembles. While the current implementation focuses on regression, the underlying logic is extensible to classification tasks. Future research may involve integrating this depth-pruning optimization directly into the training phase of boosting algorithms, potentially leading to even more efficient models from the outset.
Summary updated