Streaming Decision Trees and Forests

Haoyin Xu, Jayanta Dey, Sambit Panda, Joshua T. Vogelstein

Abstract

We present XForest (Extremely Simple Streaming Forest), a novel framework designed to bring the power of decision forests to streaming data environments. By incrementally growing trees and periodically replacing underperforming ensemble members, XForest achieves accuracy comparable to traditional batch-trained models while maintaining significantly higher memory efficiency than current state-of-the-art streaming alternatives like Mondrian Forests.

Introduction

Decision forests, such as Random Forests (RF) and Gradient Boosting (GB), are the gold standard for tabular data classification. However, their traditional "batch" nature requires storing all previous data and retraining from scratch to incorporate new information, creating a significant bottleneck for real-time applications. Existing streaming solutions often fall short: Hoeffding Trees (HT) rely on complex statistical bounds that can lead to instability, while Mondrian Forests (MF) are notoriously memory-intensive, often consuming up to six times more resources than necessary. XForest offers a "middle way" that prioritizes simplicity and resource efficiency.

Methodology

The XForest framework is built upon three core components:

  1. XTree (Extremely Simple Streaming Tree): Unlike static trees, an XTree remains "open." As new data batches arrive, samples are routed to leaves. Once a leaf reaches a specific sample threshold, it splits. Crucially, internal nodes remain fixed once created, preserving the structure learned from earlier data.
  2. XForest: This ensemble of XTrees maintains freshness by tracking individual tree accuracy. Periodically, the worst-performing trees are discarded and replaced with new trees trained on the most recent data batch, allowing the model to adapt to changing data distributions.
  3. XForest-Zero: A specialized variant for transfer learning that refits leaf node probabilities of an existing forest structure to a new task without adding new nodes, enabling rapid inference.

Experimental Results

The researchers evaluated XForest against the OpenML-CC18 benchmark (72 datasets) and specific high-dimensional tasks like CIFAR-10.

Accuracy and Performance

XForest demonstrated competitive accuracy, often matching or exceeding the performance of batch-mode Random Forests and Gradient Boosting. In synthetic tests involving distribution shifts (e.g., XOR to XNOR), XForest adapted almost instantly, whereas Hoeffding Trees lagged significantly.

Accuracy comparison across Splice, Pendigits, and CIFAR-10 datasets showing XForest's competitive performance against streaming and batch baselines.

Resource Efficiency

A primary advantage of XForest is its memory footprint. By discarding old data batches immediately after updates and maintaining a leaner node structure, it significantly outperforms Mondrian Forests in resource-constrained environments.

Resource usage metrics (Classifier Size, Number of Nodes, Training Space) illustrating XForest's superior efficiency compared to Mondrian Forests.

Discussion and Key Insights

  • Simplicity as Robustness: By avoiding complex Hoeffding bounds, XForest is easier to implement and more robust across diverse data types.
  • Adaptation via Replacement: The "replace the weak" strategy is highly effective for handling distribution shifts, allowing the forest to evolve without the need for complex pruning algorithms.
  • Theoretical Speedup: The authors proved that XForest is theoretically faster than building a batch Random Forest whenever the data is processed in more than two batches ($b \ge 2$).

Conclusion and Future Work

XForest provides a practical, high-performance standard for streaming forests. While highly effective, current limitations include the permanence of early "bad" splits in fixed internal nodes and the need for manual hyperparameter tuning for replacement rates. Future research will explore extending this "extremely simple" philosophy to regression and unsupervised learning tasks, such as isolation forests.

Summary updated

BibTeX
@misc{xu2021streaming,
  author = {Haoyin Xu and Jayanta Dey and Sambit Panda and Joshua T. Vogelstein},
  title = {{Streaming Decision Trees and Forests}},
  year = {2021},
  eprint = {2110.08483},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.08483},
}
Figure