Abstract: This paper reviews gradient-based techniques to solve bilevel optimization problems. Bilevel optimization is a general way to frame the learning of systems that are implicitly defined through a quantity that they minimize. This characterization can be applied to neural networks, optimizers, algorithmic solvers and even physical systems, and allows for greater modeling flexibility compared to an explicit definition of such systems. Here we focus on gradient-based approaches that solve such problems. We distinguish them in two categories: those rooted in implicit differentiation, and those that leverage the equilibrium propagation theorem. We present the mathematical foundations that are behind such methods, introduce the gradient-estimation algorithms in detail and compare the competitive advantages of the different approaches.
Introduction
In modern deep learning, the dominant paradigm is the explicit computational graph. We define a sequence of operations, compute an output, and use backpropagation to update parameters. However, many complex systems—ranging from physical circuits and analog computers to meta-learning frameworks—are better described by their goals or equilibria rather than a fixed sequence of steps. These are "implicitly defined" systems.
In their synthesis of the field, Nicolas Zucchet and João Sacramento explore how to train these systems using bilevel optimization. By moving beyond standard backpropagation through time (BPTT), researchers can leverage mathematical frameworks that are more memory-efficient and better suited for non-traditional hardware.
The Bilevel Optimization Framework
Bilevel optimization involves two nested problems: an "inner" task and an "outer" task. Mathematically, we seek to minimize an outer loss $\mathcal{L}_{out}(\theta, \phi^*)$ with respect to parameters $\theta$, where the state $\phi^*$ is itself the solution to an inner optimization problem:
$$\phi^*(\theta) = \arg\min_\phi \mathcal{L}_{in}(\theta, \phi)$$
This structure is common in hyperparameter tuning (where the inner task is training a model and the outer task is minimizing validation error) and meta-learning. The core challenge is computing the gradient of the outer loss with respect to $\theta$, given that $\phi^*$ depends on $\theta$ through an optimization process.
Methodologies for Gradient Estimation
The review categorizes gradient-based approaches into two primary families: Implicit Differentiation and Equilibrium Propagation.
1. Implicit Differentiation (ID)
Implicit Differentiation relies on the Implicit Function Theorem (IFT). Instead of tracking the entire optimization trajectory of the inner problem, ID focuses on the optimality condition: at the equilibrium $\phi^*$, the gradient of the inner loss must be zero ($\nabla_\phi \mathcal{L}_{in} = 0$). By differentiating this condition, one can derive the relationship between $\theta$ and $\phi^*$.
Key algorithms in this category include Recurrent Backpropagation (RBP) and Conjugate Gradient (CG) methods. While mathematically elegant, ID typically requires the computation and inversion of a Hessian matrix. In practice, this is often handled via Hessian-vector products to maintain computational efficiency, but the method remains sensitive to the stability of the inner equilibrium.
2. Equilibrium Propagation (EP)
Equilibrium Propagation offers an alternative rooted in energy-based modeling. EP operates by "nudging" the inner objective with a small component of the outer objective. By observing how the system's state shifts in response to this nudge, one can estimate the outer gradient.
Zucchet and Sacramento demonstrate that EP is essentially a finite-difference approximation of the same gradient sought by ID. This framing allows EP to be used as a general-purpose bilevel optimizer, even outside its original context of neural networks.
Theoretical Insights and Comparisons
A significant contribution of this work is the mathematical bridge built between ID and EP. The authors show that the "influence vector" used in ID is equivalent to the derivative of the equilibrium state with respect to the nudging parameter in EP.
Efficiency and Robustness
Both methods offer "constant memory" scaling, as they do not require storing the intermediate states of the inner optimization—a major advantage over Backpropagation Through Time. However, they differ in their robustness and error bounds:
- Implicit Differentiation: Provides a more accurate gradient estimate with an error bound of $O(\delta + \delta')$, where $\delta$ is the error in the inner optimum and $\delta'$ is the error in the linear system solver. However, it can be brittle if the system has not perfectly converged.
- Equilibrium Propagation: Has a slightly higher error bound of $O(\sqrt{\delta + \delta'})$ but is notably more robust. It provides a usable gradient estimate even when the inner system is far from perfect convergence.
| Method | Efficiency | Robustness | Simplicity |
|---|---|---|---|
| First-order Approx | High | High | High |
| Recurrent Backprop | Medium | Medium | Low |
| Conjugate Gradients | High | Low | Low |
| Equilibrium Prop | Medium | Medium | Medium |
Practical Applications and Hardware Plausibility
These methods are particularly relevant for Deep Equilibrium Models (DEQs) and neuromorphic hardware. EP is especially promising for non-digital computers, such as analog circuits, because it avoids explicit Hessian calculations. Instead, it relies on the physical system's natural tendency to reach equilibrium, making it a candidate for real-time learning in specialized hardware.
Limitations and Future Directions
Despite their advantages, these methods face several hurdles:
- Convergence: Both assume the inner system reaches a stable equilibrium. Chaotic or oscillating systems remain outside the scope of these techniques.
- Convexity: Theoretical guarantees largely depend on the local strong convexity of the inner objective.
- Hyperparameter Sensitivity: EP requires careful tuning of the "nudging strength" ($\beta$). If $\beta$ is too large, the gradient is biased; if too small, it becomes lost in noise.
Conclusion
Bilevel optimization through implicit gradients provides a powerful alternative to standard backpropagation, particularly for systems defined by equilibrium states. While Implicit Differentiation offers high precision, Equilibrium Propagation provides a robust, hardware-friendly alternative. As machine learning moves toward more complex, implicitly defined architectures and specialized physical hardware, these techniques will be essential for efficient and scalable learning.
Summary updated