QC-Forest: a Classical-Quantum Algorithm to Provably Speedup Retraining of Random Forest
Romina Yalovetzky, Niraj Kumar, Changhao Li, Marco Pistoia
TL;DR
QC-Forest presents a hybrid classical-quantum approach to construction and time-efficient retraining of random forests for streaming data. By building on Des-q and extending it to multi-class tasks, it uses supervised q-means with weighted distances and exact classical feature-weight updates to achieve poly-logarithmic retraining time in the total sample size $N$, while preserving predictive accuracy comparable to state-of-the-art RF methods. A key contribution is efficiently estimating leaf-class probabilities and the multi-class $\eta$ coefficient to enable multiclass inference and threshold tuning, respectively. The work demonstrates competitive performance on benchmarks up to $N \approx 8\times 10^4$ and shows substantial speedups for incremental retraining in data-stream scenarios, highlighting practical potential as quantum hardware matures.
Abstract
Random Forest (RF) is a popular tree-ensemble method for supervised learning, prized for its ease of use and flexibility. Online RF models require to account for new training data to maintain model accuracy. This is particularly important in applications where data is periodically and sequentially generated over time in data streams, such as auto-driving systems, and credit card payments. In this setting, performing periodic model retraining with the old and new data accumulated is beneficial as it fully captures possible drifts in the data distribution over time. However, this is unpractical with state-of-the-art classical algorithms for RF as they scale linearly with the accumulated number of samples. We propose QC-Forest, a classical-quantum algorithm designed to time-efficiently retrain RF models in the streaming setting for multi-class classification and regression, achieving a runtime poly-logarithmic in the total number of accumulated samples. QC-Forest leverages Des-q, a quantum algorithm for single tree construction and retraining proposed by Kumar et al. by expanding to multi-class classification, as the original proposal was limited to binary classes, and introducing an exact classical method to replace an underlying quantum subroutine incurring a finite error, while maintaining the same poly-logarithmic dependence. Finally, we showcase that QC-Forest achieves competitive accuracy in comparison to state-of-the-art RF methods on widely used benchmark datasets with up to 80,000 samples, while significantly speeding up the model retrain.
