Efficient Online Bootstrapping for Large Scale Learning

Zhen Qin, Vaclav Petricek, Nikos Karampatziakis, Lihong Li, John LangfordarXiv 2013

Abstract

Bootstrapping is a useful technique for estimating the uncertainty of a predictor, for example, confidence intervals for prediction. It is typically used on small to moderate sized datasets, due to its high computation cost. This work describes a highly scalable online bootstrapping strategy, implemented inside Vowpal Wabbit, that is several times faster than traditional strategies. Our experiments indicate that, in addition to providing a black box-like method for estimating uncertainty, our implementation of online bootstrapping may also help to train models with better prediction performance due to model averaging.

Introduction

In the era of "big data," estimating the uncertainty of a predictor is as crucial as the prediction itself. Bootstrapping is a statistical powerhouse used for this purpose, traditionally involving the creation of $N$ new datasets by sampling the original data with replacement and training a separate model on each. However, this approach is computationally expensive, typically taking $N$ times as long as training a single model. For large-scale datasets with trillions of features processed one example at a time, traditional batch bootstrapping is non-viable. This paper introduces a highly scalable implementation of online bootstrapping within the Vowpal Wabbit (VW) ecosystem to bridge this performance gap.

The Online Poisson Approximation

The core innovation of this work lies in a mathematical shortcut: in a dataset of size $n$, the number of times a specific example appears in a bootstrapped sample follows a $Binomial(n, 1/n)$ distribution. As $n$ grows, this distribution converges to a Poisson(1) distribution.

Convergence of Binomial distributions to Poisson(1)

By leveraging this property, the authors developed an online algorithm that processes each example exactly once:

  1. Parse once: The example is parsed into a feature vector.
  2. Weight $N$ times: For each of the $N$ bootstrap rounds, the algorithm draws a weight $Z$ from a Poisson distribution.
  3. Update $N$ models: The example is passed to $N$ internal sub-models, each updated using the drawn weight $Z$.

This method extends to handle arbitrary positive real-valued weights ($Z \sim Poisson(1) \times W$), making it applicable to a wide range of real-world machine learning tasks.

System Optimization in Vowpal Wabbit

In high-performance learners like Vowpal Wabbit, data parsing is often the primary bottleneck. By parsing an example once and updating $N$ models in memory, the overhead of bootstrapping is significantly reduced. The implementation co-locates sub-model weights in memory to maximize CPU cache hits. While VW's "hashing trick"—mapping features to a fixed-size memory space—introduces a risk of collisions when training multiple models, experimental results show that the benefits of the ensemble generally outweigh the noise introduced by these collisions.

Experimental Evaluation

The approach was evaluated on two primary benchmarks: a dense 75K Dataset (average 3,000 features per example) and the sparse RCV1 text categorization dataset (781,265 examples, average 80 features per example).

Training time comparison for 75K and RCV1 datasets

As shown in the figures above, the training time for online bootstrapping on the RCV1 dataset remains nearly flat even as the number of bootstrap rounds increases, due to shared parsing overhead. Beyond speed, bootstrapping provides a "free" accuracy boost through model averaging (bagging). On RCV1, the base learner's error rate dropped from 6.01% to 5.37% with $N=20$ bootstrap rounds. Even against highly tuned models using n-grams, bootstrapping further reduced error from 4.64% to 4.58%.

Conclusion

Online bootstrapping in Vowpal Wabbit offers a scalable, "black-box" method for uncertainty estimation that simultaneously improves prediction performance. By shifting the computational burden from data parsing to in-memory model updates, the system achieves massive speedups over traditional batch methods. Future work includes expanding this framework to more complex scenarios like contextual bandits and reinforcement learning.

Summary updated

BibTeX
@misc{qin2013efficient,
  author = {Zhen Qin and Vaclav Petricek and Nikos Karampatziakis and Lihong Li and John Langford},
  title = {{Efficient Online Bootstrapping for Large Scale Learning}},
  year = {2013},
  eprint = {1312.5021},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1312.5021},
}
Figure