Introduction
Tree-based machine learning models, such as Random Forests and Gradient Boosted Trees (GBTs), are widely used for tabular data due to their high accuracy and interpretability. However, standard implementations in frameworks like XGBoost or Scikit-learn are optimized for high-throughput batch processing in environments with abundant RAM. In real-world deployment scenarios—such as Internet of Things (IoT) devices with limited memory or serverless functions (e.g., AWS Lambda) facing "cold start" latencies—these models encounter significant performance bottlenecks. When a model exceeds available RAM, traditional "block-blind" storage layouts (Breadth-First or Depth-First Search) result in excessive I/O operations, as a single inference path may be scattered across many physical storage blocks.
Methodology: The PACSET Approach
PACSET (Packed Serialized Trees) addresses these challenges by treating tree ensembles as data structures optimized for external memory. It introduces a "selective access" paradigm, where only the necessary nodes for a specific prediction are fetched from storage. This is achieved through three primary optimizations:
- Interleaved Bins (BIN): Recognizing that every inference begins at the root of each tree in the forest, PACSET "stripes" the top-level nodes of multiple trees into contiguous storage blocks. This allows a single I/O operation to load the starting points for hundreds of trees simultaneously.
- Weighted Depth First Search (WDFS): PACSET utilizes "leaf cardinality"—the frequency with which training samples traverse a node—to identify high-probability paths. These "popular" nodes are packed together in storage, increasing the likelihood that a single block fetch contains the entire required path for a tree.
- Block-Awareness: The algorithm is designed to be cognizant of physical I/O block sizes (e.g., 64KB). To prevent "block pollution," PACSET resets its packing strategy when a high-probability path approaches a block boundary, ensuring each new block begins with a frequently accessed node.
Experimental Evaluation
The researchers evaluated PACSET across five diverse datasets, including CIFAR-10, Landsat, Higgs, Year Prediction MSD, and Wave Energy Converters (WEC). These datasets cover a range of classification and regression tasks on both image and tabular data.
Key Results
- Latency Reduction: PACSET achieved a 2–6x reduction in inference latency compared to standard BFS (XGBoost) and DFS (Scikit-learn) layouts for large-scale models.
- Memory Efficiency: In a CIFAR-10 benchmark, PACSET reduced the active memory footprint from 3.5 GB (required by Scikit-learn) to just 3 MB—a thousand-fold improvement.
- Edge and Cloud Performance: On a Raspberry Pi 2, PACSET improved latency by 2.5x. Similar gains were observed in AWS Lambda environments using a Redis backend, enabling sub-second "cold start" inferences.
Conclusion
PACSET demonstrates that aligning model storage layouts with physical hardware characteristics can dramatically improve deployment efficiency. By enabling selective access, it allows massive tree ensembles to run on resource-constrained edge devices and high-latency serverless environments without the need for full model loading. While optimized for low-batch latency rather than high-volume throughput, PACSET provides a critical solution for real-time inference in memory-tight applications. Future research may explore the application of these selective access principles to deep neural networks.
Summary updated