A Gradient Method for Multilevel Optimization

Ryo Sato, Mirai Tanaka, Akiko Takeda

Introduction

Many real-world scenarios involve a hierarchy of decision-makers where one entity's optimal choice depends on the optimal response of another. In mathematical optimization, this is formalized as Multilevel Optimization. While bilevel optimization (two levels) is well-studied and frequently applied to tasks like hyperparameter tuning, extending these methods to three or more levels ($n \geq 3$) is notoriously difficult.

The primary challenge of multilevel optimization lies in its nested constraints: solving the top level requires knowing the optimal solution to the second level, which in turn depends on the third, and so forth. Most existing approaches for $n \geq 3$ rely on metaheuristics lacking theoretical guarantees or require highly restrictive assumptions (like strict convexity or affine rules). This paper addresses this gap by introducing a general, gradient-based algorithm for $n$-level optimization that is mathematically sound and comes with solid theoretical convergence guarantees.

Methodology: Unrolling the Hierarchy

To tackle the nested complexity, the authors build upon an "unrolling" technique previously utilized in bilevel problems:

  1. Iterative Approximation: Solving each lower-level optimization problem perfectly within a loop is computationally infeasible. Instead, the authors replace each lower-level problem with a fixed number ($T$) of gradient descent update steps.
  2. Gradient Reformulation: By "unrolling" these $T$ steps, the entire multilevel hierarchy is transformed into a single, massive, yet differentiable function.
  3. Recursive Gradient Formula: The core technical contribution is a recursive formula that computes the gradient of the top-level objective with respect to the top-level variables. This formula accurately tracks how a change at the top level ripples down through all $n$ levels.
  4. Projected Gradient Method: With the gradient computed, a standard projected gradient method updates the variables. The authors prove that as the number of unrolled steps ($T$) approaches infinity, the solution asymptotically converges to the true multilevel optimum.

Key Insights: Trilevel Models for Robustness

A compelling application of this framework is a trilevel model designed for Hyperparameter Learning under Data Poisoning. This setup models an adversarial environment:

  • Level 1 (Leader): Learns the best hyperparameters ($\lambda$) to minimize validation error.
  • Level 2 (Attacker): Attempts to "poison" the training data to maximize the model's error.
  • Level 3 (Learner): Trains the model parameters ($\theta$) on the poisoned data.

The key insight here is stability over pure accuracy. While a standard bilevel model might achieve higher accuracy on clean data, the trilevel model proves significantly more stable. When noise or "poison" is introduced to the test data, the trilevel model's performance degrades much more slowly than its bilevel counterpart.

Experimental Results

The authors evaluated their method on several standard regression datasets (Diabetes, Red/White wine quality, Boston house-prices) and an artificial trilevel problem.

Convergence on Toy Problems: In controlled artificial trilevel problems, the algorithm demonstrated strong convergence properties. The objective values decreased linearly, and the decision variables converged exactly to the known global optimum $(0,0)^\top$.

Linear decrease of objective values for different inner-loop iterations

Interestingly, the authors found that the gradient method could still find the optimal solution even with very few inner-loop iterations (e.g., $T_2=1, T_3=1$). This suggests the method is surprisingly robust to approximation errors.

Convergence trajectories of decision variables to the optimal point

Superior Robustness in Practice: In the data poisoning experiments, the trilevel model consistently outperformed the bilevel model in noisy settings. For instance, on the Diabetes dataset with high noise ($\sigma = 0.08$), the Trilevel model achieved a Mean Squared Error (MSE) of 0.8601, compared to a much higher 1.0573 for the Bilevel model.

Limitations and Future Work

While a significant step forward, the method has limitations:

  • The Scalability Wall: The computational cost grows significantly with the number of levels $n$. The algorithm is "fixed-parameter tractable," making it practical for trilevel or quadlevel problems, but likely too expensive for a 10-level problem without further optimization.
  • Automatic Differentiation (AD): The current implementation relies on forward-mode logic. Developing a reverse-mode version (akin to backpropagation in deep learning) for multilevel structures could drastically speed up gradient computations.
  • Strict Assumptions: The theoretical proofs assume that the lower-level problems have unique optimal solutions (singletons). Relaxing this to handle problems with multiple optima remains an open challenge for future research.

Summary updated

BibTeX
@inproceedings{sato2021gradient,
  author = {Ryo Sato and Mirai Tanaka and Akiko Takeda},
  title = {{A Gradient Method for Multilevel Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=mC2Zwj21sD},
}
Figure