A framework for bilevel optimization that enables stochastic and global variance reduction algorithms

Mathieu Dagréou, Pierre Ablin, Samuel Vaiter, Thomas Moreau

Abstract

Bilevel optimization is essential for hyperparameter tuning, data cleaning, and neural architecture search, yet it presents significant computational challenges. The nested structure typically requires approximating a Hessian inverse, leading to biased stochastic gradients. This paper introduces a framework that reformulates bilevel optimization as a single dynamical system involving three coupled variables. This approach enables the first stochastic bilevel algorithm, SABA, to achieve linear convergence by leveraging global variance reduction.

Introduction

Bilevel optimization involves a nested structure where an "outer" objective depends on the optimal solution of an "inner" problem: $$\min_{x} F(z^*(x), x) \quad \text{subject to} \quad z^*(x) = \arg\min_{z} G(z, x)$$ Updating the outer variable $x$ requires the gradient of the value function $h(x) = F(z^*(x), x)$. By the implicit function theorem, this gradient involves the inverse Hessian of the inner function $G$. In large-scale settings, simple stochastic averages of these gradients are biased, creating a bottleneck that traditional methods struggle to overcome without expensive nested loops or sub-optimal convergence rates.

Methods: A Unified Dynamical System

The core innovation presented by researchers from Inria and CNRS is to stop treating the inner problem and the linear system as separate sub-problems. Instead, they introduce an auxiliary variable $v$ to track the solution of the linear system associated with the implicit gradient.

The framework defines three directions—$D_z, D_v,$ and $D_x$—that evolve jointly:

  1. $z$ moves toward the inner optimum.
  2. $v$ moves toward the solution of the implicit gradient's linear system.
  3. $x$ moves toward the outer optimum.
The unified stochastic framework for bilevel optimization.

Crucially, these directions are formulated as simple sums of derivatives over the dataset. This linearity allows for the derivation of unbiased stochastic estimates, leading to two primary algorithms:

  • SOBA (StOchastic Bilevel Algorithm): A standard stochastic approach sampling one index per iteration.
  • SABA (Stochastic Average Bilevel Algorithm): A variance-reduced approach based on the SAGA algorithm. By maintaining a memory of past gradients, SABA significantly reduces noise and accelerates convergence.

Experimental Evaluation

The framework was validated across three distinct tasks: Toy Ridge Regression, Hyperparameter Selection (using the IJCNN1 dataset), and Data Hyper-cleaning (using the MNIST dataset with 50% label noise).

Key Results

SABA demonstrates superior efficiency and theoretical performance. It is the first stochastic bilevel algorithm to match the $O(1/T)$ convergence rate for non-convex problems and achieve linear convergence under the Polyak-Łojasciewicz (PL) assumption.

Comparison of convergence rates between SOBA and SABA.

In practical tests, SABA outperformed competitors like stocBiO and TTSA, reaching suboptimality gaps below $10^{-3}$ in hyperparameter selection tasks. In MNIST data cleaning, SABA achieved the lowest test error more rapidly than existing methods, proving its robustness to noise.

Discussion and Limitations

While SABA offers significant theoretical and practical gains, it inherits the memory requirements of SAGA-like methods, necessitating the storage of gradient/Hessian information for each sample. This can be mitigated via mini-batching but remains a consideration for memory-constrained environments.

Future work includes extending this framework to incorporate momentum, Nesterov acceleration, and more advanced variance reduction techniques like SARAH or STORM, potentially porting a decade of single-level optimization advancements into the bilevel domain.

Summary updated

BibTeX
@inproceedings{dagreou2022framework,
  author = {Mathieu Dagréou and Pierre Ablin and Samuel Vaiter and Thomas Moreau},
  title = {{A framework for bilevel optimization that enables stochastic and global variance reduction algorithms}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=bZMhUqacHI},
}
Figure