Many fast controllers on real robots are two optimizers stacked on top of each other. A slow outer optimizer tunes something, such as when a legged robot's feet touch the ground or how heavily the controller weighs obstacle clearance. A fast inner optimizer, model predictive control (MPC: re-solving a short-horizon trajectory problem at every control tick), turns that choice into motor commands. Under millisecond deadlines the inner solver never finishes. It takes one or a few steps per tick, warm-started from the previous tick, and carries its Lagrange multipliers (the per-constraint penalty weights a constrained solver adjusts on the fly) forward in time. The outer optimizer still needs a gradient through this unfinished inner solve. Standard theory supplies one only when the inner problem is strongly convex, meaning it has a single well-behaved optimum, and only at full convergence. Neither holds with non-convex obstacle constraints and truncated solves.
This note argues that two problems usually studied apart are the same problem. The first is the oscillation of Lagrange multipliers in constrained optimization. The second is the ill-posedness of outer-level gradients through a non-converged inner solver. If the per-tick update of the inner solver is treated as a map applied once per control tick, the outer gradient is defined by differentiating that map's fixed point. That requires the matrix $I - J$ to be well conditioned, where $J$ is the map's Jacobian. Plain multiplier ascent produces rotational dynamics with eigenvalues of $J$ near or outside the unit circle, which is exactly what makes multipliers oscillate. In that regime $I-J$ is nearly singular and the outer gradient blows up. Adding dual optimism (PI control on the multipliers), which is the augmented Lagrangian method in disguise, moves those eigenvalues to real values inside the unit circle. That single change both damps the oscillation and makes the gradient well-defined. The augmented Lagrangian also convexifies a non-convex inner problem locally. So the strong-convexity assumption can be replaced by the weaker second-order sufficiency condition plus a large enough penalty.
Core Claim
The core claim concerns the one-step-per-tick regime used by real-time iteration MPC. In that regime, a warm-started primal-dual solver with optimistic multiplier updates admits a fixed-point implicit gradient for the outer problem. This gradient is valid under local second-order sufficiency rather than lower-level strong convexity. Its conditioning is controlled by the same spectral quantity that governs multiplier oscillation. The resulting outer optimizer should match converged-solve gradients at real-time cost, and it should keep hard constraints enforced through the last control iterate.
The starting point is a theorem that holds in exactly the regime real-time control uses. Dual Optimistic Ascent (PI Control) is the Augmented Lagrangian Method in Disguise proves three things. With the optimism parameter equal to the penalty parameter, PI-controlled multiplier updates produce the same primal iterates as first-order ALM at every step for equality constraints. The two methods share their locally stable stationary points for inequality constraints. Optimism turns the imaginary eigenvalues of plain gradient descent-ascent into real, stable ones. The authors say the equivalence breaks once several inner primal steps are taken per dual update. Real-time iteration MPC, however, takes one step per tick, so it sits inside the regime where the theorem applies rather than outside it. That paper motivates and supplies our stabilizer. We add what it does not study: the consequence for differentiating the iteration with respect to outer parameters.
Write $z_k$ for the stacked trajectory and multipliers at tick $k$. Write $x$ for the outer parameters and $s_k$ for the measured robot state. The per-tick solver is $z_{k+1} = T_\omega(z_k; x, s_k)$, where $\omega$ is the optimism gain. When the state changes slowly, the solver tracks a quasi-fixed point $\bar z(x)$ of $T_\omega$. Its sensitivity is
$$ \frac{\partial \bar z}{\partial x} = \left(I - \frac{\partial T_\omega}{\partial z}\right)^{-1} \frac{\partial T_\omega}{\partial x}. $$
For $\omega = 0$ (plain descent-ascent), the eigenvalues of $\partial T/\partial z$ along constraint directions have modulus at least about one. This follows from the bilinear saddle structure analyzed in the PI/ALM paper. The inverse is therefore unbounded or wildly sensitive. For $\omega = c$, the map coincides locally with an ALM step. Under second-order sufficiency and large enough $c$, the augmented Lagrangian Hessian is positive definite on the relevant subspace, so the spectral radius falls below one. The inverse is then bounded by $1/(1-\rho)$, where $\rho$ is that spectral radius.
Research Program
The theoretical part has three pieces. The first is a local result for equality constraints. It shows that $\omega=c$ yields a contraction, and it bounds the error of the fixed-point gradient against the converged-solve gradient in terms of $\rho$ and the per-tick drift of $s_k$. The drift term enters because the iteration tracks a moving target, as in tracking analyses of warm-started solvers.
The second piece covers inequality constraints, where the equivalence proof only aligns stable points. Here we differentiate the map on its locally constant active set. We treat active-set switches as nonsmooth points, in the Goldstein-stationarity sense that A Fully First-Order Layer for Differentiable Optimization uses. Unlike that layer, we never need a converged solution to identify the active set. Its authors note that their method degrades when solutions are "blurry," and they assume strict convexity. Multipliers carried across ticks give a running active-set estimate.
The third piece states plainly what is lost. The guarantees are local. Globally, a non-convex inner problem can jump between basins, and at those jumps no gradient method is meaningful.
The engineering part builds a JAX implementation. Its inner solver is a one-step primal-dual MPC update with optimistic multipliers. The fixed-point gradient is computed by a few iterations of a linear solve against $I-J$, using vector-Jacobian products only. This keeps memory flat and avoids second derivatives of the full problem. The implementation exposes $\rho$ as a measured diagnostic.
Baselines
The naive reference is the outer optimizer from Bilevel Optimization for Real-Time Control with Application to Locomotion Gait Generation used as published. It differentiates through the inner quadratic program as if that program were solved, while actually running real-time iterations. It is also the strongest existing method on our main benchmark. It reports a rise in disturbance rejection from 9/15 to 13/15 test cases, average cost decreases of 2.32% to 6.44%, and roughly 90 Hz gait optimization when run every 5 MPC iterations. We will reproduce it in the same MuJoCo quadruped setup and swap in only the inner multiplier rule and the gradient formula. MPC horizon, tick rate, line search and cost weights stay identical, and every method gets the same budget for tuning the outer step size. Beating it means strictly more than 13/15 rejections, or equal rejections at lower cost, at no lower optimization frequency.
A second baseline is the soft-penalty approach of Differentiable Model Predictive Control on the GPU. It folds inequalities into smooth cost penalties, which avoids multipliers entirely. We run it with penalty weights tuned on the same budget. To beat it, we must match its outer cost while reducing peak constraint violation. No reported result was found on Lacuna for it on quadruped or obstacle tasks; its reported numbers concern drifting and speed over trajax.
The third baseline is truncated backpropagation through the last $K$ solver ticks, the unrolling approach that End-to-End Learning to Warm-Start for Real-Time Quadratic Optimization applies to Douglas-Rachford splitting. It gets equal wall-clock time.
The key ablation is a two-by-two grid: plain versus optimistic multipliers, crossed with "pretend converged" gradients versus fixed-point gradients. It isolates whether the gain comes from stabilization, from the gradient formula, or only from both together.
Why not just…?
Why not just run ALM in the inner solver and use the standard implicit gradient at the current iterate? This is the real threat. Since PI control equals ALM, the stabilizer itself is not new. What differs is the gradient: the standard implicit-function formula assumes the iterate satisfies optimality conditions, but after one real-time step it does not. The ablation cell "optimistic + pretend converged" is exactly this alternative. If it matches our fixed-point gradient in cosine similarity to converged reference gradients and in outer cost, then our contribution reduces to an analysis of why ALM works, and we will report it that way.
Why not just use soft penalties and drop multipliers? Penalties remove the oscillation by removing the dual variables, and DiffMPC concedes that it cannot enforce hard inequalities this way. Safety Gymnasium also documents large violations without adaptive constraint handling (Safety Gymnasium). Our comparison measures violation at matched cost. If tuned penalties already reach near-zero violation on our tasks, the hard-constraint argument weakens there.
Why not just unroll the solver and backpropagate through time? Unrolling needs no fixed-point assumption, but memory grows with $K$ and the gradient is biased toward short horizons. Under rotational multiplier dynamics, unrolled gradients also inherit the oscillation and grow with $K$. We will plot gradient norm against $K$ for both multiplier rules. If unrolling with optimism stays bounded and accurate at small $K$, it is a cheaper competitor worth recommending.
Proposed Experiments
The first check is diagnostic, on the 1D non-convex equality problem $\min \tfrac12 x^2$ s.t. $e^x=e$ from the PI/ALM paper. We wrap this problem with an outer parameter shifting the constraint level. We measure $\rho$, the condition number of $I-J$, and the fixed-point gradient error as functions of $\omega$. The prediction is a sharp transition: the gradient error should collapse once $\omega$ approaches $c$ and $\rho$ drops below one. If it does not, the core claim is wrong.
The main experiment is the quadruped gait bilevel benchmark under the same disturbance set. We report rejection count, average cost, optimization frequency, multiplier oscillation amplitude across ticks, and hypergradient cosine similarity against an offline converged-solve reference.
A third testbed is a simulated 2D free-flyer with non-convex circular obstacles, modeled on the granite-table setup in Deep Learning Warm Starts for Trajectory Optimization on the International Space Station, whose flight data we do not assume access to. There the outer problem tunes cost weights from demonstrations. We report last-iterate constraint violation, outer loss, and per-tick latency, and we include held-out obstacle layouts where that paper saw learned initializations fail.
The decisive result is the ablation grid. If the fixed-point gradient helps only with optimistic multipliers, and optimism helps the outer optimizer only through the fixed-point gradient, then the single-eigenvalue-problem thesis is supported.
References
- Dual Optimistic Ascent (PI Control) is the Augmented Lagrangian Method in Disguise
- A Fully First-Order Layer for Differentiable Optimization
- Bilevel Optimization for Real-Time Control with Application to Locomotion Gait Generation
- Differentiable Model Predictive Control on the GPU
- End-to-End Learning to Warm-Start for Real-Time Quadratic Optimization
- Safety Gymnasium: A Unified Safe Reinforcement Learning Benchmark
- Deep Learning Warm Starts for Trajectory Optimization on the International Space Station