Provably Faster Algorithms for Bilevel Optimization

Junjie Yang, Kaiyi Ji, Yingbin Liang

Bilevel optimization is crucial for modern machine learning tasks like meta-learning and hyperparameter tuning, but existing stochastic methods are computationally heavy. This paper introduces two novel algorithms—one using recursive momentum (MRBO) and another using variance reduction (VRBO)—that provably improve computational complexity from $\mathcal{O}(\epsilon^{-2})$ to $\mathcal{O}(\epsilon^{-1.5})$. Surprisingly, the authors demonstrate that double-loop algorithms empirically crush single-loop alternatives in this domain, flipping conventional optimization wisdom on its head.

The Challenge of Bilevel Optimization

Bilevel optimization involves solving a nested problem: an "outer" optimization task that depends on the exact solution of an "inner" optimization task. Think of hyperparameter tuning, where the outer loop searches for the best learning rate, and the inner loop trains the actual neural network weights using that learning rate.

Because the outer function depends on the inner optimizer, calculating the gradient for the outer loop (the "hypergradient") requires computing expensive Jacobian and Hessian matrices of the inner function. Existing stochastic gradient descent (SGD) methods for bilevel optimization, and even recent momentum-based tweaks, get stuck at a computational complexity of $\mathcal{O}(\epsilon^{-2})$ to find an $\epsilon$-accurate stationary point. The authors tackle the challenge of breaking this complexity barrier: can we design faster, provably better stochastic algorithms for bilevel optimization that are still memory- and compute-efficient?

Proposed Methods

The authors propose two new algorithms designed for the nonconvex-strongly-convex setting (where the outer function is nonconvex and the inner function is strongly convex):

  1. MRBO (Momentum-based Recursive Bilevel Optimizer): A single-loop algorithm that updates both the inner and outer variables simultaneously at each step. It uses a recursive momentum technique (similar to STORM in standard optimization) to construct low-variance estimators for both the inner gradient and the outer hypergradient.
Pseudocode for the Momentum-based Recursive Bilevel Optimizer (MRBO).
  1. VRBO (Variance Reduction Bilevel Optimizer): A double-loop algorithm that leverages recursive variance reduction (similar to SARAH or SPIDER). It divides the training into epochs. At the start of an outer-loop epoch, it computes a highly accurate, large-batch hypergradient. Then, it executes multiple inner-loop updates using small batches to refine the inner variable.

Crucially, both methods avoid computing full Hessian matrices or their inverses. Instead, they rely on efficient Hessian-vector products via automatic differentiation, making them highly scalable.

Theoretical Breakthrough: Breaking the Complexity Barrier

By carefully applying momentum and variance reduction to the complex hypergradient estimators, the authors theoretically prove that both MRBO and VRBO achieve $\mathcal{O}(\epsilon^{-1.5})$ complexity.

Comparison of computational complexities for various bilevel optimization algorithms.

This is an order-of-magnitude improvement over the $\mathcal{O}(\epsilon^{-2})$ of prior stochastic bilevel optimizers. Both MRBO and VRBO achieve a near-optimal $\mathcal{O}(\epsilon^{-1.5})$ sample complexity for gradient, Jacobian-vector, and Hessian-vector evaluations.

Key Insights and Empirical Results

The authors evaluated their methods on a data hyper-cleaning application using the MNIST dataset (a specific type of hyperparameter optimization where the goal is to identify and down-weight corrupted training labels).

  • The Double-Loop Anomaly: In standard minimization and minimax problems, single-loop algorithms usually outperform double-loop ones. In bilevel optimization, the authors found the exact opposite. Double-loop algorithms (like VRBO) significantly outperform single-loop ones (like MRBO).
  • Why Double-Loop Wins Here: The outer-loop hypergradient is extremely sensitive to the accuracy of the inner-loop variable. Taking multiple inner-loop steps (the double-loop structure) provides a much more accurate inner solution, which in turn yields a vastly more accurate hypergradient for the outer update.
  • Best in Class Performance: On the MNIST hyper-cleaning task, VRBO converged significantly faster and reached a lower training loss than all baseline algorithms, including stocBiO, AID-FP, and reverse. While MRBO was beaten by VRBO, MRBO still proved to be the fastest among its specific class of single-loop momentum-based algorithms, outperforming recent competitors like MSTSA, STABLE, and SUSTAIN.

Limitations and Future Work

The authors acknowledge that despite MRBO's strong theoretical guarantees, its single-loop structure holds it back empirically compared to double-loop methods. Additionally, the theoretical proofs rely on standard but somewhat restrictive assumptions, such as bounded variance and Lipschitz continuous Hessians.

Future work will look to extend this analysis to bilevel problems with different loss geometries, moving beyond the strict nonconvex-strongly-convex assumption. The authors also hope their findings will motivate deeper theoretical investigations into exactly why double-loop designs are so uniquely suited for bilevel optimization compared to standard optimization tasks.

Summary updated

BibTeX
@inproceedings{yang2021provably,
  author = {Junjie Yang and Kaiyi Ji and Yingbin Liang},
  title = {{Provably Faster Algorithms for Bilevel Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=JOgyeiZBmQd},
}
Figure