Introduction
Bilevel optimization (BLO) has emerged as a critical framework for various modern machine learning tasks, including hyperparameter optimization, meta-learning, and neural architecture search. These problems are characterized by a nested structure where an upper-level (UL) objective depends on the optimal solution of a lower-level (LL) objective. Despite its versatility, BLO is notoriously computationally expensive. The primary challenges lie in the requirement to solve the LL problem to high precision and the subsequent need to compute an inverse Hessian-vector product (iHVP) to obtain the "hypergradient" for UL updates.
The Computational Bottleneck
To update the UL variables using gradient-based methods, researchers must compute the hypergradient. This process involves two significant hurdles:
- Lower-Level Resolution: Standard methods often require fully training the inner model for every single step of the outer model, leading to massive overhead.
- Inverse Hessian Estimation: Calculating the second-order derivatives (curvature) of the LL objective is prohibitively expensive for large-scale neural networks, as it requires computing and inverting a Hessian matrix.
Previous attempts to mitigate these costs, such as the SHINE method, attempted to reuse quasi-Newton matrices generated during the LL optimization to estimate the iHVP. However, SHINE often suffers from "incorrect inversion," where the matrices are updated with directions unrelated to the hypergradient, leading to numerical instability and inaccurate updates.
The qNBO Framework
This paper introduces qNBO (quasi-Newton Meets Bilevel Optimization), a framework designed to coordinate LL resolution and iHVP approximation efficiently. The core innovation of qNBO lies in its two-pronged approach:
Subroutine A: Accelerated LL Solving
qNBO initiates the LL optimization with a few standard gradient descent steps to reach a local neighborhood of the solution. It then transitions to a quasi-Newton method (such as BFGS or SR1). This transition allows the algorithm to exploit curvature information and enter a regime of superlinear convergence, significantly reducing the total number of iterations required to solve the LL problem.
Subroutine B: Tailored Inverse Hessian Approximation
To address the "incorrect inversion" problem seen in prior work, qNBO introduces a dedicated subroutine for the hypergradient calculation. Instead of simply reusing the matrix from the LL solver, qNBO applies quasi-Newton recursion schemes specifically tailored to the direction of the UL gradient ($\nabla_y F(x,y)$). This ensures that the curvature information is relevant to the specific update being performed, maintaining stability and accuracy.
Theoretical Contributions
A key strength of qNBO is its rigorous theoretical foundation. By leveraging the properties of the BFGS algorithm, the authors provide a non-asymptotic convergence analysis. Specifically, qNBO (BFGS) is proven to have a convergence rate of $\mathcal{O}(\frac{\kappa^3}{K} + \frac{\kappa^3 \ln K}{K})$, where $\kappa$ represents the condition number and $K$ the number of iterations. This offers a significant improvement over methods that only guarantee asymptotic convergence, providing practitioners with more reliable performance expectations.
Experimental Evaluation
The authors evaluated qNBO across several standard benchmarks, comparing it against state-of-the-art baselines like SHINE, BOME, PZOBO, and F2SA.
Data Hyper-cleaning
On the MNIST dataset, qNBO (BFGS) demonstrated remarkable efficiency. It reached a target accuracy of 91.5% in just 0.42 seconds. In comparison, the next fastest method, BOME, required 6.31 seconds, while SHINE took 20.25 seconds. This represents a 10x speedup over the closest competitor, showcasing the power of coordinated curvature estimation.
Few-shot Meta-learning
In meta-learning tasks on the Omniglot dataset (5-way 5-shot), qNBO achieved 99.14% accuracy in 772 seconds. This is significantly faster than zeroth-order competitors like PZOBO, which took over 11,124 seconds to reach a comparable accuracy level.
Conclusion and Future Work
qNBO represents a significant step forward in making bilevel optimization practical for large-scale machine learning. By intelligently sharing and tailoring curvature information, it achieves superlinear convergence and substantial wall-clock time reductions.
However, some challenges remain. The current framework is primarily deterministic. Extending qNBO to fully stochastic settings—perhaps through stochastic block BFGS with variance reduction—remains an open area for research. Additionally, while the BFGS variant is robust, the SR1 variant can exhibit numerical instability in certain tasks, such as logistic regression on the 20News dataset, suggesting that further refinement of the recursion schemes may be necessary for specific LL objectives.
Summary updated