- The paper introduces a Stochastic Dynamic Barrier Perturbed Gradient (SDBPG) method that stabilizes dual variables to control bias and variance in nonconvex bilevel optimization.
- It provides explicit joint stationarity guarantees with detailed sample complexity bounds, overcoming limitations of classical methods in nonconvex settings.
- Empirical results on neural network unlearning benchmarks demonstrate superior sample and time efficiency compared to previous deterministic and projection-based approaches.
Stochastic Dynamic Barrier Perturbed Gradient Methods for Nonconvex Simple Bilevel Optimization
Problem Statement and Theoretical Challenges
Stochastic simple bilevel optimization constitutes a critical framework for emerging large-scale hierarchical decision processes, where the upper-level and lower-level objectives are accessed via stochastic gradient oracles and may both be fully nonconvex. The target problem formulation is
x∈Rnminf(x)=E[f~(x,ξf)]subject tox∈Xg∗:=argz∈Rnming(z)=E[g~(z,ξg)].
This structure, with implicit feasible set defined by the solution to a generally nonconvex lower-level problem, excludes projection operations and makes the use of standard primal-dual, Tikhonov regularization, and value-function reformulation techniques ineffective or intractable.
Existing deterministic methods (e.g., DBGD) introduce a dynamic dual multiplier to generate update directions mixing upper- and lower-level gradients, but in the nonconvex stochastic context, this multiplier λk∝1/∥∇g(xk)∥ becomes unbounded near stationary points of the lower level, invalidating classic bounded-dual analysis, and causing stochastic gradient directions to be both biased and arbitrarily high variance.
No prior work has offered explicit (ϵf,ϵg)-stationarity guarantees (i.e., joint control of both optimality metrics) with sample complexity bounds in this general stochastic nonconvex–nonconvex simple bilevel setting.
Algorithmic Advances
SDBPG: Stochastic DBGD with Dual Perturbation
The Stochastic Dynamic Barrier Perturbed Gradient method (SDBPG) introduces a crucial perturbation, regularizing the denominator of the dynamic dual variable with a sequence γk. This stabilization transforms the dual variable:
λγ,k=max{βk−∥∇g(xk)∥2+γk∇g(xk)⊤∇f(xk),0}
and, in the stochastic regime, constructs
λ~γ,k=max{βk−∥∇g~k∥2+γk∇g~k⊤∇f~k,0}
using the same minibatch for both the numerator and denominator, which induces correlation and hence bias but tames the variance.
A single-loop update,
xk+1=xk−ηk(∇f~k+λ~γ,k∇g~k),
is then performed. The regularizer γk allows explicit control of the bias-variance trade-off, enabling (ϵf,ϵg)-stationarity in
O(ϵ−4) (upper) and λk∝1/∥∇g(xk)∥0 (lower) gradient evaluations, provided a rare-visit assumption to problematic "bad regions" is maintained.







Figure 1: Sample and time efficiency of SDBPG (blue), PR-SDBPG (green), VR-PR-SDBPG (orange), and deterministic DDBPG (red) on TOFU (top) and MUSE-News (bottom).
To eliminate the rare-visit assumption (which, while mild, can be hard to verify or enforce in practice), the penalty-regularized SDBPG (PR-SDBPG) reformulates the subproblem entirely:
λk∝1/∥∇g(xk)∥1
The corresponding multiplier is always bounded, and mini-batch sizes can be fixed. This approach guarantees λk∝1/∥∇g(xk)∥2-stationarity unconditionally, at elevated sample complexities: λk∝1/∥∇g(xk)∥3 and λk∝1/∥∇g(xk)∥4 for the upper and lower levels.
A further enhancement, VR-PR-SDBPG, applies STORM-type variance reduction to all stochastic estimators, reducing the sample complexities to λk∝1/∥∇g(xk)∥5 and λk∝1/∥∇g(xk)∥6.
Nonasymptotic Analysis: Joint Stationarity and Complexity
A significant theoretical contribution is a direct joint Lipschitz analysis of the stochastic update direction, treating the dual-multiplier and lower-level gradient as a coupled, noise-dependent map. This avoids artificial independence assumptions and yields tight nonasymptotic bounds for both bias and second moment. The authors derive explicit iteration and sample complexity results for each method:
| Algorithm |
Upper (f) Sample Complexity |
Lower (g) Sample Complexity |
Additional Assumptions |
| SDBPG |
λk∝1/∥∇g(xk)∥7 |
λk∝1/∥∇g(xk)∥8 |
Rare-visit assumption |
| PR-SDBPG |
λk∝1/∥∇g(xk)∥9 |
(ϵf,ϵg)0 |
None |
| VR-PR-SDBPG |
(ϵf,ϵg)1 |
(ϵf,ϵg)2 |
None, variance reduction |
The analysis also demonstrates that multi-loop inexact stochastic primal-dual alternatives are strictly inferior in overall sample complexity.
Empirical Validation
Experiments are conducted on nonconvex bilevel tasks in LLM unlearning with both TOFU and MUSE-News benchmarks, optimizing neural network parameters via LoRA on instruction-tuned LLMs. All metrics are normalized and compared as a function of processed example (not iteration count) and wall-clock time to reflect practical efficiency in large-scale settings:
- SDBPG consistently outperforms both deterministic (DDBPG) and penalty-regularized methods in sample and time efficiency, rapidly reducing both upper and lower stationarity measures.
- VR-PR-SDBPG closes the gap with SDBPG, confirming the theoretical benefit of variance reduction without recourse to the rare-visit assumption.







Figure 1: SDBPG, VR-PR-SDBPG, and PR-SDBPG achieve better normalized stationarity rates per sample and per time unit than DDBPG for both retain ((ϵf,ϵg)3) and joint ((ϵf,ϵg)4) criteria.
Implications and Future Directions
This work establishes the first single-loop stochastic methods to obtain explicit joint (ϵf,ϵg)5-stationarity in fully nonconvex simple bilevel settings with theoretical sample complexity guarantees, opening the door to practical optimization of large-scale, nonconvex bilevel problems, such as large-model unlearning, meta-learning, and nonconvex hyperparameter tuning. The stabilization mechanism for dual variables via perturbation or penalty, and variance-reduction techniques, are both shown to be essential for overcoming the instability and bias induced by stochastic gradients and degeneracy near lower-level stationarity.
Further research directions include tightening the bounds for the (penalty-)regularized algorithm to close the remaining log-factor gap; extending the approach to general bilevel or compositional objectives with cross-level coupling; and exploring adaptive, data-driven schedules for the penalty and perturbation parameters to minimize sample complexity in practice.
Conclusion
The proposed SDBPG, PR-SDBPG, and VR-PR-SDBPG methods provide a comprehensive set of single-loop, first-order stochastic algorithms for nonconvex simple bilevel optimization, each with explicit nonasymptotic guarantees on both optimality measures and sample complexities. The analysis establishes essential new tools for handling the instability of stochastic dynamic dual multipliers, and the experiments corroborate strong practical improvements in the core application of stochastic unlearning tasks in neural networks (2607.10957).