Will Bilevel Optimizers Benefit from Loops

Kaiyi Ji, Mingrui Liu, Yingbin Liang, Lei Ying

Introduction

Bilevel optimization has emerged as a powerful tool for solving nested machine learning problems, such as hyperparameter tuning where a model is trained on a training set (inner task) to minimize validation loss (outer task). Two dominant frameworks for solving these problems are Approximate Implicit Differentiation (AID-BiO) and Iterative Differentiation (ITD-BiO).

A critical design choice in both methods is whether to use "loops"—running multiple inner iterations to accurately solve sub-problems—or to run just a few iterations to save time per step. While "no-loop" algorithms often excel in simpler minimax problems (like GANs), this paper provides a unified convergence analysis proving that bilevel optimization is fundamentally different. Because bilevel gradients involve sensitive second-order derivatives (Hessians), loops are not just helpful; they are often essential.

Methods and Theoretical Framework

The authors develop a unified theoretical framework to analyze the convergence rates and computational complexities of different loop configurations. They evaluate algorithms based on two primary complexity metrics required to reach an $\epsilon$-stationary point:

  • Gc($\epsilon$): Total gradient computations.
  • MV($\epsilon$): Total Jacobian- and Hessian-vector products.

For AID-BiO, they analyze variants based on the presence of an N-loop (to find the inner optimal point) and a Q-loop (to approximate the Hessian-inverse-vector product). A key technical novelty is proving convergence for "small Q" settings by demonstrating that approximation errors decrease iteratively when using "warm starts" (initializing the next loop from the previous iteration's result).

For ITD-BiO, they provide a unified theory for any number of inner steps $N$, crucially removing the common but unrealistic assumption that the inner optimal point must be bounded.

Key Insights and Results

The Efficiency of Loops in AID-BiO

For AID-BiO, while loops make each individual update more computationally expensive, they drastically reduce the total number of outer iterations needed.

Complexity comparison of AID-BiO implementations

As shown in the complexity table above, the "N-Q-loop" configuration achieves the best overall complexity ($\tilde{\mathcal{O}}(\kappa^4 \epsilon^{-1})$), significantly outperforming the "No-loop" version ($\tilde{\mathcal{O}}(\kappa^6 \epsilon^{-1})$). Experiments on a MNIST hyperparameter optimization task corroborated this, showing that an $N=20$ loop converged much faster in wall-clock time than $N=1$.

The Necessity of Loops in ITD-BiO

For ITD-BiO, the findings are even more stark: loops are strictly necessary to achieve true convergence.

Convergence rates for ITD-BiO implementations

The authors establish a lower bound proving that without a loop (i.e., $N$ is small or $\Theta(1)$), the algorithm will never converge to the true solution, suffering from an unavoidable, non-vanishing error of $\Omega(\kappa^2)$. Conversely, the $N$-$N$-loop implementation guarantees a vanishing convergence error. In synthetic hyper-representation learning experiments, an $N=20$ loop reached a validation loss of 0.004, while the $N=1$ version plateaued at 0.04—a 10x difference in accuracy.

Limitations and Future Work

While this paper establishes a robust foundation for understanding loop dynamics in bilevel optimization, a few areas remain open for exploration:

  • Theoretical Gap: There is a minor technical gap between the upper and lower bounds for ITD-BiO regarding specific constants, presenting an opportunity for future refinement.
  • Stochastic Settings: The current work focuses primarily on deterministic optimizers. Although the authors suggest their tools can be extended to stochastic settings using mini-batches, formal proofs for variance-reduced or accelerated stochastic bilevel optimizers are left for future work.
  • Non-Convex Inner Problems: The analysis relies on the assumption that the inner-level function is strongly convex. Extending these findings to non-convex inner problems remains a significant challenge in the field.

Summary updated

BibTeX
@inproceedings{ji2022will,
  author = {Kaiyi Ji and Mingrui Liu and Yingbin Liang and Lei Ying},
  title = {{Will Bilevel Optimizers Benefit from Loops}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=bA2k4lW16I},
}
Figure