DiNo and RanBu: Lightweight Predictions from Shallow Random Forests
Tiago Mendonça dos Santos, Rafael Izbicki, Luís Gustavo Esteves
TL;DR
This work addresses the latency and memory bottlenecks of large Random Forests on tabular data by introducing two shallow-forest kernels, DiNo and RanBu, that convert a fixed, depth-limited forest into distance-weighted predictors using MRCA-based and Breiman proximities, respectively. Predictions are obtained post-training via a Gaussian-style kernel weighting with a single bandwidth parameter $h$, enabling substantial speedups without retraining. Empirical results across synthetic and 25 real-world datasets show RanBu often matches or surpasses full-depth RFs in accuracy while drastically reducing runtime (up to 95% in some settings), with DiNo offering stable gains in low-noise regimes; both extend naturally to conditional quantiles. The methods are open-source, mesh well with existing RF tooling, and preserve interpretability rooted in the tree structure, making them attractive for latency-sensitive deployments and similarity-based tasks such as clustering or anomaly detection.
Abstract
Random Forest ensembles are a strong baseline for tabular prediction tasks, but their reliance on hundreds of deep trees often results in high inference latency and memory demands, limiting deployment in latency-sensitive or resource-constrained environments. We introduce DiNo (Distance with Nodes) and RanBu (Random Bushes), two shallow-forest methods that convert a small set of depth-limited trees into efficient, distance-weighted predictors. DiNo measures cophenetic distances via the most recent common ancestor of observation pairs, while RanBu applies kernel smoothing to Breiman's classical proximity measure. Both approaches operate entirely after forest training: no additional trees are grown, and tuning of the single bandwidth parameter $h$ requires only lightweight matrix-vector operations. Across three synthetic benchmarks and 25 public datasets, RanBu matches or exceeds the accuracy of full-depth random forests-particularly in high-noise settings-while reducing training plus inference time by up to 95\%. DiNo achieves the best bias-variance trade-off in low-noise regimes at a modest computational cost. Both methods extend directly to quantile regression, maintaining accuracy with substantial speed gains. The implementation is available as an open-source R/C++ package at https://github.com/tiagomendonca/dirf. We focus on structured tabular random samples (i.i.d.), leaving extensions to other modalities for future work.
