L4DC 2026 Oral presentation

Learning to Solve Constrained Bilevel Control Co-Design Problems

1 Pacific Northwest National Laboratory   2 University of Virginia   3 Johns Hopkins University

Proceedings of Machine Learning Research, Volume 331, pages 222–241

Design with the controller in the loop

A system’s best design depends on how it will be controlled. This work learns design proposals across problem scenarios, then refines them through differentiable optimal control and constraint correction.

The result is an approximate design-and-control solution that retains the interaction between physical design, operating performance, and their shared constraints.

Problem parameters initialize a design through a neural network. Each correction solves the lower-level control problem, computes the coupling-violation gradient, updates the design, and projects onto its design constraints. A final control solve produces the output pair; the soft loss updates network weights only during training.
Open diagram

Illustrative QP and coupling correction. Animation is optional.

An explanatory redraw of Algorithm 1, adapted from the existing SOLARIS graphical abstract. The lower-level optimization is solved inside the correction loop and again for the final design. The loss and weight update belong to offline training. The dashed return updates the initializer’s weights during training only. The animated QP, gradient field and projection use one dimensionless explanatory example; they are not benchmark data or the authors’ solver trace. Arrows show the negative penalty gradient; the moving design takes a discrete gradient step before projection. Scroll horizontally on small screens or open the full diagram.
SOLARIS Laboratory Pacific Northwest National Laboratory University of Virginia Johns Hopkins Whiting School of Engineering

Research summary

Learning an outer decision through an inner optimization

Control co-design joins two decisions: choose a system’s physical design, then optimize its operation. A design must also permit the controlled system to meet its operating requirements. These coupling constraints connect the design and control variables, making the design problem more demanding than optimizing either part independently.

The proposed learning-to-optimize (L2O) framework combines a neural design initializer with differentiable optimization and projected gradient corrections. It trains directly on design objectives and constraint violations, without requiring optimal design labels. The paper evaluates the approach on small bilevel quadratic programs and two simulated control co-design tasks.

A structured predictor

Connect learned designs to a differentiable lower-level optimizer, with a projection for design-only constraints.

Coupling-aware correction

Differentiate through the control solution to reduce violations that depend on both levels.

Parametric co-design tests

Evaluate solution quality, residual violations, and computation time across held-out problem instances.

Summary of arXiv v2, Sections 1–5; this is a paraphrase, not the paper’s abstract.

Problem

Three conditions, two coupled levels

For scenario parameters \(\mathbf p\), the upper level selects a design \(\mathbf y\). Its objective depends on a lower-level response \(\mathbf z\), which must itself solve an optimization problem.

\[\begin{aligned} \min_{\mathbf y}\;&\mathcal L_{\mathbf p}(\mathbf y,\mathbf z)\\ \text{subject to }&\mathbf y\in\mathcal C_{\mathbf p},\qquad \mathbf U_{\mathbf p}(\mathbf y,\mathbf z)\leq\mathbf 0,\\ &\mathbf z\in\mathcal O_{\mathbf p}(\mathbf y) =\underset{\mathbf z\in\mathcal S_{\mathbf p}(\mathbf y)}{\arg\min}\;l_{\mathbf p}(\mathbf y,\mathbf z). \end{aligned}\]

Design feasibility

\(\mathbf y\in\mathcal C_{\mathbf p}\) restricts the physical design, such as nonnegative actuator coefficients.

Control response

\(\mathbf z\in\mathcal O_{\mathbf p}(\mathbf y)\) ties operation to the lower-level optimization for that design.

Coupling feasibility

\(\mathbf U_{\mathbf p}(\mathbf y,\mathbf z)\leq\mathbf0\) requires the design and its controlled response to work together.

Paper, Section 3, Equations (1)–(2). The method learns over a distribution of parameterized problems.

Method

Predict, solve, correct, and project

  1. Initialize the design. A neural network maps scenario parameters to \(\mathbf y_0=\mathcal N_\theta(\mathbf p)\).
  2. Solve the lower-level problem. A differentiable optimizer computes the response \(\mathbf z=\mathcal O_{\mathbf p}(\mathbf y)\) and its sensitivity to the design.
  3. Correct coupling violations. Differentiate the squared violation through that response and take a gradient step in the design variables.
  4. Project onto design constraints. Apply \(\Pi_{\mathcal C_{\mathbf p}}\), then repeat the lower-level solve and correction for the next design.
  5. Evaluate the final pair. After the corrections, solve the lower-level problem once more for the final design. During training, backpropagate the soft loss through the composed computation to update \(\theta\).
\[\begin{aligned} \nu(\mathbf y)&=\operatorname{ReLU}\!\left(\mathbf U_{\mathbf p}\big(\mathbf y,\mathcal O_{\mathbf p}(\mathbf y)\big)\right),\\ \mathbf y_{k+1}&=\Pi_{\mathcal C_{\mathbf p}}\!\left(\mathbf y_k-\gamma\nabla_{\mathbf y}\|\nu(\mathbf y_k)\|_2^2\right). \end{aligned}\]

The gradient accounts for how changing the design changes the optimized control response. Projection enforces the design set \(\mathcal C_{\mathbf p}\); it does not by itself enforce the coupling constraints.

Offline training

Minimize design cost together with a soft coupling penalty, differentiating through the correction steps and optimization layers.

\[\mathcal L^{\mathrm{soft}}_{\mathbf p}=\mathcal L_{\mathbf p}(\hat{\mathbf y},\hat{\mathbf z})+\lambda\|\nu(\hat{\mathbf y})\|_2^2.\]

Inference on a new scenario

Keep the trained weights fixed, predict a design, and execute the lower-level solves and corrections. Additional correction steps may be used at test time. Inference therefore includes numerical optimization.

When a candidate design makes the original control problem infeasible

The paper moves selected operating requirements into the upper-level coupling conditions and relaxes them in the lower-level problem. In the two-tank task, the lower objective penalizes terminal tracking error; in the building task, it penalizes comfort-bound slacks. Corrections then target the terminal error or the zero-slack condition.

This preserves a lower-level computation for candidate designs, but a finite penalty and a finite number of corrections do not establish exact satisfaction of the original operating requirements.

Paper, Sections 4.1–4.3, Equations (4)–(10), Algorithm 1, and Appendices D–E.

Results

Solution quality and residuals, reported together

The paper tests both approximation quality and coupling-constraint violation. The quadratic-program benchmarks have certified reference optima. The co-design benchmarks compare against a particle swarm optimization (PSO) heuristic; their global optima are unknown.

Bilevel quadratic programs

Three small problem sizes vary the upper-level linear objective coefficients. Each test set contains 1,000 instances. The reference is a YALMIP mixed-integer reformulation using lower-level Karush–Kuhn–Tucker (KKT) conditions and branch-and-bound.

Original Figure 2: three panels for 3 by 2, 6 by 4, and 9 by 6 bilevel quadratic programs. Training curves show the mean and standard deviation of relative optimality gap and coupling residual over the test set.
Original Figure 2. Relative optimality gap and coupling violation during training, for the 3 × 2, 6 × 4, and 9 × 6 problems from left to right. The curves and shaded bands show test-set means and standard deviations. Vertical axes are logarithmic; nonpositive portions of the mean ± standard deviation bands are not displayed. Original axes, scales, and legends are retained.
Upper × lower variablesRelative objective gapCoupling residual \(\|\nu\|_2\)Learned time (s)YALMIP time (s)
3 × 20.00092 ± 0.0020.0059 ± 0.010.0640.12
6 × 40.0020 ± 0.0050.00028 ± 0.00090.0641.2
9 × 60.011 ± 0.010.000040 ± 0.00070.06710.3
Table 1, arXiv v2. Values are test-set means; ± denotes standard deviation across test instances. The relative gap is \(\left|\big(\mathcal L(\hat{\mathbf y},\hat{\mathbf z})-\mathcal L(\mathbf y^\star,\mathbf z^\star)\big)/\mathcal L(\mathbf y^\star,\mathbf z^\star)\right|\). Residuals are nonzero. View source table.
Quadratic-program setup and training

The upper and lower objectives are convex quadratics, with linear constraints at both levels. The prediction model is a five-layer network with a cvxpylayers lower solve. Appendix C reports 10 correction steps during training and 20 at test time. Figure 2 tracks 75 training epochs.

The reported model is selected for lowest loss across the stated hyperparameter grid. The selected Adam learning rate is 10−3, correction step size is 10−4, and penalty weight is 100. The study does not provide certified comparisons beyond these small problem sizes.

Two simulated control co-design tasks

Nonlinear dynamics

Two-tank system

Choose two inlet/outlet coefficients while an optimal control problem determines pump modulation and valve opening. The coupling condition requires reaching the prescribed terminal water levels.

Two states · Two controls · 20 Euler steps over 10 seconds · Nonconvex lower-level problem

Building thermal dynamics

HVAC actuator design

Choose an actuator matrix for a two-zone building while optimizing heat inputs. Coupling conditions require indoor temperatures to remain within time-varying comfort bounds.

Eight states · Two controls · 30 steps · Linear thermal dynamics for a fixed design

Original Figure 3, two-tank panels: mean design objective and mean coupling residual across training epochs, compared with the PSO baseline.
Original Figure 3, left: two-tank co-design. Test-set design objective and coupling residual during training, alongside the PSO baseline.
Original Figure 3, HVAC panels: mean design objective and mean coupling residual across training epochs, compared with the PSO baseline. The residual axis uses a logarithmic scale.
Original Figure 3, right: HVAC co-design. The same test-set metrics for the building task; note the logarithmic residual axis.

These are the authors’ original experiment plots. Their “Alg. 2” legend is retained, although the method is numbered Algorithm 1 in arXiv v2.

SystemMethodDesign objectiveCoupling residual \(\|\nu\|_2\)Time (s)
Two-tankLearned0.1220.014 ± 0.020.027
Two-tankPSO0.1400.016 ± 0.021268.7
HVACLearned1.230.030 ± 0.050.0770
HVACPSO1.460.030 ± 0.021055.9
Table 2, arXiv v2. Test-set means over 1,000 instances for each task; ± denotes the standard deviation of the coupling residual across instances. Design objectives are the paper’s cost functions, not monetary amounts. View source table.

What these comparisons show. In both co-design tests, the selected learned model has a lower mean design objective than the configured PSO baseline, with comparable mean coupling residuals. The nonzero residuals and absence of certified co-design optima matter when interpreting this result.

Times are reproduced as reported, excluding offline learning. The primary paper does not specify timing hardware or batch size. These measurements do not establish deployment latency on other hardware or a real-time control guarantee.

Experimental conditions, baseline, and model selection

Two-tank

The initial state is zero. Terminal targets are sampled from [0, 1]2 with \(p_1<p_2\); design coefficients lie between 0 and 1/3. An eight-layer network uses a differentiable MPC solver whose sensitivities come from the final convex subproblem of a sequential quadratic procedure. The lower problem is nonconvex, so global optimality is not certified. The terminal-error penalty weight is 100.

HVAC

The actuator matrix \(\mathbf Y\in\mathbb R^{8\times2}\) is nonnegative, with equal weights in the design objective. Comfort lower bounds follow a beta random walk; upper bounds are lower bounds plus 2.0. The study uses a fixed disturbance pattern from NeuroMANCER and a six-layer ReLU network with a cvxpylayers lower solver.

Training and selection

Each co-design task uses 10,000 training, 1,000 validation, and 1,000 test instances. Appendices D–E report five correction steps during training and ten at test time. Reported models minimize mean design objective among runs whose mean coupling residual is no greater than PSO’s, after 10 epochs for two-tank and 25 for HVAC. The tables are not multi-seed averages.

PSO baseline

The pyswarms implementation uses 128 particles and 200 iterations, cognitive and social coefficients of 0.5, and inertia 0.9. It handles simple design bounds directly and uses a coupling penalty of 100 for two-tank and 5 for HVAC. Both methods use the same lower-level problem reformulations.

Paper, Sections 5.1–5.2, Tables 1–2, Figures 2–3, and Appendices A–E. The selected scientific version is arXiv v2 (3 December 2025).

Scope

Scope and open directions

The architecture is intended for continuous bilevel problems with a useful differentiable lower-level response. The paper motivates uniqueness and differentiability as applicability conditions, while acknowledging practical use of almost-everywhere or approximate derivatives.

The design projection, lower-level solve, and coupling correction serve different purposes. A soft penalty and gradient corrections do not guarantee zero coupling violation. The study reports approximate solutions over its tested parameter distributions; it does not establish universal feasibility, global co-design optimality, or performance outside those distributions.

The experiments are numerical studies. Integer-valued designs and lower-level objectives that do not supply usable gradients are identified as directions for future work.

Resources

Read, inspect, and build on the work

Source versions and reporting notes

This page’s equations and reported results follow arXiv:2507.09050v2. Publication status and the citation follow the official 2026 PMLR record. The earlier arXiv v1 used a different title.

Raw objective values are shown because the abstract’s percentage comparison is not consistent with a percentage reduction using PSO as the denominator. The two-tank PSO runtime follows Table 2 (1268.7 seconds); Section 5.2 prints 1286.7 seconds. Neither conflict is silently reconciled here.

The inspected, untagged code snapshot differs from the manuscript in sampling, objectives, correction counts, and the default number of HVAC zones. The results shown here are transcribed from v2, not reproduced from that snapshot. The website’s source map and code audit preserve the details.

Citation

Use the official proceedings citation below. PMLR records the fourth author as Draguna L Vrabie; the arXiv byline uses Draguna Vrabie.

@InProceedings{pmlr-v331-kotary26a,
  title = {Learning to Solve Constrained Bilevel Control Co-Design Problems},
  author = {Kotary, James and Sharma, Himanshu and King, Ethan
            and Vrabie, Draguna L and Fioretto, Ferdinando and Drgona, Jan},
  booktitle = {Proceedings of The 8th Annual Learning for Dynamics
               and Control Conference},
  pages = {222--241},
  year = {2026},
  editor = {Sukhatme, Gaurav and Lindemann, Lars and Tu, Stephen
            and Wierman, Adam and Atanasov, Nikolay},
  volume = {331},
  series = {Proceedings of Machine Learning Research},
  month = {17--19 Jun},
  publisher = {PMLR},
  pdf = {https://raw.githubusercontent.com/mlresearch/v331/main/assets/kotary26a/kotary26a.pdf},
  url = {https://proceedings.mlr.press/v331/kotary26a.html}
}