[Paper Review] Stochastic Optimization with Bandit Sampling
This paper proposes MABS, a multi-armed bandit-based sampling method that adaptively selects data points for stochastic gradient descent to minimize gradient estimator variance. By dynamically updating sampling probabilities using bandit feedback, MABS asymptotically approximates the optimal variance within a factor of 3 and significantly accelerates convergence across SGD, Prox-SVRG, and SAGA on real datasets.
Many stochastic optimization algorithms work by estimating the gradient of the cost function on the fly by sampling datapoints uniformly at random from a training set. However, the estimator might have a large variance, which inadvertently slows down the convergence rate of the algorithms. One way to reduce this variance is to sample the datapoints from a carefully selected non-uniform distribution. In this work, we propose a novel non-uniform sampling approach that uses the multi-armed bandit framework. Theoretically, we show that our algorithm asymptotically approximates the optimal variance within a factor of 3. Empirically, we show that using this datapoint-selection technique results in a significant reduction in the convergence time and variance of several stochastic optimization algorithms such as SGD, SVRG and SAGA. This approach for sampling datapoints is general, and can be used in conjunction with any algorithm that uses an unbiased gradient estimation -- we expect it to have broad applicability beyond the specific examples explored in this work.
Motivation & Objective
- Address the high variance in stochastic gradient estimators that slows convergence in large-scale machine learning.
- Develop a data-point sampling strategy that adaptively reduces variance without requiring prior knowledge of gradient magnitudes.
- Design a method that learns optimal sampling probabilities in real time using online feedback from gradient computations.
- Ensure theoretical guarantees on variance reduction while maintaining low computational overhead.
- Demonstrate broad applicability across multiple stochastic optimization algorithms beyond the initial case studies.
Proposed method
- Formulate the effective variance of the gradient estimator as a function of sampling distribution $ p^t $, given by $ \mathbb{V}_e^t(w^t, p^t) = \frac{1}{n^2} \sum_{i=1}^n \frac{1}{p_i^t} \|\nabla\phi_i(w^t)\|^2 $.
- Apply the EXP3 multi-armed bandit algorithm to learn the optimal sampling distribution $ p^t $ online, based on observed gradient norms.
- Update sampling probabilities using exponential weighting to balance exploration and exploitation in selecting high-gradient data points.
- Maintain an unbiased gradient estimator by correcting for non-uniform sampling via inverse probability weighting: $ \hat{g}(w^t) = \frac{\nabla\phi_{i_t}(w^t)}{n p_i^t} $.
- Use historical gradient norms to estimate the optimal distribution dynamically, avoiding costly full gradient computations.
- The method requires no preprocessing and adapts to changing gradient magnitudes across iterations.
Experimental results
Research questions
- RQ1Can a bandit-based approach learn a near-optimal non-uniform sampling distribution for stochastic gradient descent to reduce variance?
- RQ2What theoretical bound can be established on the variance approximation error of the proposed method compared to the optimal sampling distribution?
- RQ3How does the proposed sampling strategy compare empirically to uniform sampling and importance sampling in terms of convergence speed and stability?
- RQ4Does the method maintain low computational overhead while improving optimization performance across diverse algorithms and datasets?
- RQ5Can the method enhance robustness to large step sizes in stochastic optimization?
Key findings
- MABS asymptotically approximates the optimal variance within a factor of 3 under bounded gradient assumptions.
- On the w8a and ijcnn1 datasets, MABS significantly reduces convergence time and variance across SGD, Prox-SVRG, and SAGA compared to uniform and importance sampling.
- SGD_MABS achieves convergence 10 times faster than S2GD with uniform sampling and 13.6 times closer to the optimal value than Quasi-Newton with uniform sampling.
- MABS improves robustness: SGD_MABS remains stable up to step size $ \gamma = 5 $, while SGD with uniform or importance sampling diverges by $ \gamma = 0.5 $.
- The method adds only 10% more training time than standard SGD, while importance sampling with $ p \sim G_i $ increases time by 40% and $ p \sim L_i $ is too slow to complete.
- MABS outperforms other sampling methods across all tested algorithms and datasets, even when combined with variance-reduction techniques like those in SAGA and Prox-SVRG.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.