Abstract
Bilevel optimization problems, where upper-level design decisions are coupled with lower-level control strategies, are notoriously difficult to solve efficiently. This paper introduces a self-supervised "Learning to Optimize" (L2O) framework that utilizes differentiable optimization layers and a novel gradient-based correction routine. The proposed method achieves solution speeds up to 10,000x faster than traditional metaheuristic baselines while often finding superior design solutions in complex engineering domains such as HVAC and hydroelectric system co-design.
Introduction
Bilevel optimization represents a "problem within a problem," common in engineering tasks like drone design where physical parameters (battery size, motor power) must be optimized alongside flight control strategies. A significant challenge in these problems is the presence of coupling constraints—rules that simultaneously involve both design and control variables. These problems are typically NP-hard and computationally expensive for traditional solvers.
This research addresses the need for real-time solutions in engineering applications by proposing a neural network architecture capable of mapping problem parameters directly to optimal, feasible solutions.
Methodology
The core of the proposed framework is a self-supervised neural network $\mathcal{N}_\theta$ that predicts optimal solutions. To ensure feasibility and optimality in a bilevel context, the architecture incorporates three key elements:
- Differentiable Lower-Level Solver: By employing implicit differentiation, the model can backpropagate through the lower-level optimization, allowing the network to understand how design changes influence the optimal control response.
- Differentiable Constraint Correction: If a prediction violates coupling constraints, the framework applies a "projection routine." This involves taking gradient steps specifically to minimize constraint violation, nudging the solution into the feasible region during the forward pass.
- Soft Penalty Training: The training loss includes penalties for constraint violations, effectively "warm-starting" the network to produce near-feasible initial predictions.
A practical innovation introduced is the "lifting" of constraints. By moving problematic lower-level constraints to the upper level, the authors ensure the lower-level solver remains robust while the upper-level correction handles global feasibility.
Experimental Setup
The method was evaluated across three benchmarks of increasing complexity:
- Bilevel Quadratic Programs (BQP): Synthetic problems used to measure optimality gaps against ground-truth solvers.
- Nonlinear Two-Tank System: A nonconvex co-design task for a pumped-storage hydroelectric system.
- Building HVAC System: A large-scale thermal control problem involving 2 zones and 8 state variables over a 30-step horizon.
Results and Discussion
The L2O framework demonstrated significant advantages in both speed and solution quality. In BQP benchmarks, the model was 100x faster than Mixed-Integer Programming (MIP) solvers with a negligible $10^{-2}$ optimality gap.
In the more complex co-design tasks (Two-Tank and HVAC), the learned model outperformed Particle Swarm Optimization (PSO) baselines, achieving 15–19% lower design costs. Most notably, the inference speed was approximately 10,000x faster than PSO, reducing solution times from over 20 minutes to mere milliseconds. These results suggest that the internal correction mechanism is vital for enforcing the complex relationships between optimization levels, which previous L2O methods often ignored.
Conclusion
This work demonstrates that differentiable optimization and gradient-based correction can effectively solve coupled bilevel problems at unprecedented speeds. Future research will focus on extending the framework to handle discrete variables in mixed-integer problems and exploring surrogate gradients to accommodate non-smooth or non-differentiable lower-level objectives.
Summary updated