Fine-grained Analysis of Stability and Generalization for Stochastic Bilevel Optimization
Authors: Xuelin Zhang, Hong Chen, Bin Gu, Tieliang Gong, Feng Zheng
Organizations: College of Informatics, Huazhong Agricultural University, Wuhan 430070, China · Engineering Research Center of Intelligent Technology for Agriculture, Ministry of Education, Wuhan 430070, China · School of Artificial Intelligence, Jilin University, Jilin 130012, China · School of Computer Science and Technology, Xi’an Jiaotong University, Xi’an 710049, China · Department of Computer Science and Engineering, Southern University of Science and Technology, Shenzhen 518055, China
Stochastic bilevel optimization (SBO) has been integrated into many machine learning paradigms recently, including hyperparameter optimization, meta learning, and reinforcement learning. Along with the wide range of applications, there have been numerous studies on the computational behavior of SBO. However, the generalization guarantees of SBO methods are far less understood from the lens of statistical learning theory. In this paper, we provide a systematic generalization analysis of the first-order gradient-based bilevel optimization methods. Firstly, we establish the quantitative connections between the on-average argument stability and the generalization gap of SBO methods. Then, we derive the upper bounds of on-average argument stability for single-timescale stochastic gradient descent (SGD) and two-timescale SGD, where three settings (nonconvex-nonconvex (NC-NC), convex-convex (C-C), and strongly-convex-strongly-convex (SC-SC)) are considered respectively. Experimental analysis validates our theoretical findings. Compared with the previous algorithmic stability analysis, our results do not require reinitializing the inner-level parameters at each iteration and are applicable to more general objective functions.
Figures & tables
Algorithms
Stability
SC-SC
C-C
NC-NC
SSGD
l1
O(m1K)
O(m1KC4ln(K))
—
(Theorem 2 )
l2
O(m12(m1+K)K)
O(m12(m1+K)K2C4−1ln2(K))
—
TSGD
l1
O(m1KTC5)
O(m1K2KTC6ln(T))
O(m12KKC2T1+C3T)
(Theorem 3 )
l2
O(m12(m1+K)KT2C5)
O(m12K2(m1+K)2KT2C6ln2(T))
O(m12(m1+K)2KK2C2T1+C3T2)
SSGD
l1
O(m11)
O(m11)
O(m1KC1)
(Proposition 1)
l2
O(m12Km1+K)
O(m12Km1+K)
O(m12(m1+K)K2C1)
Table 1: Summary of the generalization bounds under different settings. For briefly, l1 ( l2 ) represents the l1 ( l2 ) on-average argument stability and C1−C6 are positive constants. m1 is the number of validation samples; K and T are the total numbers of outer and inner iterations. Assume that the output model has a small empirical risk E[RDm1(A(Dm1,Dm2))]=O(m1−1) .
Figure 1: Results of hyperparameter optimization in data reweighting with varying T and K
Figure 2: Results of hyperparameter optimization in data reweighting with varying K and m1
Bilevel optimization and bilevel minimax optimization have recently emerged as unifying frameworks for a range of machine-learning tasks, including hyperparameter optimization and reinforcement learning. The existing literature focuses on empirical efficiency and convergence guarantees, leaving a critical theoretical gap in understanding how well these algorithms generalize. To bridge this gap, we provide the first systematic generalization analysis for first-order gradient-based bilevel minimax solvers with lower-level minimax problems. Specifically, by leveraging algorithmic stability arguments, we derive fine-grained generalization bounds for three representative algorithms, including single-timescale stochastic gradient descent-ascent, and two variants of two-timescale stochastic gradient descent-ascent. Our results reveal a precise trade-off among algorithmic stability, generalization gaps, and practical settings. Furthermore, extensive empirical evaluations corroborate our theoretical insights on realistic optimization tasks with bilevel minimax structures.
Xuelin Zhang, Peipei Yuan
College of Informatics, Huazhong Agricultural University, Wuhan, 430070, China · School of Artificial Intelligence, Jianghan University, Wuhan, 430056, China
Recent advances in penalty-based methods for stochastic bilevel optimization (SBO) have eliminated the need for second-order derivative oracles. However, for stochastic nonconvex-strongly convex bilevel problems, existing first-order methods typically rely on nested loops and/or large batch sizes for attaining O(ε−6) or O(ε−4) sample complexity under standard bounded-variance assumption or mean-square smoothness assumption. Achieving these rates with a single-loop penalty method and a constant batch size remains challenging due to a large penalty value needed for an accurate approximation. To address this challenge, we develop a stochastic SIngle-loop COnstant-Batch first-order penalty method (SICO) that combines two complementary ingredients. First, it performs one stochastic-gradient update per-iteration for both the original lower-level and penalized problems, with a projection that controls the separation between their iterates. Second, it applies an exponential moving average to stabilize the upper-level gradient estimator. We show that this combination achieves O(ε−6) sample complexity using only O(1) stochastic-gradient samples per iteration under unbiased, bounded-variance stochastic gradients. Under the additional mean-square smoothness assumption on the lower-level stochastic gradients, the same algorithm improves the complexity to O(ε−4) also with O(1) batch size. To the best of our knowledge, this is the first work to match the best-known convergence rate for fully first-order SBO methods using a single loop and a constant batch size. This result addresses an open problem posed in the literature.
Xingyu Chen, Ming Yang, Quanqi Hu +1
Department of Computer Science and Engineering Texas A&M University, College Station, USA
Minimax optimization refers to a class of optimization problems with some variables to minimize and other variables to maximize. Biased stochastic gradient methods have shown practical success in solving minimax problems to either improve robustness, enhance communication efficiency, or decrease computational costs. These successes motivate a lot of theoretical works to study the convergence of biased stochastic gradient methods, while their generalization analysis remains untouched. In this paper, we present the first framework to study the stability and generalization of biased stochastic gradient methods for minimax problems. We establish a connection between stability and generalization for minimax problems by relaxing the existing bounded gradient assumption to a bounded second moment condition. We then introduce a generalized Lipschitz-type condition on bias and gradient estimators, and derive a general stability bound to clarify the connection among bias, gradient estimators, and stability. We apply our general analysis to Zeroth-order and Clipped stochastic gradient descent ascent (SGDA), and derive stability bounds that match those of SGDA under appropriate smoothing/clipping parameters. We combine stability and convergence analyses together, and derive optimal excess risk bounds of order 1/n, where n is the sample size.
Shuang Zeng, Yunwen Lei, Yiming Ying
Department of Mathematics, The University of Hong Kong, Hong Kong, China · School of Mathematics and Statistics, The University of Sydney, Sydney, Australia