Online Variance Reduction with Mixtures

Zalán Borsos, Sebastian Curi, Kfir Yehuda Levy, Andreas Krause

Online Variance Reduction with Mixtures (VRM) is a novel framework designed to accelerate stochastic optimization by intelligently selecting which data points to sample. Rather than attempting to learn a complex sampling distribution from scratch, VRM leverages a mixture of simple, predefined "proposal" distributions and dynamically adapts their weights using an efficient online learning algorithm.

The Challenge of Adaptive Sampling

Stochastic Gradient Descent (SGD) and its variants are foundational to modern machine learning. However, they often suffer from high variance because they typically sample data points uniformly at random. While "importance sampling" can mitigate this variance by prioritizing more informative data points, it introduces a "chicken-and-egg" dilemma: identifying which points are informative usually requires having already processed the data multiple times.

Existing adaptive sampling methods struggle to scale with large datasets because they attempt to learn a unique probability for every single data point. This granular approach is slow and fails to capitalize on the fact that similar points (e.g., those within the same cluster) often share similar importance. Furthermore, these traditional methods cannot easily handle sampling sets of points (minibatches) with complex properties like diversity, as the number of possible subsets grows exponentially.

The VRM Framework

The authors propose VRM to simplify this problem by utilizing a mixture of $k$ fixed sampling distributions. These distributions act as "priors" that encode structural knowledge about the data. For instance, one distribution might focus on a specific cluster of points, while another might be designed to encourage diversity within a minibatch.

The framework is built on several core technical contributions:

  1. Online Convex Optimization (OCO): The challenge of finding the optimal mixture weights is framed as an online learning problem where an "adversary" provides the losses.
  2. Online Newton Step (ONS) for Mixtures: Because the variance cost function is "exp-concave" on a restricted domain, the authors adapt the Online Newton Step algorithm to update mixture weights, yielding much faster convergence than standard gradient descent.
  3. Restricted Simplex & Efficient Projection: To maintain algorithmic stability and ensure the model can always "see" new data, a small portion of the sampling is forced to remain uniform. The authors developed a novel, two-stage projection algorithm with $O(k \log k)$ complexity to keep the weights in this "restricted simplex."
  4. Partial Information Handling: In real-world scenarios, we only observe the loss for the specific point we sampled. VRM employs unbiased estimators to update its internal model based on this limited feedback.

Key Insights

  • Structure as a Prior: By utilizing mixtures, the algorithm avoids learning from scratch. If the data is known to be clustered, providing one "expert" distribution per cluster allows the algorithm to quickly identify which clusters are most critical for the model's current state.
  • Independence of Dataset Size ($n$): Crucially, VRM's complexity and performance guarantees depend on the number of mixture components ($k$), not the total number of data points ($n$). This makes the framework exceptionally scalable for massive datasets.
  • Handling Sets of Points: VRM can seamlessly operate with distributions over minibatches (such as $k$-Determinantal Point Processes) just as easily as individual points—a capability that is computationally prohibitive for most other adaptive samplers.

Experimental Highlights

The authors evaluated VRM across various domains, including synthetic datasets, protein homology (KDD Cup 2004), cellphone accelerometer data (CSN), MNIST, and Reinforcement Learning (OpenAI Gym's Cartpole).

SVM Discovery: In a synthetic "blobs" experiment, VRM successfully identified clusters containing critical support vectors and sampled them more frequently. This targeted sampling led to a significantly faster discovery of the decision boundary.

VRM assigns higher weights to important clusters (middle) and achieves faster MSE reduction (right).

Automated Hyperparameter Tuning: VRM can also be utilized for on-the-fly hyperparameter selection. In a Deep Q-Learning (DQN) experiment, the mixture components represented different versions of "Prioritized Experience Replay" with varying settings. VRM automatically shifted its weight to the best-performing setting during the early stages of training, matching the performance of the "Best Priority" baseline without requiring manual tuning.

VRM automatically matches the performance of the best hyperparameter setting in Reinforcement Learning.

Additionally, when using a mixture of $k$-DPP kernels for linear regression, VRM achieved a 1.4x speedup in iterations compared to uniform sampling. On large real-world datasets for k-means clustering, VRM eventually outperformed both uniform sampling and recent baselines in terms of relative error.

Limitations and Future Work

While powerful, VRM does have limitations. The algorithm requires an initial "setup time" to calculate the proposal distributions (e.g., running a preliminary clustering algorithm). For very short optimization tasks, this overhead might outweigh the variance reduction benefits. Furthermore, VRM's effectiveness is heavily dependent on the quality of its mixture components; if the predefined distributions are poorly suited to the task, improvements will be minimal. Finally, while the weight update mechanism is efficient, some complex samplers are inherently computationally expensive, making the exploration of faster approximate samplers a key direction for future research.

Summary updated

BibTeX
@inproceedings{borsos2019online,
  author = {Zalán Borsos and Sebastian Curi and Kfir Yehuda Levy and Andreas Krause},
  title = {{Online Variance Reduction with Mixtures}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure