Riemannian Bilevel Optimization under the Polyak–Łojasiewicz Condition

Zhixuan Li, Yuyang Zhang, Luke Jones, Muztaba Syed, William Chang, Andi HanNeurIPS 2026

TL;DR

Standard bilevel optimization—think meta-learning or hyperparameter tuning—relies on inverting a second-derivative matrix (the Hessian) to figure out which way is "downhill." When your parameters live on curved geometric spaces and the inner problem has flat valleys of equally good solutions, that matrix becomes singular and standard algorithms literally divide by zero. This paper introduces a spectral-clipping algorithm on Riemannian manifolds that cleanly sidesteps matrix inversion altogether, keeping optimization stable when classical methods blow up.

What Problem Does This Paper Address?

Bilevel optimization is a nested game: you want to optimize an "upper-level" objective (like validation loss) that depends on the solution to a "lower-level" problem (like training weights). Furthermore, in modern machine learning, parameters often live on curved Riemannian manifolds rather than flat Euclidean space—for instance, constraining neural network weights to be orthogonal (the Stiefel manifold) to prevent exploding gradients.

To take a step in the upper-level problem, you need the hypergradient. Classically, computing this requires inverting the Hessian of the lower-level objective. That is fine if the lower-level problem is strongly convex (shaped like a strict bowl with a single, unique bottom), because the Hessian is guaranteed to be invertible.

However, many realistic problems—like overparameterized models or objectives with rotational symmetries—are not strict bowls. Instead, they satisfy the weaker Polyak–Łojasiewicz (PL) condition: gradients still point cleanly toward the minimum, so optimization is fast, but the bottom of the valley can be a continuous, flat submanifold of solutions rather than a single point. Along these flat directions, eigenvalues hit zero, the Hessian becomes singular (or indefinite away from the minimum), and the classical inverse-Hessian formula breaks down completely.

Methods

To compute hypergradients without dividing by zero or backpropagating through an entire inner optimization loop, the authors introduce R-HJFBiO (Riemannian Hessian/Jacobian-free Bilevel Optimization) and its stochastic cousin, SR-HJFBiO.

Here is what makes the machinery tick:

  • Kernel-Preserving Spectral Clipping (Novel): Instead of inverting a singular Hessian, the authors apply a spectral clip to its eigenvalues. Large eigenvalues are capped, healthy ones are kept, and—crucially—tiny eigenvalues below a floor $\mu_c$ are mapped strictly to zero rather than bumped up. This preserves the true nullspace (the flat directions of the valley) and allows them to target the Moore–Penrose pseudoinverse on the curved tangent space.
  • Single-Loop Tracking (Novel on Manifolds): Solving a pseudoinverse from scratch at every step is expensive. Instead, R-HJFBiO updates the lower-level variable, upper-level variable, and an auxiliary tracking vector simultaneously in a single loop, shuttling vectors across the curved space via parallel transport.
  • Finite-Difference Probes: Rather than computing heavy second-order derivatives directly, the algorithm approximates Hessian-vector and Jacobian-vector products using intrinsic finite-difference probes (evaluating first-order gradients at tiny geodesic steps $\pm \delta_\varepsilon$), alongside an $O(d_y^3)$ eigendecomposition for the clip. In the stochastic setting, they use coupled sampling (reusing the exact same mini-batch at both $+\delta_\varepsilon$ and $-\delta_\varepsilon$) so mini-batch noise cancels out instead of exploding as $\delta_\varepsilon \to 0$.

Datasets

The authors evaluate their framework on existing datasets paired with manifold constraints and deliberately rank-deficient lower-level Hessians (no new benchmarks are introduced, though a synthetic generator is used for hyperbolic geometry):

  • MiniImageNet: Used for 5-way 5-shot meta-learning with convolutional kernels constrained to Stiefel, Grassmann, or Oblique manifolds.
  • BCI Competition IV-2a (EEG data): Used for bilevel ridge regression on Stiefel and Grassmann manifolds.
  • UCI Superconductivity: Used for higher-dimensional ($d = 70$) scaling checks across Stiefel, Grassmann, and Poincaré-ball geometries.
  • Synthetic Poincaré-ball generator: Used to test bilevel regression under negative curvature.

Key Insights and Ideas

  • Zeroing beats flooring: If you stabilize a singular Hessian with "hard clipping" (bumping near-zero eigenvalues up to $\mu_c$ and inverting), any noise or misalignment in flat directions gets amplified by $1/\mu_c$. Mapping small eigenvalues to zero discards flat-direction noise and recovers the exact Hessian operator at the minimizer.
  • Uniqueness gets replaced by "Bilevel Compatibility": When the lower-level problem has a continuum of solutions instead of a single point, the problem is only well-posed if the upper-level objective doesn't care which point in that connected solution valley you land on (Assumption 5). Under this condition, the pseudoinverse hypergradient is exact.
  • Tiny ridges won't save classical solvers: You might think adding a microscopic $L_2$ penalty ($\lambda = 10^{-6}$) to force strong convexity would fix standard Hessian-inversion methods. Empirically, it doesn't—direct inversion still blows up on step zero when 95% of the spectrum sits at $10^{-6}$.

Key Results

  • Theoretical Convergence: R-HJFBiO achieves an $O(1/T)$ convergence rate and $O(\varepsilon^{-1})$ iteration complexity, matching the best Euclidean PL bounds while accounting for manifold curvature. The stochastic extension hits the standard $O(\varepsilon^{-2})$ stochastic first-order oracle complexity.
  • Empirical Stability: On MiniImageNet meta-learning with singular ($\lambda=0$, ~95% zero eigenvalues) and tiny-ridge ($\lambda=10^{-6}$) Hessians, direct Hessian inversion diverges immediately at step 0, while Conjugate Gradient and Neumann-series baselines abort mid-run or diverge.
  • Precision vs. Accuracy Nuance: An exact-solve variant of R-HJFBiO is the only method that completes all regimes with steadily decreasing surrogate gradient norms and machine-precision linear-system error. Interestingly, unrolled Automatic Differentiation (AD) also avoids crashing and actually achieves higher query accuracy (0.55–0.56 vs. R-HJFBiO's 0.41–0.49), even though AD's auxiliary vector has a massive relative error ($>0.99$) against the true clipped target.

Limitations and Future Work

The authors are refreshingly transparent about the gap between their math and their code:

  • Theory-Practice Gap: The convergence proofs analyze a single-loop tracking recursion using exact exponential maps and parallel transport. However, the experiments run an exact-solve spectral inversion variant, take multiple inner steps, and use faster QR-based retractions. Furthermore, two meta-learning stress tests ($\lambda=0$ and $\lambda=10^{-6}$) technically violate the theorem's assumptions.
  • Heuristic Hyperparameters: The clipping floor $\mu_c$ must theoretically sit below the unknown PL constant $\mu$, and eigenvalues must stay a safe margin away from $\mu_c$ to avoid jump discontinuities. Right now, $\mu_c$ is chosen heuristically; finding a principled, data-driven way to set $\mu_c$—and relaxing the strict bounded-domain assumptions—is left for future work.

Summary updated

Abstract

This paper studies bilevel optimization on Riemannian manifolds where the upper-level objective is nonconvex and the lower-level problem satisfies a Riemannian Polyak - Łojasiewicz condition rather than geodesic strong convexity. The classical hypergradient formula then breaks down, since the lower-level Hessian may be singular or indefinite away from the minimizer. We address this with an intrinsic regularized tangent-space formulation based on spectral clipping, and develop a Riemannian bilevel algorithm that avoids Hessian-inverse solves and inner-loop differentiation. We establish an $O(1/T)$ rate on the averaged squared Riemannian gradient mapping and $O(\varepsilon^{-1})$ iteration complexity, and extend the method to the stochastic finite-sum setting. Experiments on Stiefel, Grassmannian, and Poincar\'e-ball problems with rank-deficient Hessians (BCI~IV-2a, UCI Superconductivity) and Stiefel-constrained meta-learning on MiniImageNet show that the proposed method is the only one whose linear-system error stays at machine precision and whose Riemannian gradient norm decreases steadily, while Hessian-inversion and Neumann-series baselines fail to descend.
BibTeX
@inproceedings{li2026riemannian,
  author = {Zhixuan Li and Yuyang Zhang and Luke Jones and Muztaba Syed and William Chang and Andi Han},
  title = {{Riemannian Bilevel Optimization under the Polyak–Łojasiewicz Condition}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=DqfoM1UJnq},
}
Figure