Transport Systems & Logistics Laboratory

Markovian Dynamics Enforcer (MaDE): Feasibility Preserving Correction on Learned Dynamics Manifolds

Kevin Yu1, Tao Guo2, Constantinos Antoniou2, Panagiotis Angeloudis1

1Imperial College London, UK2Technical University of Munich, GermanyNeurIPS 2026

Measurement noise distorts the vehicle’s recorded trajectory.

Schematic of trajectory predictions in the accuracy and dynamical-consistency plane, before and after MaDE
MaDE improves the dynamical consistency of trajectory predictions at a cost in accuracy.

Abstract

Neural trajectory predictors can reach low prediction error while violating dynamics, actuator limits, or state constraints, especially when controls are unobserved and dynamics are partially specified. We introduce the Markovian Dynamics Enforcer (MaDE), a time-invariant post-hoc operator mapping state-transition proposals onto a learned feasible dynamics manifold, trained on feasible states without ground-truth controls. For each transition it infers a control and recomputes the state through a completion model of known physics plus a learned residual. It then corrects that control by gradient-based inequality reduction, so inequality satisfaction is best-effort within an iteration budget.

Since every correction iterate re-enters the completion model, the returned state is dynamically consistent by construction relative to that model and the supplied previous-state anchor. MaDE drives dynamics residuals to essentially zero on fully specified simulated systems, and on an underspecified system leaves a smaller true-dynamics residual than the baselines.

Designed to attach to arbitrary predictors, the frozen operator is evaluated downstream of recurrent, structured state-space, and transformer predictors. On recorded vehicle trajectories the one-step residual against a kinematic bicycle model is 0.0071 to 0.0072 for MaDE and 0.1703 to 0.1714 for raw predictors. MaDE raises average displacement error by a factor of 1.57 to 1.83.

The problem

Neural trajectory models can score low prediction error while breaking actuator limits, state constraints, or basic dynamics. Downstream planning and control modules rely on predictions that respect these constraints.

Fixes usually mean retraining the predictor or knowing the dynamics exactly. Often the physics is only partly known and the controls are unobserved.

How MaDE works

MaDE corrects one transition at a time, from the previous state and the predictor's proposed next state. The same cell runs at every step, so one operator serves any horizon.

The MaDE cell: inverse dynamics, dynamics completion, and the constraint corrector
Overview of the MaDE cell. The control update is drawn with zero momentum.

Each cell takes three steps:

  • Inverse dynamics infers the control that explains the transition.
  • Completion recomputes the next state from known physics plus a small learned residual, following APHYNITY.
  • Correction updates the control by gradient descent to reduce constraint violations within a fixed iteration budget, recomputing the state after each update.

The returned state comes from the dynamics model, not from the proposal.

Training is self-supervised on state transitions alone. The inverse and forward operators check each other by cycle consistency.

Dynamics consistency holds by construction, relative to the learned model and the previous state. This guarantees consistency with the learned model; consistency with the true system depends on model accuracy.

Bounds are best-effort within the iteration budget. If the corrector stops short, dynamics still hold and the bounds may not.

Try it

Break a vehicle trajectory, then watch MaDE pull it back onto the vehicle's dynamics. The residual plots show where the physics was violated and where it is restored.

  • Pick a trajectory, then add noise or a perturbation to corrupt it.
  • Press Apply MaDE. The green path shows the corrected trajectory; the residual plots show the change in dynamics consistency.
  • Toggle the mode. Single step corrects each step from the true previous state. Rollout chains MaDE's own outputs, as in the paper.
Mode:
  • Ground truth
  • Input
  • MaDE

Loading demo data.

InputMaDE
Dyn.-K––
Dyn.-T––
Fid.––
Dyn.-K
Dyn.-T

The readout is the mean over the trajectory.

Dyn.-K and Dyn.-T are one-step dynamics residuals against the kinematic and true dynamic bicycle. Fid. is the distance to the original, unperturbed trajectory. The demo uses precomputed corrections with synthetic noise. Its results are separate from the paper’s experiments.

Results

Ineq. rate is the share of steps that break a bound, and Ineq. mag. the mean size of the break. Dyn.-K, Dyn.-L and Dyn.-T are one-step residuals against the known physics, the learned model, and the true system.

Simulated systems

We evaluate perturbed state-transition proposals on four simulated systems: a double integrator (DI), a kinematic unicycle (UNI), a kinematic bicycle (KB) and a dynamic bicycle (DB). No upstream predictor is used. Baselines are clamping, a per-step multilayer perceptron (MLP) and FAB. Fid. is distance to the unperturbed state. Where the known physics is exact, only Dyn.-K is shown.

  • Dyn.-K goes to about zero on the three fully specified systems, and is lowest on the underspecified dynamic bicycle.
  • Lowest Ineq. mag. and Fid. on all four systems, though not every violation is removed.
Show exact values
Simulated systems. Mean ± population standard deviation over five seeds. Lower is better. Within each metric row, bold marks the best mean and underline the second best.
BaselinesMaDE
SystemMetricClampMLPFABMaDE
DIIneq. rate0.2551 ± 0.00000.3955 ± 0.00450.3000 ± 0.01290.2034 ± 0.0000
Ineq. mag.9.8777 ± 0.00004.3835 ± 0.20382.4171 ± 0.42720.2428 ± 0.0000
Dyn.-K0.3332 ± 0.00000.2397 ± 0.00120.3304 ± 0.02060.0000 ± 0.0000
Fid.3.0207 ± 0.00002.9800 ± 0.00542.7139 ± 0.13392.2792 ± 0.0000
UNIIneq. rate0.0640 ± 0.00000.3831 ± 0.00380.2933 ± 0.00900.1042 ± 0.0000
Ineq. mag.4.7181 ± 0.00002.1585 ± 0.05531.1305 ± 0.15140.0538 ± 0.0000
Dyn.-K0.3251 ± 0.00000.2614 ± 0.00570.2729 ± 0.03860.0000 ± 0.0000
Fid.5.3315 ± 0.00005.4588 ± 0.01285.0115 ± 0.10341.4126 ± 0.0000
KBIneq. rate0.3008 ± 0.00000.5052 ± 0.00780.4293 ± 0.02130.1965 ± 0.0000
Ineq. mag.5.3723 ± 0.00002.8344 ± 0.20411.9033 ± 0.38200.1431 ± 0.0001
Dyn.-K0.8546 ± 0.00000.7418 ± 0.01550.7152 ± 0.11150.0003 ± 0.0000
Fid.13.3756 ± 0.000013.7249 ± 0.042413.1332 ± 0.35993.6797 ± 0.0006
DBIneq. rate0.1595 ± 0.00430.4371 ± 0.01890.7480 ± 0.06970.1384 ± 0.0055
Ineq. mag.12.6677 ± 0.12072.2624 ± 0.10806.6766 ± 2.82410.2607 ± 0.0392
Dyn.-K1.6078 ± 0.00031.4074 ± 0.05772.1756 ± 0.44630.0733 ± 0.0326
Dyn.-L1.5567 ± 0.03511.3675 ± 0.07232.1809 ± 0.45180.0000 ± 0.0000
Dyn.-T1.6976 ± 0.00581.4897 ± 0.05762.3552 ± 0.40580.3736 ± 0.0647
Fid.13.5112 ± 0.000313.8213 ± 0.026412.5074 ± 3.28375.2021 ± 0.2740

Real-data experiment (inD)

We apply the trained MaDE operator to recorded vehicle trajectories from inD, correcting recurrent, state-space and transformer forecasts. We compare the results with uncorrected forecasts, clamping and an extended Kalman filter/Rauch–Tung–Striebel (EKF/RTS) smoother. ADE and FDE measure average and final displacement error in metres.

  • Lowest Dyn.-K in every predictor family (kinematic bicycle, 2.7 m wheelbase).
  • Lower Ineq. rate than clamp and the raw forecast in every family.
  • Average displacement error increases by 57–83% relative to the raw predictions. Improved consistency with the approximate dynamics model comes at a cost in prediction accuracy.
Show exact values
inD experiment. Mean ± population standard deviation over cells, 5 per predictor family for each baseline and 15 for MaDE. Lower is better. Within each family and metric, bold marks the lowest mean and underline the second lowest, and ties share a mark.
PredictorMetricrawclampsmoother (res.)MaDE
RecurrentADE (m)0.6345 ± 0.02400.6345 ± 0.02400.7122 ± 0.01921.1599 ± 0.1367
FDE (m)1.7206 ± 0.05861.7206 ± 0.05861.8096 ± 0.05923.0459 ± 0.3766
Dyn.-K0.1711 ± 0.02240.1687 ± 0.02180.0277 ± 0.00120.0072 ± 0.0035
Ineq. rate0.0572 ± 0.00930.0468 ± 0.00910.0855 ± 0.00930.0114 ± 0.0059
State-spaceADE (m)0.6251 ± 0.01340.6251 ± 0.01340.7022 ± 0.01781.1417 ± 0.0839
FDE (m)1.6546 ± 0.02591.6546 ± 0.02591.7717 ± 0.02903.0569 ± 0.2233
Dyn.-K0.1714 ± 0.01500.1685 ± 0.01450.0277 ± 0.00070.0072 ± 0.0035
Ineq. rate0.0583 ± 0.00570.0478 ± 0.00660.0849 ± 0.00540.0111 ± 0.0053
TransformerADE (m)0.7033 ± 0.01750.7033 ± 0.01750.7776 ± 0.02101.1058 ± 0.1466
FDE (m)1.7802 ± 0.03041.7802 ± 0.03041.8652 ± 0.02872.9465 ± 0.3834
Dyn.-K0.1703 ± 0.02330.1671 ± 0.02280.0285 ± 0.00270.0071 ± 0.0035
Ineq. rate0.0358 ± 0.00960.0288 ± 0.00800.0648 ± 0.01340.0065 ± 0.0047

Scope and limitations

  • Model-relative. Guarantees hold relative to the learned model and the previous state, not the true system. MaDE is not a safety certificate.
  • One step. Constraints act on single transitions, so trajectory-level limits such as energy budgets are out of scope.
  • Useful physics needed. The known model must explain much of the dynamics.
  • Finite budget. An unresolved violation can propagate through subsequent rollout steps; recovery is not guaranteed.

BibTeX

@misc{yu2026made,
  title         = {Markovian Dynamics Enforcer: Feasibility Preserving Correction on Learned Dynamics Manifolds},
  author        = {Yu, Kevin and Guo, Tao and Antoniou, Constantinos and Angeloudis, Panagiotis},
  year          = {2026},
  eprint        = {2609.39888},
  archivePrefix = {arXiv},
  url           = {https://arxiv.org/abs/2609.39888}
}