Jacobian-Free Secant MPC for Learned Dynamics
Implementation & benchmark of arXiv:2608.15322 — Iterative State- and Control-Dependent Model Predictive Control: A Jacobian-Free Formulation for Constrained Nonlinear Systems
Source paper: Iterative State- and Control-Dependent Model Predictive Control: A Jacobian-Free Formulation for Constrained Nonlinear Systems arXiv:2608.15322 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use a learned transition model inside MPC without computing its Jacobian. At every planning iteration, construct coordinate-wise secant matrices from model evaluations, freeze those matrices along the current predicted trajectory, and solve a constrained linear-quadratic subproblem; then re-roll out the nonlinear model and repeat. This targets model-based RL settings where reverse-mode differentiation through hundreds of dynamics steps is expensive or numerically unstable.
Formulas
Mathematical statement
The plant model is the discrete nonlinear recursion $x_{k+1}=f(x_k,u_k)$, and predicted states satisfy $x_{k,j+1}=f(x_{k,j},u_{k,j})$. Replace the usual Jacobian linearization with an exact secant factorization around a reference pair $(\bar{x},\bar{u})$. Let $z=(x,u)\in\mathbb{R}^{n+m}$, and define intermediate vectors $z^{(0)}=0$ and $z^{(q)}=(z_1,\ldots,z_q,0,\ldots,0)$. For output coordinate $r$, define $a_{rq}=[f_r(z^{(q)})-f_r(z^{(q-1)})]/z_q$ when $z_q\neq 0$, using a symmetric finite-difference fallback when $z_q=0$. Telescoping gives $f_r(z)=\sum_q a_{rq}z_q$, hence $f(x,u)=A(x,u)x+B(x,u)u$, where $A_{rq}=a_{rq}$ for state coordinates and $B_{rq}=a_{r,n+q}$ for control coordinates. Along a rollout, freeze $A_j=A(\bar{x}_j,\bar{u}_j)$ and $B_j=B(\bar{x}_j,\bar{u}_j)$, yielding the linear dynamics $x_{j+1}=A_jx_j+B_ju_j$. Refreezing these matrices after each nonlinear rollout creates the iterative MPC method; the resulting equality constraints are block-banded in the horizon, enabling Riccati or sparse-QP solution instead of dense SQP.
Implementation notes
Integrate this at the planning layer of a model-based RL agent, immediately after the learned dynamics model $f_\theta(x,u)$ and before action selection; do not alter the neural model or backpropagate through planning iterations. Given the current state $x_0$, a warm-start control sequence $u[0:H-1]$, and reference states/actions, repeat the following loop for one to three iterations. First roll out $f_\theta$ to obtain $\bar{x}[0:H]$. For every stage $j$, construct $A[j]$ and $B[j]$ by coordinate telescoping. Start with $z_{prev}=0$ and $y_{prev}=f_\theta(z_{prev})$; for each coordinate $q$ of $z=(\bar{x}[j],u[j])$, change only coordinate $q$ by $\delta_q=\operatorname{sign}(z_q)\max(|z_q|,10^{-3})$, evaluate $y_{new}=f_\theta(z_{new})$, and set column $q$ to $(y_{new}-y_{prev})/\delta_q$. Then set $z_{prev}=z_{new}$ and $y_{prev}=y_{new}$. Split the columns into $A[j]$ and $B[j]$. Solve the banded quadratic program with constraints $x[j+1]=A[j]x[j]+B[j]u[j]$, action bounds, and optional state bounds. Apply only the first action, shift the solution for warm-starting, and re-roll out the nonlinear model. The secant matrices are computed from function evaluations; no neural Jacobian is required. Estimate local contraction empirically with $\hat{\rho}=\|u_{new}-u_{old}\|/\max(\|u_{old}-u_{older}\|,10^{-8})$ and stop when the sequence change is below tolerance or $\hat{\rho}\geq 1$. Use Riccati recursion or a sparse QP solver rather than a dense generic SQP solver. First test on a 4D or 8D learned cartpole or pendulum world model with horizon 32, comparing against shooting MPC with autodiff Jacobians and CEM at equal model evaluations. Record wall-clock planning time, constraint violations, return, and robustness to model noise. Success means at least 1.5x lower planning latency at matched return, fewer gradient-related numerical failures, and stable performance when the horizon is doubled.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.