Gradient-Based Model Predictive Control
- Gradient-based MPC is a receding-horizon control approach that uses derivatives of finite-horizon objectives to update decision variables.
- It employs differentiable models and first-order solvers to enhance optimization speed and performance in complex, nonconvex environments.
- The method integrates uncertainty modeling and safety constraints, addressing challenges like non-smooth dynamics and initialization sensitivity.
Searching arXiv for recent and foundational papers on gradient-based MPC to ground the article in the literature. Gradient-based model predictive control denotes a family of receding-horizon methods in which derivatives of a finite-horizon objective, a constraint residual, or a posterior density are used to update the decision variables of the MPC problem. Across the literature, those decision variables include open-loop action sequences, lifted state-input trajectories, dual multipliers, and particle representations of control distributions. The common operational pattern is to optimize over a finite horizon, execute only the first input, discard the rest, and replan at the next step (Bharadhwaj et al., 2020, Spieler et al., 14 May 2026). In that sense, gradient-based MPC is not a single algorithmic template but a broad computational regime spanning shooting-based planners, primal-dual first-order solvers, direct-transcription nonlinear MPC, and learning-based controllers that exploit differentiable predictive models (Salzmann et al., 2022, Li et al., 2023).
1. Canonical problem statements
In the most classical learned-model formulation, planning is posed as optimization of an open-loop action sequence under differentiable dynamics and reward models,
followed by receding-horizon execution of only the first action (Bharadhwaj et al., 2020). In goal-conditioned visual control, the objective may instead be terminal and task-agnostic, such as minimizing a latent distance between predicted terminal object slots and goal slots,
with the action sequence updated directly by gradient descent through the latent rollout (Spieler et al., 14 May 2026). In safe optimal control, hard state constraints can be relaxed into stage penalties, for example by adding
to the horizon cost, and then re-imposing hard safety with a subsequent control-barrier-function filter (Singh et al., 18 Jul 2025).
These variants differ in objective semantics, but they share the same structural feature: gradients are taken with respect to finite-horizon decision variables rather than a stationary policy alone. In the surveyed literature, gradient information is exploited in at least four recurrent ways.
| Family | Core decision object | Representative papers |
|---|---|---|
| Direct shooting through differentiable models | Open-loop action sequence | (Bharadhwaj et al., 2020, Spieler et al., 14 May 2026, Salzmann et al., 2022) |
| First-order MPC solvers | Primal, dual, or condensed QP variables | (Kempf et al., 2020, Yu et al., 2020, Wang et al., 2021) |
| Learning-based uncertainty-aware MPC | Mean/variance trajectories or posterior particles | (Cao et al., 2016, Nghiem, 2018, Lambert et al., 2020, Wang et al., 2024) |
| Safety-augmented MPC | Soft-constrained nominal plan plus safety filter | (Singh et al., 18 Jul 2025, Li et al., 2023) |
A useful interpretive distinction is between gradient-based MPC as an online optimizer and gradient-informed methods that only support MPC indirectly. The former use gradients in the receding-horizon loop itself; the latter may use gradient information offline, for instance to learn a surrogate controller that approximates an MPC law (Winqvist et al., 2021).
2. Direct trajectory optimization through differentiable models
The most literal form of gradient-based MPC differentiates the horizon objective through the model rollout and updates the control sequence directly. In the learned-dynamics setting studied by Bharadhwaj, Xie, and Shkurti, pure gradient planning is attractive because it receives a -dimensional feedback signal—the gradient of return with respect to actions—whereas CEM receives only a scalar return per sampled sequence. The same paper also emphasizes the failure modes of pure gradient shooting: nonconvexity, vanishing or exploding gradients over long horizons, sensitivity to bad initialization, and difficulty under non-smooth contact (Bharadhwaj et al., 2020).
Two strands of subsequent work make that template more practically effective. One is hybridization with population search. The Grad+CEM planner samples candidate sequences from a Gaussian distribution, performs one gradient-refinement step per sample, and refits the sampling distribution to the refined elites. Empirically, it converges faster than CEM in high-dimensional settings and avoids some local minima that trap pure gradient methods (Bharadhwaj et al., 2020). The other is to redesign the latent planning space itself. Slot-MPC performs gradient-based MPC in a differentiable object-centric latent state built from temporally aligned slots rather than pixels or large patch embeddings. The planner encodes the current image and a goal image into slots, rolls the learned cOCVP dynamics forward over horizon , aligns predicted and goal slots with Hungarian matching, and updates actions by
In the reported offline robotic manipulation setting with limited state-action coverage, full Slot-MPC attains success rates $0.64$, $0.52$, $0.42$, and $0.22$ on Button Press, Lever Pull, Stack, and Square, whereas replacing gradient-based MPC with MPPI yields 0, 1, 2, and 3. The same study reports planning times of 4 s per step on Meta-World and 5 s on robosuite, compared with 6 s and 7 s for Slot-MPC with MPPI, and roughly 8–9 s for DINO-WM (Spieler et al., 14 May 2026).
A third line addresses online nonlinear MPC with learned residual dynamics but conventional SQP/RTI structure. Real-time Neural-MPC does not expose a large neural network directly to the MPC solver. Instead, it computes batched local linear or quadratic approximations of the learned residual model outside the solver and passes only local coefficients to the RTI-based QP preparation stage. This preserves the structure expected by acados/CasADi-style embedded solvers while allowing neural dynamics models of over 0 times larger parametric capacity in a 1 Hz real-time window on embedded hardware, with up to 2 reduction in positional tracking error relative to state-of-the-art MPC approaches without neural-network dynamics (Salzmann et al., 2022).
Across these examples, the role of gradients is not merely to replace sampling. They reconfigure the optimizer around local model information, and their utility depends strongly on initialization, smoothness, and the geometry of the latent or state representation (Bharadhwaj et al., 2020, Spieler et al., 14 May 2026).
3. First-order solver architectures for structured MPC programs
A second major meaning of gradient-based MPC concerns solver design for finite-horizon convex programs. Here the MPC problem is not optimized by generic NLP software but by tailored first-order methods that exploit condensed, dual, or saddle-point structure.
For linear MPC with input amplitude and slew-rate constraints, the fast gradient method can be applied directly to the condensed QP
3
provided the nontrivial projection onto the joint amplitude-plus-rate constraint set is handled by Dykstra’s algorithm. The proposed FGM+Dykstra method avoids the augmented-variable formulation used by ADMM, greatly reduces computation time, and approximately halves the memory usage for large horizons (Kempf et al., 2020).
For finite-horizon convex MPC with linear equality constraints and general convex state/input constraints, the proportional-integral projected gradient method updates
4
Its distinctive feature is that each iteration requires only one projection onto the joint state-input constraint set 5. The paper proves 6 convergence for both distance to optimum and constraint violation in the convex case, and 7 for distance to optimum together with 8 for constraint violation in the strongly convex case, along weighted averaged iterates (Yu et al., 2020).
At the level of dual QP solvers for condensed linear MPC, accelerated proximal-gradient methods are also prominent. One proposed variant modifies the usual FISTA momentum sequence by selecting parameters from the higher-order polynomial recurrence
9
with the stated goal of improving the convergence-rate bound from 0 to 1. On the tested random small MPC instances, it reduces iteration counts relative to FISTA and outperforms MOSEK and ECOS in the small-size regime. The same paper, however, explicitly notes that the claim of arbitrary-order acceleration is unusual and should be treated cautiously relative to standard first-order complexity theory (Wang et al., 2021).
For continuous-time path-constrained linear MPC, another route is to convert the problem into a conic program. Using differential flatness, polynomial parameterization, and Markov–Lukács/SOS conditions, continuous-time path constraints on the entire interval are transformed into an SDP with many small PSD blocks, which is then solved by a parallelizable PDHG scheme. The paper reports GPU iteration times from about 2 ms at 3 to 4 ms at 5, and argues that the method guarantees strict continuous-time constraint satisfaction that a standard discretized MPC controller may violate between sampling instants (Li et al., 2023).
A related primal-dual viewpoint appears in sampled-data PDG-based instant MPC. There, the optimizer dynamics are themselves the controller, and the contribution is not better asymptotic optimization but preservation of closed-loop stability after discretization. The paper derives a sampled-data stability certificate of the form
6
for the discrete-time closed loop and reports 7 ms average computation time per step in an engine air-path example, with the abstract stating execution in only 8s on a standard laptop (Moriyasu et al., 2024).
4. Learning-based uncertainty, latent geometry, and posterior methods
In learning-based MPC, gradients are often mediated by uncertainty propagation or by the representation chosen for the predictive model. Gaussian-process MPC is a canonical case. One GP-MPC line models unknown nonlinear discrete-time dynamics with a GP over state increments, propagates mean and variance over the horizon by moment matching, and then derives two tractable controllers. GPMPC1 relaxes the stochastic MPC problem to a deterministic nonlinear MPC based on a locally linearized GP model and solves it by SQP; GPMPC2 augments the state with uncertainty information and obtains a convex QP approximation solved efficiently by an active-set method. On the reported tracking problems, both controllers are effective, but GPMPC2 is much more efficient computationally, with about 9 s versus 0 s total for one benchmark and about 1 s versus 2 s for another (Cao et al., 2016).
A later development, linGP-SCP, replaces direct optimization over exact GP mean and variance with a local model obtained by linearizing the latent GP function itself. The resulting linGP has an affine predictive mean and a convex quadratic predictive variance, making the local MPC subproblem convex under stated assumptions. Its median solve time rises from 3 s to 4 s as model size grows from 5 to 6, while Ipopt rises from 7 s to 8 s and Knitro from 9 s to 0 s; at 1, Ipopt is about 2 slower and Knitro about 3 slower than linGP-SCP (Nghiem, 2018).
The GP-MPC tutorial literature systematizes the underlying approximation machinery. A nominal discrete-time model is corrected by a GP residual,
4
and first-order Taylor approximations yield differentiable recursions for mean and covariance propagation. In the mean-only formulation, local linearization of both the nominal model and the GP mean reduces the MPC step to an explicit quadratic update
5
while uncertainty-aware variants retain smooth deterministic tightened constraints derived from propagated GP variances (Wang et al., 2024).
Another probabilistic interpretation of gradient-based MPC appears in Stein Variational MPC. There, planning is formulated as posterior inference over control parameters or open-loop control sequences, and Stein variational gradient descent moves particles according to
6
where the update combines the gradient of the log posterior with a kernel-induced repulsive term. The paper shows that MPPI and CEM arise as single-particle special cases under particular likelihood choices, and reports 7 success on a 4x4 stochastic obstacle grid for SV-MPC with 32 particles, versus 8 for both MPPI and CEM under equal total sample budgets (Lambert et al., 2020).
Taken together, these works indicate that in learning-based MPC the effectiveness of gradients is inseparable from how uncertainty, multimodality, and latent geometry are represented. Gradient access alone does not fix poor curvature or poor semantics in the planning space (Nghiem, 2018, Spieler et al., 14 May 2026).
5. Safety, constraints, and practical implementation
Safety and constraint handling expose a central tension in gradient-based MPC: gradients scale well, but hard state constraints, non-smooth contact, and feasibility restoration can make purely gradient-driven optimization brittle. One response is two-stage control. A recent safe-controller synthesis framework first computes a nominal control by gradient-based MPC with relaxed state-safety penalties, then solves a CBF-QP
9
to enforce hard safety with minimal deviation from the nominal action. On the reported unicycle problem, GMPC-CBF achieves cost $0.64$0, safety rate $0.64$1, and computation time $0.64$2 s, compared with MPPI-CBF cost $0.64$3, safety rate $0.64$4, and time $0.64$5 s. On the reported 6D planar quadrotor problem, GMPC-CBF achieves cost $0.64$6, safety rate $0.64$7, and computation time $0.64$8 s, compared with MPPI-CBF cost $0.64$9, safety rate $0.52$0, and time $0.52$1 s (Singh et al., 18 Jul 2025).
A more classical constraint-centric route is direct transcription. LGR-MPC formulates each receding-horizon optimal control problem as a nonlinear program using a Legendre–Gauss–Radau pseudospectral discretization. States and controls are collocated, defect constraints are imposed through the differentiation matrix, path constraints are enforced directly, and the resulting NLP is solved by SciPy. The package emphasizes warm-starting from the previous solution, scaling all state and control variables to $0.52$2, and simulating the dynamics over the applied interval before advancing the horizon. Its contribution is not a new gradient algorithm per se, but an accessible derivative-based direct-transcription MPC workflow (Bayat et al., 2023).
Implementation practice across the literature converges on a small set of recurring devices. Warm starts are essential: policy-prior initialization in Slot-MPC, shifted-horizon priors in SV-MPC, local linearization around previous RTI iterates in Neural-MPC, and horizon-shift reuse in conic or direct-transcription methods all reduce sensitivity to initialization (Spieler et al., 14 May 2026, Lambert et al., 2020, Salzmann et al., 2022). Variable scaling, box projection, and trust-region management are equally prominent. In the GP and linGP literature, trust regions and exact penalties prevent local convexification from wandering too far from the nominal trajectory; in projected-gradient and primal-dual methods, cheap projection is part of the algorithmic design itself (Nghiem, 2018, Kempf et al., 2020, Yu et al., 2020).
6. Distinctions, limitations, and unresolved issues
Several recurring misconceptions are explicitly corrected in the literature. First, gradient-based MPC is not synonymous with any use of derivatives around MPC. Learning an approximate MPC law from controller Jacobians, as in neural imitation of explicit MPC with gradient data, is an offline controller-identification problem rather than online gradient-based MPC optimization (Winqvist et al., 2021). Second, differentiability alone is not sufficient for good planning. Slot-MPC argues that planner performance depends not only on whether the model is differentiable, but on the geometry of the latent state space; the same study attributes the weakness of large patch-based latents partly to optimization burden and poor semantic alignment (Spieler et al., 14 May 2026).
Third, pure gradient methods do not dominate sampling methods uniformly. The classic counterarguments remain local minima, exploding or vanishing gradients over long horizons, sensitivity to initialization, and non-smooth or discontinuous objectives such as contact-rich costs (Bharadhwaj et al., 2020). Slot-MPC softens this by showing that in an offline regime with limited state-action coverage, gradient-based MPC may actually outperform sampling-based MPC because it stays closer to the policy-prior distribution and avoids evaluating many far-out-of-distribution trajectories (Spieler et al., 14 May 2026). By contrast, Stein Variational MPC argues that particle-based gradient updates are preferable when multimodality itself is the core difficulty (Lambert et al., 2020).
Fourth, solver-level convergence claims should be interpreted with care. PI-PG gives ergodic guarantees along averaged iterates rather than exact-feasibility guarantees for every truncated online iterate (Yu et al., 2020). The accelerated proximal-gradient paper for dual MPC QPs explicitly presents an $0.52$3 rate claim but also notes that the result is unusual from a modern first-order-optimization perspective and should be viewed critically (Wang et al., 2021). The sampled-data PDG literature likewise shows that continuous-time stability proofs do not transfer automatically to digital implementation; discretization can destabilize a PDG controller that continuous-time analysis would certify as stable (Moriyasu et al., 2024).
Finally, safety mechanisms are themselves conditional. CBF-based safety filtering yields formal guarantees only when the barrier construction is valid and the resulting QP is feasible (Singh et al., 18 Jul 2025). Goal-conditioned latent objectives can omit force-sensitive success criteria; Slot-MPC reports failure modes in which the robot reaches visually near the goal yet does not fully press a button or slips off a lever, suggesting that terminal-only latent distance can underrepresent contact-rich task completion (Spieler et al., 14 May 2026).
The broad implication is that gradient-based MPC is best understood as a spectrum of techniques rather than a settled algorithmic doctrine. Its unifying idea is the exploitation of derivative information inside receding-horizon optimization, but its actual performance depends on representation, smoothness, uncertainty modeling, constraint treatment, warm-start quality, and the fidelity with which numerical implementation preserves the assumptions of the underlying analysis (Bharadhwaj et al., 2020, Wang et al., 2024).