Abstract
We provide the first importance sampling variants of variance reduced algorithms for empirical risk minimization with non-convex loss functions. In particular, we analyze non-convex versions of SVRG, SAGA and SARAH. Our methods have the capacity to speed up the training process by an order of magnitude compared to the state of the art on real datasets. Moreover, we also improve upon current mini-batch analysis of these methods by proposing importance sampling for minibatches in this setting. Surprisingly, our approach can in some regimes lead to superlinear speedup with respect to the minibatch size, which is not usually present in stochastic optimization. All the above results follow from a general analysis of the methods which works with arbitrary sampling, i.e., fully general randomized strategy for the selection of subsets of examples to be sampled in each iteration. Finally, we also perform a novel importance sampling analysis of SARAH in the convex setting.
Introduction
Empirical Risk Minimization (ERM) is central to machine learning, yet standard Stochastic Gradient Descent (SGD) often suffers from high variance. While Variance-Reduced (VR) methods like SVRG, SAGA, and SARAH offer faster convergence, their application has largely been restricted to convex problems with uniform sampling. This work bridges the gap by introducing importance sampling for VR algorithms in non-convex settings, common in deep learning. By moving beyond uniform selection, we achieve training speedups of up to an order of magnitude and demonstrate "superlinear" speedups with increasing minibatch sizes.
Theoretical Framework: Arbitrary Sampling
The core contribution is a unified theoretical framework called Arbitrary Sampling. This framework generalizes the selection of data subsets, allowing for non-uniform probabilities tailored to the characteristics of individual data points.
We apply this framework to three primary algorithms: SVRG, SAGA, and SARAH. The "optimal" sampling probabilities are derived based on individual smoothness constants ($L_i$). Points with higher $L_i$ (greater "wiggliness") are sampled more frequently, effectively minimizing the variance of the gradient estimate.
The theoretical results show that uniform sampling is rarely optimal. The new complexity bounds derived under arbitrary sampling are strictly better than previous state-of-the-art rates, even in cases where importance sampling is not explicitly utilized.
Empirical Evaluation
The proposed methods were evaluated on standard benchmarks from the LIBSVM collection, including covtype, ijcnn1, splice, and australian. These datasets were used for binary classification with a non-convex sigmoid loss function.
Key empirical findings include:
- Significant Speedups: On the
australiandataset, importance sampling improved the gradient norm by up to four orders of magnitude compared to uniform sampling for the same computational budget. - Superlinear Scaling: Unlike standard stochastic optimization where doubling minibatch size typically yields linear speedup, importance sampling can lead to superlinear gains, where efficiency increases more than proportionally to the batch size.
- Robustness: Across all datasets, the importance sampling variants ($S^*$) consistently outperformed standard uniform approaches ($S^u$).
Discussion and Future Work
The transition from uniform to importance sampling represents a significant shift in optimizing non-convex models. By accounting for the interaction between samples in a minibatch, the proposed approach handles "hard" samples more effectively.
However, practical implementation requires estimating smoothness constants ($L_i$), which remains a challenge for very large-scale neural networks. Future work will focus on extending these proofs to non-smooth functions (e.g., those using ReLU) and further optimizing the computational overhead of calculating non-uniform probabilities for high-performance hardware.
Summary updated