Adaptive Sampling Probabilities for Non-Smooth Optimization

Hongseok Namkoong, Aman Sinha, Steve Yadlowsky, John C. DuchiICML 2017

Introduction

Standard stochastic optimization algorithms—such as Stochastic Gradient Descent (SGD) or randomized coordinate descent—typically sample data examples or features uniformly at random. However, real-world data is rarely uniform. In many datasets, certain features have massive gradients (high importance), while others are mostly zero. Similarly, some training examples are much more informative than others.

If an algorithm knows this structure in advance, it can sample the "heavy" features or examples more frequently to converge much faster. Unfortunately, figuring out this structure usually requires scanning the entire dataset to compute Lipschitz constants or leverage scores, introducing a massive $O(nd)$ computational overhead. Existing adaptive methods often require $O(b)$ time per iteration (where $b$ is the number of blocks or features), which defeats the purpose of fast stochastic updates. This paper introduces an adaptive sampling framework that discovers and exploits this data structure online without slowing down the optimization process.

The Adaptive Sampling Framework

The authors propose a framework that adapts sampling probabilities dynamically as the optimization algorithm runs, treating the selection of data blocks or features as a multi-armed bandit problem.

  • Bandit Optimization for Sampling: The choice of which block to sample is framed as an online multi-armed bandit problem. The "arms" are the blocks of features (for coordinate descent) or examples (for SGD). A variant of the EXP3 algorithm is used to update the probability of sampling each block based on the observed gradient.
  • Logarithmic Overhead: To avoid the $O(b)$ bottleneck of updating probabilities, the sampling weights are stored in a balanced binary tree. This allows the algorithm to sample a block and update its probability in just $O(\log b)$ time.
  • Stepsize Doubling Trick: Because the optimal stepsize depends on the (unknown) optimal sampling distribution, the authors introduce a doubling trick that dynamically adjusts the stepsize, ensuring theoretical convergence guarantees hold even as the sampling probabilities shift.

Key Insights and Theoretical Guarantees

The bandit algorithm updates probabilities based on a "surprise" factor. It measures the relative size of the gradient in a block against the probability of sampling that block. Blocks with unexpectedly high gradients relative to their sampling frequency get penalized in the bandit loss, which ironically means they get sampled more frequently in subsequent iterations.

Optimality gap and learned sampling distribution

The authors mathematically prove that their adaptive sampling method achieves a convergence rate nearly as good as if the algorithm had known the absolute best stationary sampling distribution in hindsight. Under structural assumptions where data features have heavy-tailed distributions, the adaptive sampling algorithm is proven to have a runtime complexity that is polynomially better in the dimension $d$ compared to uniform coordinate descent or standard gradient descent. Specifically, it achieves a runtime dependence of $O(\log d)$ or $O(d^{2-\alpha})$, compared to the $O(d \log d)$ required by uniform sampling.

Empirical Results

The method was evaluated on synthetic heavy-tailed data and real-world datasets, including an Aptamer biological dataset, CUB-200-2011, and ALOI (Amsterdam Library of Object Images).

  • Online Feature Selection: On the Aptamer dataset, the adaptive method not only trained faster but effectively performed online feature selection. The learned sampling distribution automatically placed the highest weights on "G-complexes"—features biologically known to dictate binding affinities.
  • Empirical Dominance: Across CUB-200 and ALOI, the adaptive SGD method consistently reached lower optimality gaps in less time compared to uniform sampling. It performed comparably to "optimal" leverage score sampling, but without the prohibitive $O(nd)$ preprocessing time required to compute those scores.
Optimality gap on CUB-200 and ALOI datasets

Limitations and Future Work

While highly effective, the theoretical bandit algorithm requires an upper bound on the Lipschitz constant ($L$) to scale the loss properly. If this bound is too large, it dwarfs the gradient signals, preventing the algorithm from learning the structure. In practice, the authors had to use a heuristic scaling factor ($c$) to make the algorithm perform well empirically (visible in the performance charts as varying $c$ values).

Additionally, despite its adaptive nature, the algorithm still requires tuning the initial stepsize parameter for optimal real-world performance. Finding a theoretically sound, parameter-free way to scale the bandit loss without relying on heuristic factors remains an open challenge for making this method fully plug-and-play.

Summary updated

BibTeX
@inproceedings{namkoong2017adaptive,
  author = {Hongseok Namkoong and Aman Sinha and Steve Yadlowsky and John C. Duchi},
  title = {{Adaptive Sampling Probabilities for Non-Smooth Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2017},
  url = {https://openreview.net/forum?id=rJbl3iZO-S},
}
Figure