Abstract
Random Forests (RF) are a cornerstone of modern machine learning, yet their traditional training process is inherently local and heuristic. This paper introduces a post-processing framework that transforms a pre-trained RF into a globally optimized model. By treating the forest structure as a fixed feature extractor and jointly optimizing leaf node values across the entire ensemble, the proposed method significantly improves predictive accuracy. Furthermore, a global pruning strategy is introduced to reduce model complexity by orders of magnitude—up to 160x—enabling deployment on resource-constrained devices without sacrificing performance.
Introduction
Random Forests are typically trained using a greedy, tree-by-tree approach. While effective, this "lazy" learning leads to several drawbacks: a lack of global error minimization, model bloat due to deep trees, and suboptimal pruning that ignores inter-tree dependencies. This work addresses these issues by decoupling the forest's structure from its leaf values, allowing for a global optimization phase that treats the entire ensemble as a single, unified model.
Methodology
Global Refinement
The core idea of Global Refinement is to treat the structure of a pre-trained Random Forest as a fixed feature extractor. For any input $x$, we define an indicator vector $\Phi(x)$ that maps the input to the specific leaf nodes it reaches in every tree across the forest.
Instead of relying on the original, independently calculated leaf values, we "re-learn" a weight matrix $W$ by minimizing a global loss function (such as Hinge loss for classification or Mean Square Error for regression) across the entire forest simultaneously. This turns the RF prediction into a linear optimization problem—similar to a linear SVM—that can be solved efficiently using libraries like LIBLINEAR. This joint optimization allows the model to exploit complementary information, where trees learn to correct each other's specific errors.
Global Pruning
To address model bloat, the authors introduce an iterative Global Pruning strategy. Unlike traditional methods that prune trees in isolation, this approach identifies leaf nodes that contribute the least to the global objective and merges them with adjacent nodes. After merging, the Global Refinement process is re-run to ensure the remaining leaves are perfectly tuned to fill the gaps left by the pruned ones. Surprisingly, this process often acts as a form of regularization, improving testing accuracy by reducing overfitting.
Experimental Results
The proposed methods were evaluated on a variety of benchmarks, ranging from standard UCI datasets to complex real-world tasks:
- Kinect Body Part Classification: Global refinement reduced the error rate from 8.10% to 4.55%. The authors produced an "Economic" version of the model, compressing it from 290.4 MB down to 6.8 MB (a 40x reduction) with negligible loss in accuracy.
- UCI Benchmarks: On several datasets, compression ratios reached as high as 166x.
- Human Age Regression: Using the MORPH Album 2 dataset, the refined RF demonstrated state-of-the-art performance, outperforming standard RFs and advanced variants like Alternating Decision Forests (ADF).
Conclusion
Global Refinement and Pruning offer a powerful way to enhance existing Random Forest models. By shifting from local heuristics to global optimization, we can create models that are both more accurate and significantly smaller. This framework paves the way for deploying high-performance ensembles on mobile and embedded platforms where memory and computational resources are strictly limited.
Summary updated