Truncated Back-propagation for Bilevel Optimization

Amirreza Shaban, Ching-An Cheng, Nathan Hatch, Byron Boots

Abstract: Bilevel optimization has been recently revisited for designing and analyzing algorithms in hyperparameter tuning and meta learning tasks. However, due to its nested structure, evaluating exact gradients (hypergradients) is computationally expensive in terms of both time and memory. This paper investigates Truncated Back-propagation (K-RMD) as a practical alternative. We provide theoretical guarantees showing that the gradient bias decays exponentially with the truncation length $K$ under local strong convexity. Empirical results across various tasks demonstrate that K-RMD achieves performance comparable to full back-propagation with significantly reduced computational overhead.

Introduction

Bilevel optimization is a mathematical framework where one optimization problem is nested within another. It serves as the backbone for modern techniques like hyperparameter tuning (e.g., learning rates, regularization constants) and meta-learning. In these scenarios, an outer loop optimizes hyperparameters based on the performance of an inner loop model.

The primary challenge lies in computing the "hypergradient"—the derivative of the outer objective with respect to hyperparameters. The standard approach involves unrolling the entire inner optimization path, which requires storing every intermediate state. For deep neural networks, this leads to prohibitive memory requirements.

Truncated Back-propagation (K-RMD)

To overcome these limitations, researchers often employ K-step Truncated Reverse-Mode Differentiation (K-RMD). Instead of back-propagating through the full inner trajectory of length $T$, K-RMD only considers the final $K$ steps ($K \ll T$). This reduces memory complexity from $O(MT)$ to $O(MK)$, where $M$ is the model size.

Theoretical Guarantees

The authors provide a rigorous analysis of the bias introduced by truncation. They prove that if the inner objective function is locally strongly convex, the gradient bias vanishes exponentially as $K$ increases. Specifically, the error is bounded by $O((1-\alpha)^K)$, where $\alpha$ relates to the condition number of the inner problem.

Figure 4: Theoretical bound vs. empirical error as a function of truncation length K. The error decays exponentially, confirming that a small K can provide a high-quality gradient estimate.

Furthermore, the paper identifies a "non-interference" condition. Under this condition, the truncated gradient remains a valid descent direction, allowing the optimizer to converge to an exact stationary point of the bilevel problem even with small $K$.

Empirical Results

The theory was validated across several tasks, including toy problems, MNIST label hypercleaning, and Omniglot meta-learning.

  • Efficiency: On the Omniglot benchmark, 1-RMD (using only one step of back-propagation) achieved 95.6% accuracy, nearly matching the 95.8% accuracy of full RMD. Crucially, 1-RMD was 5.5x faster per iteration.
  • Convergence: Experiments show that even with significant truncation, the norm of the hypergradient converges toward zero, indicating successful optimization.
Figure 6: Convergence of the hypergradient norm ||d_λ f|| for various truncation lengths K. Even small values of K allow the algorithm to reach a stationary point efficiently.

Conclusion

Truncated back-propagation is more than just a heuristic; it is a theoretically sound and computationally efficient method for bilevel optimization. By showing that the gradient bias decays exponentially, this work justifies the use of small truncation lengths, enabling the application of bilevel optimization to larger-scale machine learning problems that were previously computationally inaccessible.

Summary updated

BibTeX
@inproceedings{shaban2019truncated,
  author = {Amirreza Shaban and Ching-An Cheng and Nathan Hatch and Byron Boots},
  title = {{Truncated Back-propagation for Bilevel Optimization}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
  url = {https://openreview.net/forum?id=qbJIn0Kt11},
}
Figure