Will Bilevel Optimizers Benefit from Loops

Kaiyi JiMingrui LiuYingbin LiangLei Ying

article2022NeurIPS56 citations

Establishes a unified convergence and computational complexity framework for approximate implicit differentiation and iterative differentiation bilevel optimizers, resolving whether inner-level loops improve efficiency and proving that iterative differentiation requires loops to avoid non-vanishing convergence error.

Listen

Bilevel optimization has become an essential framework for solving modern machine learning challenges, including hyperparameter tuning, meta-learning, and reinforcement learning. In these frameworks, an outer objective depends directly on the solution of an inner sub-problem. Standard optimization algorithms generally solve these problems either by running multi-step inner loops that iterate until high accuracy is achieved or by using single-step, no-loop approximations to reduce the computational cost per update. Prior literature lacked a unified framework to systematically evaluate whether adding these internal loops truly improves overall efficiency or merely introduces unnecessary computation.

The main objective of the article is to establish a comprehensive theoretical convergence analysis for the two most prominent gradient-based bilevel optimizer families: Approximate Implicit Differentiation (AID-BiO) and Iterative Differentiation (ITD-BiO). By analyzing all possible configurations of inner-level loops and linear-system approximation loops, the article provides rigorous computational complexity bounds that clearly determine the most efficient architectural choices.

To conduct this evaluation, the analysis models a non-convex outer problem alongside a strongly convex inner problem under standard mathematical smoothness conditions. The analysis tracks the required gradient evaluations and matrix-vector product calculations across all implementation variants. The authors also eliminate restrictive assumptions present in prior research, such as assuming bounded inner solutions, and establish both theoretical upper and lower error bounds, validating the results with numerical benchmarks on standard image and representation tasks.

The findings demonstrate that internal loops are critical for bilevel optimization. First, for AID-BiO, running an inner optimization loop significantly improves total computational complexity compared to a no-loop design, accelerating the overall convergence rate. Second, adding a loop to approximate the outer-level linear system further reduces gradient evaluations. Third, for ITD-BiO, internal loops are mathematically required: the theoretical lower bound proves that single-step implementations suffer from an unavoidable, permanent estimation error that prevents exact convergence. Finally, empirical tests confirm that multi-iteration loop configurations achieve substantially lower loss values and faster runtimes than single-step counterparts.

These findings have direct operational implications for engineering machine learning pipelines. While simpler single-loop algorithms appear less computationally demanding per step, they are substantially slower to converge overall and risk producing inaccurate models in ITD-based settings. Unlike standard minimax optimization, where single-loop methods are often superior, bilevel optimization relies heavily on second-order derivative accuracy, making inner loop precision vital for performance and stability.

Practitioners should prioritize multi-step inner loops when deploying bilevel optimizers. For AID-BiO, teams facing memory or hardware constraints can use a single-step linear system solver combined with a multi-step inner solver to maintain peak matrix-vector efficiency while keeping per-iteration resource usage manageable. For ITD-BiO, multi-step loops must always be used to ensure valid convergence. Future research should focus on closing the theoretical gap between the upper and lower error bounds for ITD algorithms and extending this unified analysis to stochastic and variance-reduced settings.

Cover for Will Bilevel Optimizers Benefit from Loops

Abstract

Bilevel optimization has arisen as a powerful tool for solving a variety of machine learning problems. Two current popular bilevel optimizers AID-BiO and ITD-BiO naturally involve solving one or two sub-problems, and consequently, whether we solve these problems with loops (that take many iterations) or without loops (that take only a few iterations) can significantly affect the overall computational efficiency. Existing studies in the literature cover only some of those implementation choices, and the complexity bounds available are not refined enough to enable rigorous comparison among different implementations. In this paper, we first establish unified convergence analysis for both AID-BiO and ITD-BiO that are applicable to all implementation choices of loops. We then specialize our results to characterize the computational complexity for all implementations, which enable an explicit comparison among them. Our result indicates that for AID-BiO, the loop for estimating the optimal point of the inner function is beneficial for overall efficiency, although it causes higher complexity for each update step, and the loop for approximating the outer-level Hessian-inverse-vector product reduces the gradient complexity. For ITD-BiO, the two loops always coexist, and our convergence upper and lower bounds show that such loops are necessary to guarantee a vanishing convergence error, whereas the no-loop scheme suffers from an unavoidable non-vanishing convergence error. Our numerical experiments further corroborate our theoretical results.

Table of Contents

  • 1 Introduction
  • 2 Algorithms
  • 2.1 AID-based Bilevel Optimization Algorithm
  • 2.2 ITD-Based Bilevel Optimization Algorithm
  • 3 Definitions and Assumptions
  • 4 Convergence Analysis of AID-BiO
  • 4.1 Convergence Rate and Computational Complexity
  • 4.2 Comparison among Four Implementations
  • 5 Convergence Analysis of ITD-BiO
  • 6 Empirical Verification
  • 7 Conclusion
  • Acknowledgements
  • References
  • Checklist

Knowls

  1. Knowl 1 — AID-Based Bilevel Optimization with Double Warm Starts

    algorithm

    The approximate implicit differentiation-based bilevel optimizer (AID-BiO) solves the bilevel optimization problem: min⁡x∈RpΦ(x):=f(x,y∗(x))s.t.y∗(x)=arg⁡min⁡y∈Rqg(x,y)\min_{x \in \mathbb{R}^p} \Phi(x) := f(x, y^*(x)) \quad \text{s.t.} \quad y^*(x) = \arg\min_{y \in \mathbb{R}^q} g(x, y) where g(x,y)g(x, y) is μ\mu-strongly convex in yy, and the outer function Φ(x)\Phi(x) is possibly nonconvex in xx. The algorithm approximates the true hypergradient: ∇Φ(xk)=∇xf(xk,y∗(xk))−∇x∇yg(xk,y∗(xk))vk∗\nabla \Phi(x_k) = \nabla_x f(x_k, y^*(x_k)) - \nabla_x \nabla_y g(x_k, y^*(x_k)) v_k^* where vk∗v_k^* solves ∇y2g(xk,y∗(xk))v=∇yf(xk,y∗(xk))\nabla_y^2 g(x_k, y^*(x_k)) v = \nabla_y f(x_k, y^*(x_k)). AID-BiO executes NN inner gradient descent steps for yy initialized with warm start yk0=yk−1Ny_k^0 = y_{k-1}^N, and solves the linear system for vv via QQ steps initialized with warm start vk0=vk−1Qv_k^0 = v_{k-1}^Q.

    Input: Stepsizes α,β>0\alpha, \beta > 0, inner step count NN, linear solver step count QQ, initial points x0,y0,v0x_0, y_0, v_0
    for k=0,1,2,…,K−1k = 0, 1, 2, \dots, K-1 do
        if k>0k > 0 then
            yk0=yk−1Ny_k^0 = y_{k-1}^N
        else
            yk0=y0y_k^0 = y_0
        end if
        for t=1,…,Nt = 1, \dots, N do
            ykt=ykt−1−α∇yg(xk,ykt−1)y_k^t = y_k^{t-1} - \alpha \nabla_y g(x_k, y_k^{t-1})
        end for
        if k>0k > 0 then
            vk0=vk−1Qv_k^0 = v_{k-1}^Q
        else
            vk0=v0v_k^0 = v_0
        end if
        Compute vkQv_k^Q by applying QQ steps of gradient descent to 12⟨v,∇y2g(xk,ykN)v⟩−⟨∇yf(xk,ykN),v⟩\frac{1}{2} \langle v, \nabla_y^2 g(x_k, y_k^N) v \rangle - \langle \nabla_y f(x_k, y_k^N), v \rangle starting from vk0v_k^0
        Compute hypergradient estimator ∇^Φ(xk)=∇xf(xk,ykN)−∇x∇yg(xk,ykN)vkQ\widehat{\nabla} \Phi(x_k) = \nabla_x f(x_k, y_k^N) - \nabla_x \nabla_y g(x_k, y_k^N) v_k^Q
        Update outer variable xk+1=xk−β∇^Φ(xk)x_{k+1} = x_k - \beta \widehat{\nabla} \Phi(x_k)
    end for
    Output: xKx_K
  2. Knowl 2 — ITD-Based Bilevel Optimization with Warm Start

    algorithm

    The iterative differentiation-based bilevel optimizer (ITD-BiO) solves bilevel optimization problems of the form min⁡x∈RpΦ(x):=f(x,y∗(x))\min_{x \in \mathbb{R}^p} \Phi(x) := f(x, y^*(x)) subject to y∗(x)=arg⁡min⁡y∈Rqg(x,y)y^*(x) = \arg\min_{y \in \mathbb{R}^q} g(x, y). ITD-BiO computes the hypergradient by differentiating through the NN inner-loop gradient descent iterations via automatic differentiation / backpropagation. Because the differentiation tracks the exact trajectory of length NN, the parameter QQ is implicitly equal to NN.

    Input: Stepsizes α,β>0\alpha, \beta > 0, inner step count NN, initializations x0,y0x_0, y_0
    for k=0,1,2,…,K−1k = 0, 1, 2, \dots, K-1 do
        if k>0k > 0 then
            yk0=yk−1Ny_k^0 = y_{k-1}^N
        else
            yk0=y0y_k^0 = y_0
        end if
        for t=1,…,Nt = 1, \dots, N do
            ykt=ykt−1−α∇yg(xk,ykt−1)y_k^t = y_k^{t-1} - \alpha \nabla_y g(x_k, y_k^{t-1})
        end for
        Compute hypergradient estimator via backpropagation along the inner trajectory:
        ∇^Φ(xk)=∇xf(xk,ykN)−α∑t=0N−1∇x∇yg(xk,ykt)(∏j=t+1N−1(I−α∇y2g(xk,ykj)))∇yf(xk,ykN)\widehat{\nabla} \Phi(x_k) = \nabla_x f(x_k, y_k^N) - \alpha \sum_{t=0}^{N-1} \nabla_x \nabla_y g(x_k, y_k^t) \left( \prod_{j=t+1}^{N-1} (I - \alpha \nabla_y^2 g(x_k, y_k^j)) \right) \nabla_y f(x_k, y_k^N)
        Update outer variable xk+1=xk−β∇^Φ(xk)x_{k+1} = x_k - \beta \widehat{\nabla} \Phi(x_k)
    end for
    Output: xKx_K
  3. Knowl 3 — Computational Complexity Comparison of AID-BiO Implementations

    data/table

    The computational complexities of four AID-BiO implementations to reach an ϵ\epsilon-accurate stationary point (where ∥∇Φ(x)∥2≤ϵ\|\nabla \Phi(x)\|^2 \le \epsilon) are compared below. The inner objective condition number is κ=L/μ\kappa = L / \mu. Gradient descent (GD) is used as the linear solver in all cases. MV(ϵ)\text{MV}(\epsilon) denotes the total number of Jacobian- and Hessian-vector product computations, Gc(ϵ)\text{Gc}(\epsilon) denotes the total number of gradient computations, and O~(⋅)\widetilde{\mathcal{O}}(\cdot) hides logarithmic factors of κ/ϵ\kappa / \epsilon.

    Algorithms QQ NN MV(ϵ)\text{MV}(\epsilon) Gc(ϵ)\text{Gc}(\epsilon)
    Bilevel Approximation (BA) Θ(κln⁡κ)\Theta(\kappa \ln \kappa) (k+1)1/42\frac{(k+1)^{1/4}}{2} O~(κ5ϵ−1)\widetilde{\mathcal{O}}(\kappa^5 \epsilon^{-1}) O~(κ5ϵ−1.25)\widetilde{\mathcal{O}}(\kappa^5 \epsilon^{-1.25})
    AID-BiO (Prior Art) Θ(κln⁡κ)\Theta(\kappa \ln \kappa) Θ(κln⁡κ)\Theta(\kappa \ln \kappa) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1})
    N-Q-loop AID Θ(κln⁡κ)\Theta(\kappa \ln \kappa) Θ(κln⁡κ)\Theta(\kappa \ln \kappa) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1})
    Q-loop AID Θ(κln⁡κ)\Theta(\kappa \ln \kappa) 11 O~(κ6ϵ−1)\widetilde{\mathcal{O}}(\kappa^6 \epsilon^{-1}) O~(κ5ϵ−1)\widetilde{\mathcal{O}}(\kappa^5 \epsilon^{-1})
    N-loop AID O(1)\mathcal{O}(1) Θ(κln⁡κ)\Theta(\kappa \ln \kappa) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) O~(κ5ϵ−1)\widetilde{\mathcal{O}}(\kappa^5 \epsilon^{-1})
    No-loop AID O(1)\mathcal{O}(1) 11 O~(κ6ϵ−1)\widetilde{\mathcal{O}}(\kappa^6 \epsilon^{-1}) O~(κ6ϵ−1)\widetilde{\mathcal{O}}(\kappa^6 \epsilon^{-1})

    The table demonstrates that choosing a large inner loop N=Θ(κln⁡κ)N = \Theta(\kappa \ln \kappa) improves matrix-vector complexity from O~(κ6ϵ−1)\widetilde{\mathcal{O}}(\kappa^6 \epsilon^{-1}) to O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}), while a large linear solver loop Q=Θ(κln⁡κ)Q = \Theta(\kappa \ln \kappa) reduces the gradient complexity.

  4. Knowl 4 — Complexity and Convergence Error Comparison for ITD-BiO Implementations

    data/table

    The convergence rates and computational complexities of ITD-BiO implementations to achieve an ϵ\epsilon-accurate stationary point (where ∥∇Φ(x)∥2≤ϵ\|\nabla \Phi(x)\|^2 \le \epsilon) are compared below. The inner objective condition number is κ=L/μ\kappa = L / \mu, where μ\mu is the strong-convexity constant of g(x,⋅)g(x, \cdot) and LL is the Lipschitz constant. 'N/A' indicates that the complexity to achieve arbitrary ϵ\epsilon-accuracy is not reachable due to a non-vanishing convergence error. O~(⋅)\widetilde{\mathcal{O}}(\cdot) hides logarithmic factors of κ/ϵ\kappa / \epsilon.

    Algorithms NN Convergence rate MV(ϵ)\text{MV}(\epsilon) Gc(ϵ)\text{Gc}(\epsilon)
    ITD-BiO (Prior Art) Θ(κln⁡κ)\Theta(\kappa \ln \kappa) O(κ3K+ϵ)\mathcal{O}\left(\frac{\kappa^3}{K} + \epsilon\right) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1})
    N-N-loop ITD Θ(κln⁡κ)\Theta(\kappa \ln \kappa) O(κ3K+ϵ)\mathcal{O}\left(\frac{\kappa^3}{K} + \epsilon\right) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1})
    No-loop ITD Θ(1)\Theta(1) O(κ3K+κ3)\mathcal{O}\left(\frac{\kappa^3}{K} + \kappa^3\right) N/A N/A
    Lower bound Θ(1)\Theta(1) Ω(κ2)\Omega(\kappa^2) N/A N/A

    The table shows that for ITD-BiO, choosing N=Θ(κln⁡(κ/ϵ))N = \Theta(\kappa \ln(\kappa/\epsilon)) is necessary to ensure a vanishing convergence error, whereas a constant number of inner steps N=Θ(1)N = \Theta(1) suffers from an unavoidable non-vanishing error.

  5. Knowl 5 — Unified Convergence Analysis of AID-BiO for General Linear System Iterations

    theoretical result

    Let f(x,y)f(x, y) and g(x,y)g(x, y) satisfy the standard regularity assumptions (Assumptions 1–4) with condition number κ=L/μ\kappa = L / \mu, smoothness parameter of the outer objective LΦ=Θ(κ3)L_\Phi = \Theta(\kappa^3), and gradient bound MM. Choose parameters α,η,λ\alpha, \eta, \lambda such that: (1+λ)(1−αμ)N(1+r(1+1ημ))≤1−ημ(1 + \lambda)(1 - \alpha \mu)^N \left(1 + r\left(1 + \frac{1}{\eta \mu}\right)\right) \le 1 - \eta \mu where r=Θ(μ2CQ2)r = \Theta(\mu^2 C_Q^2) and: CQ=Θ((1−ημ)Q−1ηQμ+1−(1−ημ)Q(1+ηQμ)μ2+(1−(1−ημ)Q)Lμ)C_Q = \Theta\left( \frac{(1-\eta \mu)^{Q-1} \eta Q}{\mu} + \frac{1 - (1-\eta \mu)^Q (1 + \eta Q \mu)}{\mu^2} + (1 - (1-\eta \mu)^Q)\frac{L}{\mu} \right) Define w~=Θ(ημκ4λr+κ4ημ((1−ημ)2Qμ2+ημλ))\widetilde{w} = \Theta\left( \frac{\eta \mu \kappa^4}{\lambda r} + \frac{\kappa^4}{\eta \mu} \left( \frac{(1-\eta \mu)^{2Q}}{\mu^2} + \frac{\eta \mu}{\lambda} \right) \right). Choosing β=min⁡{1LΦ,ημw~}\beta = \min\left\{ \frac{1}{L_\Phi}, \sqrt{\frac{\eta \mu}{\widetilde{w}}} \right\}, the iterates generated by AID-BiO satisfy: 1K∑k=0K−1∥∇Φ(xk)∥2=O(Φ(x0)−Φ(x∗)βK+κ2∥v0∗∥2+(3Mμ+κ2)ημK)\frac{1}{K} \sum_{k=0}^{K-1} \|\nabla \Phi(x_k)\|^2 = \mathcal{O}\left( \frac{\Phi(x_0) - \Phi(x^*)}{\beta K} + \frac{\kappa^2 \|v_0^*\|^2 + (\frac{3M}{\mu} + \kappa^2)}{\eta \mu K} \right)

    Specializing this result to specific loop configurations yields:

    1. N-loop AID-BiO (N=Θ(κln⁡κ)N = \Theta(\kappa \ln \kappa) and Q=Θ(1)Q = \Theta(1)): With η=1L\eta = \frac{1}{L}, α=1L\alpha = \frac{1}{L}, and λ=1\lambda = 1, the average squared gradient norm is O(κ4K+κ3K)\mathcal{O}\left(\frac{\kappa^4}{K} + \frac{\kappa^3}{K}\right), giving computational complexities Gc(ϵ)=O~(κ5ϵ−1)\text{Gc}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^5 \epsilon^{-1}) and MV(ϵ)=O~(κ4ϵ−1)\text{MV}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}).
    2. No-loop AID-BiO (N=1N = 1 and Q=Θ(1)Q = \Theta(1)): With α=1L\alpha = \frac{1}{L}, λ=αμ2\lambda = \frac{\alpha \mu}{2}, and η=min⁡{1128αμ2Q2L2,α4,1μQ}\eta = \min\left\{ \frac{1}{128} \frac{\alpha \mu^2}{Q^2 L^2}, \frac{\alpha}{4}, \frac{1}{\mu Q} \right\}, the average squared gradient norm is O(κ6K+κ5K)\mathcal{O}\left(\frac{\kappa^6}{K} + \frac{\kappa^5}{K}\right), giving computational complexities Gc(ϵ)=O~(κ6ϵ−1)\text{Gc}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^6 \epsilon^{-1}) and MV(ϵ)=O~(κ6ϵ−1)\text{MV}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^6 \epsilon^{-1}).
  6. Knowl 6 — Convergence Analysis of AID-BiO for Large Linear System Iterations

    theoretical result

    Under Assumptions 1–4, with initialization vk0=0v_k^0 = 0, define: τ=Θ((1−αμ)N(1+λ+(1+λ−1)(κ2+CQ2)κ2β2))\tau = \Theta\left( (1 - \alpha \mu)^N \left( 1 + \lambda + (1 + \lambda^{-1})(\kappa^2 + C_Q^2)\kappa^2 \beta^2 \right) \right) w=Θ((1−αμ)N(κ2+CQ2)(1+λ−1)κ2)w = \Theta\left( (1 - \alpha \mu)^N (\kappa^2 + C_Q^2)(1 + \lambda^{-1})\kappa^2 \right) where CQC_Q is a positive constant depending on QQ. Choose α,β\alpha, \beta such that τ<1\tau < 1 and βLΦ+wβ2(12+βLΦ)11−τ≤14\beta L_\Phi + w \beta^2 \left(\frac{1}{2} + \beta L_\Phi\right) \frac{1}{1-\tau} \le \frac{1}{4}. Then the iterates of AID-BiO satisfy: 1K∑k=0K−1∥∇Φ(xk)∥2=O(Φ(x0)−Φ(x∗)βK+1Kδ01−τ+κ2(1−ημ)2Q)\frac{1}{K} \sum_{k=0}^{K-1} \|\nabla \Phi(x_k)\|^2 = \mathcal{O}\left( \frac{\Phi(x_0) - \Phi(x^*)}{\beta K} + \frac{1}{K} \frac{\delta_0}{1 - \tau} + \kappa^2 (1 - \eta \mu)^{2Q} \right) where δ0=Θ((κ2+CQ2)(1−αμ)N∥y0∗−y0∥2)\delta_0 = \Theta\left( (\kappa^2 + C_Q^2)(1 - \alpha \mu)^N \|y_0^* - y_0\|^2 \right).

    Specializing this theorem for large Q=Θ(κln⁡(κ/ϵ))Q = \Theta(\kappa \ln(\kappa / \epsilon)) yields:

    1. N-Q-loop AID-BiO (N=Θ(κln⁡κ)N = \Theta(\kappa \ln \kappa), Q=Θ(κln⁡(κ/ϵ))Q = \Theta(\kappa \ln(\kappa / \epsilon))): Setting η=α=1L\eta = \alpha = \frac{1}{L}, λ=1\lambda = 1, and β=Θ(κ−3)\beta = \Theta(\kappa^{-3}), the rate is O(κ3K+ϵ)\mathcal{O}\left(\frac{\kappa^3}{K} + \epsilon\right), yielding complexities Gc(ϵ)=O~(κ4ϵ−1)\text{Gc}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) and MV(ϵ)=O~(κ4ϵ−1)\text{MV}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}).
    2. Q-loop AID-BiO (N=1N = 1, Q=Θ(κln⁡(κ/ϵ))Q = \Theta(\kappa \ln(\kappa / \epsilon))): Setting α=η=1L\alpha = \eta = \frac{1}{L}, λ=αμ2\lambda = \frac{\alpha \mu}{2}, and β=Θ(κ−4)\beta = \Theta(\kappa^{-4}), the rate is O(κ5K+κ4K+ϵ)\mathcal{O}\left(\frac{\kappa^5}{K} + \frac{\kappa^4}{K} + \epsilon\right), yielding complexities Gc(ϵ)=O~(κ5ϵ−1)\text{Gc}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^5 \epsilon^{-1}) and MV(ϵ)=O~(κ6ϵ−1)\text{MV}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^6 \epsilon^{-1}).
  7. Knowl 7 — Unified Convergence Rate of ITD-BiO

    theoretical result

    Under Assumptions 1–4, define: w=Θ(κ2αμ(1−αμ)NλN+wN2μ2),τ=(λN+N2)(1−αμ)N+wN2w = \Theta\left( \frac{\kappa^2}{\alpha \mu} (1 - \alpha \mu)^N \lambda_N + \frac{w_N^2}{\mu^2} \right), \quad \tau = (\lambda_N + N^2)(1 - \alpha \mu)^N + w_N^2 where λN=Θ(wN2+(1+αLN)21−14αμ−(1−αμ)N(1+12αμ))\lambda_N = \Theta\left( \frac{w_N^2 + (1 + \alpha L N)^2}{1 - \frac{1}{4}\alpha \mu - (1 - \alpha \mu)^N(1 + \frac{1}{2}\alpha \mu)} \right) and wN=Θ((1+α(1−(1−αμ)N/2)1−1−αμ)α(1−(1−αμ)N/2)1−1−αμ(1−αμ)N2−1)w_N = \Theta\left( \left( 1 + \frac{\alpha (1 - (1 - \alpha \mu)^{N/2})}{1 - \sqrt{1 - \alpha \mu}} \right) \frac{\alpha (1 - (1 - \alpha \mu)^{N/2})}{1 - \sqrt{1 - \alpha \mu}} (1 - \alpha \mu)^{\frac{N}{2} - 1} \right).

    Choosing parameters such that β2≤1−14αμ2w\beta^2 \le \frac{1 - \frac{1}{4}\alpha \mu}{2w}, α≤12L\alpha \le \frac{1}{2L}, and βLΦ+8αμ(12+βLΦ)wβ2<14\beta L_\Phi + \frac{8}{\alpha \mu} \left(\frac{1}{2} + \beta L_\Phi\right) w \beta^2 < \frac{1}{4}, where LΦ=Θ(κ3)L_\Phi = \Theta(\kappa^3), the iterates satisfy: 1K∑k=0K−1∥∇Φ(xk)∥2=O(ΔΦβK+τΔyμ2K+(1−αμ)2Nμ3K+M2(1−αμ)2NL2αμ3)\frac{1}{K} \sum_{k=0}^{K-1} \|\nabla \Phi(x_k)\|^2 = \mathcal{O}\left( \frac{\Delta_\Phi}{\beta K} + \frac{\tau \Delta_y}{\mu^2 K} + \frac{(1 - \alpha \mu)^{2N}}{\mu^3 K} + \frac{M^2 (1 - \alpha \mu)^{2N} L^2}{\alpha \mu^3} \right) where ΔΦ=Φ(x0)−min⁡xΦ(x)\Delta_\Phi = \Phi(x_0) - \min_x \Phi(x) and Δy=∥y0−y∗(x0)∥2\Delta_y = \|y_0 - y^*(x_0)\|^2.

    Specializations for ITD-BiO:

    1. N-N-loop ITD-BiO (N=Θ(κln⁡(κ/ϵ))N = \Theta(\kappa \ln(\kappa / \epsilon))): With α=12L\alpha = \frac{1}{2L} and β=min⁡{αμ40w,1−αμ42w,18LΦ}\beta = \min\left\{ \sqrt{\frac{\alpha \mu}{40w}}, \sqrt{\frac{1 - \frac{\alpha \mu}{4}}{2w}}, \frac{1}{8L_\Phi} \right\}, the convergence rate is O(κ3K+ϵ)\mathcal{O}\left(\frac{\kappa^3}{K} + \epsilon\right), with complexities Gc(ϵ)=O~(κ4ϵ−1)\text{Gc}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) and MV(ϵ)=O~(κ4ϵ−1)\text{MV}(\epsilon) = \widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}).
    2. No-loop ITD-BiO (N=Θ(1)N = \Theta(1)): With α=12NL\alpha = \frac{1}{2NL} and β=min⁡{αμ40w,1−αμ42w,18LΦ}\beta = \min\left\{ \sqrt{\frac{\alpha \mu}{40w}}, \sqrt{\frac{1 - \frac{\alpha \mu}{4}}{2w}}, \frac{1}{8L_\Phi} \right\}, the convergence bound contains a non-vanishing error term: 1K∑k=0K−1∥∇Φ(xk)∥2=O(κ3K+M2L2αμ3)\frac{1}{K} \sum_{k=0}^{K-1} \|\nabla \Phi(x_k)\|^2 = \mathcal{O}\left( \frac{\kappa^3}{K} + \frac{M^2 L^2}{\alpha \mu^3} \right)
  8. Knowl 8 — Non-Vanishing Error Lower Bound for ITD-BiO with Small Inner Loops

    theoretical result

    For ITD-BiO with stepsizes α≤1L\alpha \le \frac{1}{L}, β≤1LΦ\beta \le \frac{1}{L_\Phi}, and inner loop size N≤O(1)N \le \mathcal{O}(1), where LΦL_\Phi is the smoothness parameter of Φ(x)\Phi(x), there exist objective functions f(x,y)f(x, y) and g(x,y)g(x, y) satisfying Assumptions 1, 2, 3, and 4 such that for all outer iterates xKx_K (K≥1K \ge 1): ∥∇Φ(xK)∥2≥Ω(L2M2μ2(1−αμ)2N)\|\nabla \Phi(x_K)\|^2 \ge \Omega\left( \frac{L^2 M^2}{\mu^2} (1 - \alpha \mu)^{2N} \right) This lower bound establishes that a non-vanishing error is unavoidable for ITD-BiO whenever N=Θ(1)N = \Theta(1), demonstrating that choosing a large inner loop N=Θ(κln⁡(κ/ϵ))N = \Theta(\kappa \ln(\kappa / \epsilon)) is fundamentally necessary for ITD-BiO to reach an ϵ\epsilon-accurate stationary point.

  9. Knowl 9 — Standard Smoothness, Strong Convexity, and Bounded Inner-Gradient Assumptions

    assumption

    The analysis of AID-BiO and ITD-BiO relies on four assumptions on the outer objective f(x,y)f(x, y) and the inner objective g(x,y)g(x, y) for z=(x,y)∈Rp×Rqz = (x, y) \in \mathbb{R}^p \times \mathbb{R}^q:

    1. Inner Strong Convexity: The lower-level function g(x,y)g(x, y) is μ\mu-strongly convex with respect to yy, i.e., ∇y2g(x,y)⪰μI\nabla_y^2 g(x, y) \succeq \mu I.
    2. Lipschitz Gradients: The gradients ∇f(z)\nabla f(z) and ∇g(z)\nabla g(z) are LL-Lipschitz continuous: ∥∇f(z)−∇f(z′)∥≤L∥z−z′∥,∥∇g(z)−∇g(z′)∥≤L∥z−z′∥\|\nabla f(z) - \nabla f(z')\| \le L\|z - z'\|, \quad \|\nabla g(z) - \nabla g(z')\| \le L\|z - z'\|
    3. Lipschitz Derivatives: The higher-order derivatives ∇x∇yg(z)\nabla_x \nabla_y g(z) and ∇y2g(z)\nabla_y^2 g(z) are ρ\rho-Lipschitz continuous: ∥∇x∇yg(z)−∇x∇yg(z′)∥≤ρ∥z−z′∥,∥∇y2g(z)−∇y2g(z′)∥≤ρ∥z−z′∥\|\nabla_x \nabla_y g(z) - \nabla_x \nabla_y g(z')\| \le \rho\|z - z'\|, \quad \|\nabla_y^2 g(z) - \nabla_y^2 g(z')\| \le \rho\|z - z'\|
    4. Bounded Gradient at Inner Minimizer: There exists a constant M>0M > 0 such that for all xx, ∥∇yf(x,y∗(x))∥≤M\|\nabla_y f(x, y^*(x))\| \le M, where y∗(x)=arg⁡min⁡yg(x,y)y^*(x) = \arg\min_y g(x, y).
  10. Knowl 10 — Empirical Evaluation of Loop Configurations in AID-BiO and ITD-BiO

    empirical result

    Empirical evaluations on hyperparameter optimization on MNIST and synthetic hyper-representation problems validate the theoretical findings on loop choices:

    1. AID-BiO on MNIST Hyperparameter Optimization:

      • Comparing inner loop sizes N∈{1,20,50}N \in \{1, 20, 50\} and linear solver iterations Q∈{1,20,50}Q \in \{1, 20, 50\}, configurations with N=20N=20 or N=50N=50 converge significantly faster in wall-clock time and achieve lower training/test loss than configurations with N=1N=1.
      • Fixing N=20N=20, the convergence curves for Q=20Q=20 and Q=1Q=1 are comparable, which aligns with the theoretical prediction that the dominant matrix-vector complexity O~(κ4ϵ−1)\widetilde{\mathcal{O}}(\kappa^4 \epsilon^{-1}) is governed by NN.
    2. ITD-BiO on Hyper-Representation:

      • In hyper-representation optimization of min⁡λ12p∥h(XV;λ)w∗−YV∥2\min_\lambda \frac{1}{2p} \|h(X_V; \lambda)w^* - Y_V\|^2 subject to w∗=arg⁡min⁡w12q∥h(XT;λ)w−YT∥2+γ2∥w∥2w^* = \arg\min_w \frac{1}{2q} \|h(X_T; \lambda)w - Y_T\|^2 + \frac{\gamma}{2}\|w\|^2, validation loss across iterations demonstrates the non-vanishing error for N=1N=1 versus vanishing error for N=20N=20:
    Algorithm k=10k=10 k=50k=50 k=100k=100 k=500k=500 k=1000k=1000
    N-N-loop ITD (N=20N=20) 9.32 0.11 0.01 0.004 0.004
    No-loop ITD (N=1N=1) 435 6.9 0.04 0.04 0.04
    • No-loop ITD stalls at a loss of 0.040.04, whereas N-N-loop ITD achieves 0.0040.004, empirically confirming the theoretical non-vanishing error lower bound for constant NN.

Coverage note — None was omitted; all key theoretical theorems, corollaries, algorithm definitions, lower bounds, complexity comparison tables, and empirical results from the paper have been represented as self-contained knowls.

References

  1. 1.L. Bertinetto, J. F. Henriques, P. Torr, and A. Vedaldi. Meta-learning with differentiable closed-form solvers. In International Conference on Learning Representations (ICLR), 2018.
  2. 2.T. Chen, Y. Sun, and W. Yin. Closing the gap: Tighter analysis of alternating stochastic gradient methods for bilevel problems. Advances in Neural Information Processing Systems (NeurIPS), 34:25294–25307, 2021.
  3. 3.T. Chen, Y. Sun, and W. Yin. A single-timescale stochastic bilevel optimization method. arXiv preprint arXiv:2102.04671, 2021.
  4. 4.J. Domke. Generic methods for optimization-based modeling. In Artificial Intelligence and Statistics (AISTATS), pages 318–326, 2012.
  5. 5.M. Feurer and F. Hutter. Hyperparameter optimization. In Automated Machine Learning, pages 3–33. Springer, Cham, 2019.
  6. 6.C. Finn, P. Abbeel, and S. Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proc. International Conference on Machine Learning (ICML), pages 1126–1135, 2017.
  7. 7.R. Flamary, A. Rakotomamonjy, and G. Gasso. Learning constrained task similarities in graphregularized multi-task learning. Regularization, Optimization, Kernels, and Support Vector Machines, page 103, 2014.
  8. 8.L. Franceschi, M. Donini, P. Frasconi, and M. Pontil. Forward and reverse gradient-based hyperparameter optimization. In International Conference on Machine Learning (ICML), pages 1165–1173, 2017.
  9. 9.L. Franceschi, P. Frasconi, S. Salzo, R. Grazzi, and M. Pontil. Bilevel programming for hyperparameter optimization and meta-learning. In International Conference on Machine Learning (ICML), pages 1568–1577, 2018.
  10. 10.S. Ghadimi and M. Wang. Approximation methods for bilevel programming. arXiv preprint arXiv:1802.02246, 2018.
  11. 11.R. Grazzi, L. Franceschi, M. Pontil, and S. Salzo. On the iteration complexity of hypergradient computation. In Proc. International Conference on Machine Learning (ICML), 2020.
  12. 12.Z. Guo, Y. Xu, W. Yin, R. Jin, and T. Yang. On stochastic moving-average estimators for non-convex optimization. arXiv preprint arXiv:2104.14840, 2021.
  13. 13.Z. Guo and T. Yang. Randomized stochastic variance-reduced methods for stochastic bilevel optimization. arXiv preprint arXiv:2105.02266, 2021.
  14. 14.P. Hansen, B. Jaumard, and G. Savard. New branch-and-bound rules for linear bilevel programming. SIAM Journal on Scientific and Statistical Computing, 13(5):1194–1217, 1992.
  15. 15.M. Hong, H.-T. Wai, Z. Wang, and Z. Yang. A two-timescale framework for bilevel optimization: Complexity analysis and application to actor-critic. arXiv preprint arXiv:2007.05170, 2020.
  16. 16.M. Huang, K. Ji, S. Ma, and L. Lai. Efficiently escaping saddle points in bilevel optimization. arXiv preprint arXiv:2202.03684, 2022.
  17. 17.K. Ji, J. D. Lee, Y. Liang, and H. V. Poor. Convergence of meta-learning with task-specific adaptation over partial parameters. arXiv preprint arXiv:2006.09486, 2020.
  18. 18.K. Ji and Y. Liang. Lower bounds and accelerated algorithms for bilevel optimization. arXiv preprint arXiv:2102.03926, 2021.
  19. 19.K. Ji, J. Yang, and Y. Liang. Bilevel optimization: Convergence analysis and enhanced design. In International Conference on Machine Learning, pages 4882–4892. PMLR, 2021.
  20. 20.K. Ji, J. Yang, and Y. Liang. Theoretical convergence of multi-step model-agnostic meta-learning. Journal of Machine Learning Research (JMLR), 23:29–1, 2022.
  21. 21.P. Khanduri, S. Zeng, M. Hong, H.-T. Wai, Z. Wang, and Z. Yang. A near-optimal algorithm for stochastic bilevel optimization via double-momentum. arXiv preprint arXiv:2102.07367, 2021.
  22. 22.V. R. Konda and J. N. Tsitsiklis. Actor-critic algorithms. In Advances in neural information processing systems (NeurIPS), pages 1008–1014, 2000.
  23. 23.G. Kunapuli, K. P. Bennett, J. Hu, and J.-S. Pang. Classification model selection via bilevel programming. Optimization Methods & Software, 23(4):475–489, 2008.
  24. 24.Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
  25. 25.J. Li, B. Gu, and H. Huang. Improved bilevel model: Fast and optimal algorithm with theoretical guarantee. arXiv preprint arXiv:2009.00690, 2020.
  26. 26.J. Li, B. Gu, and H. Huang. A fully single loop algorithm for bilevel optimization without hessian inverse. arXiv preprint arXiv:2112.04660, 2021.
  27. 27.T. Lin, C. Jin, and M. Jordan. On gradient descent ascent for nonconvex-concave minimax problems. In International Conference on Machine Learning (ICML), pages 6083–6093. PMLR, 2020.
  28. 28.R. Liu, X. Liu, X. Yuan, S. Zeng, and J. Zhang. A value-function-based interior-point method for non-convex bi-level optimization. In International Conference on Machine Learning (ICML), 2021.
  29. 29.R. Liu, Y. Liu, S. Zeng, and J. Zhang. Towards gradient-based bilevel optimization with non-convex followers and beyond. Advances in Neural Information Processing Systems (NeurIPS), 34, 2021.
  30. 30.R. Liu, P. Mu, X. Yuan, S. Zeng, and J. Zhang. A generic first-order algorithmic framework for bi-level programming beyond lower-level singleton. In International Conference on Machine Learning (ICML), 2020.
  31. 31.D. Maclaurin, D. Duvenaud, and R. Adams. Gradient-based hyperparameter optimization through reversible learning. In International Conference on Machine Learning (ICML), pages 2113–2122, 2015.
  32. 32.G. M. Moore. Bilevel programming algorithms for machine learning model selection. Rensselaer Polytechnic Institute, 2010.
  33. 33.F. Pedregosa. Hyperparameter optimization with approximate gradient. In International Conference on Machine Learning (ICML), pages 737–746, 2016.
  34. 34.A. Rajeswaran, C. Finn, S. M. Kakade, and S. Levine. Meta-learning with implicit gradients. In Advances in Neural Information Processing Systems (NeurIPS), pages 113–124, 2019.
  35. 35.A. Shaban, C.-A. Cheng, N. Hatch, and B. Boots. Truncated back-propagation for bilevel optimization. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 1723–1732, 2019.
  36. 36.C. Shi, J. Lu, and G. Zhang. An extended kuhn–tucker approach for linear bilevel programming. Applied Mathematics and Computation, 162(1):51–63, 2005.
  37. 37.J. Snell, K. Swersky, and R. Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems (NIPS), 2017.
  38. 38.D. Sow, K. Ji, Z. Guan, and Y. Liang. A constrained optimization approach to bilevel optimization with multiple inner minima. arXiv preprint arXiv:2203.01123, 2022.
  39. 39.D. Sow, K. Ji, and Y. Liang. Es-based jacobian enables faster bilevel optimization. arXiv preprint arXiv:2110.07004, 2021.
  40. 40.J. Yang, K. Ji, and Y. Liang. Provably faster algorithms for bilevel optimization. Advances in Neural Information Processing Systems (NeurIPS), 34, 2021.
  41. 41.J. Zhang, P. Xiao, R. Sun, and Z. Luo. A single-loop smoothed gradient descent-ascent algorithm for nonconvex-concave min-max problems. Advances in Neural Information Processing Systems (NeurIPS), 33:7377–7389, 2020.
  42. 42.M. Zhang, S. W. Su, S. Pan, X. Chang, E. M. Abbasnejad, and R. Haffari. idarts: Differentiable architecture search with stochastic implicit gradients. In International Conference on Machine Learning (ICML), pages 12557–12566. PMLR, 2021.

Citation

MLA
Ji, K., et al. “Will Bilevel Optimizers Benefit from Loops”. Advances in Neural Information Processing Systems, vol. 35, 2022, pp. 3011–23, https://proceedings.neurips.cc/paper_files/paper/2022/file/1413947ef79a733e4b839d339e3dffa7-Paper-Conference.pdf.
APA
Ji, K., Liu, M., Liang, Y., & Ying, L. (2022). Will Bilevel Optimizers Benefit from Loops. Advances in Neural Information Processing Systems, 35, 3011–3023. https://proceedings.neurips.cc/paper_files/paper/2022/file/1413947ef79a733e4b839d339e3dffa7-Paper-Conference.pdf
Chicago
Ji, K., M. Liu, Y. Liang, and L. Ying. 2022. “Will Bilevel Optimizers Benefit from Loops”. Advances in Neural Information Processing Systems 35: 3011–23. https://proceedings.neurips.cc/paper_files/paper/2022/file/1413947ef79a733e4b839d339e3dffa7-Paper-Conference.pdf.
Harvard
Ji, K. et al. (2022) “Will Bilevel Optimizers Benefit from Loops”, Advances in Neural Information Processing Systems. Curran Associates, Inc., pp. 3011–3023. Available at: https://proceedings.neurips.cc/paper_files/paper/2022/file/1413947ef79a733e4b839d339e3dffa7-Paper-Conference.pdf.
Vancouver
1. Ji K, Liu M, Liang Y, Ying L (2022) Will Bilevel Optimizers Benefit from Loops. In: Advances in Neural Information Processing Systems. Curran Associates, Inc., pp 3011–3023

BibTeX

@inproceedings{ji2022will,
  title = {Will Bilevel Optimizers Benefit from Loops},
  author = {Ji, Kaiyi and Liu, Mingrui and Liang, Yingbin and Ying, Lei},
  year = {2022},
  booktitle = {Advances in Neural Information Processing Systems},
  publisher = {Curran Associates, Inc.},
  volume = {35},
  pages = {3011-3023},
  url = {https://proceedings.neurips.cc/paper_files/paper/2022/file/1413947ef79a733e4b839d339e3dffa7-Paper-Conference.pdf}
}
Metadata:DOI registry

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF
License: Authors