Markovian Dynamics Enforcer (MaDE): Feasibility Preserving Correction on Learned Dynamics Manifolds
, , ,
Measurement noise distorts the vehicle’s recorded trajectory.

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.

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.
- Ground truth
- Input
- MaDE
Loading demo data.
The readout is the mean over the trajectory.
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
| Baselines | MaDE | ||||
|---|---|---|---|---|---|
| System | Metric | Clamp | MLP | FAB | MaDE |
| DI | Ineq. rate | 0.2551 ± 0.0000 | 0.3955 ± 0.0045 | 0.3000 ± 0.0129 | 0.2034 ± 0.0000 |
| Ineq. mag. | 9.8777 ± 0.0000 | 4.3835 ± 0.2038 | 2.4171 ± 0.4272 | 0.2428 ± 0.0000 | |
| Dyn.-K | 0.3332 ± 0.0000 | 0.2397 ± 0.0012 | 0.3304 ± 0.0206 | 0.0000 ± 0.0000 | |
| Fid. | 3.0207 ± 0.0000 | 2.9800 ± 0.0054 | 2.7139 ± 0.1339 | 2.2792 ± 0.0000 | |
| UNI | Ineq. rate | 0.0640 ± 0.0000 | 0.3831 ± 0.0038 | 0.2933 ± 0.0090 | 0.1042 ± 0.0000 |
| Ineq. mag. | 4.7181 ± 0.0000 | 2.1585 ± 0.0553 | 1.1305 ± 0.1514 | 0.0538 ± 0.0000 | |
| Dyn.-K | 0.3251 ± 0.0000 | 0.2614 ± 0.0057 | 0.2729 ± 0.0386 | 0.0000 ± 0.0000 | |
| Fid. | 5.3315 ± 0.0000 | 5.4588 ± 0.0128 | 5.0115 ± 0.1034 | 1.4126 ± 0.0000 | |
| KB | Ineq. rate | 0.3008 ± 0.0000 | 0.5052 ± 0.0078 | 0.4293 ± 0.0213 | 0.1965 ± 0.0000 |
| Ineq. mag. | 5.3723 ± 0.0000 | 2.8344 ± 0.2041 | 1.9033 ± 0.3820 | 0.1431 ± 0.0001 | |
| Dyn.-K | 0.8546 ± 0.0000 | 0.7418 ± 0.0155 | 0.7152 ± 0.1115 | 0.0003 ± 0.0000 | |
| Fid. | 13.3756 ± 0.0000 | 13.7249 ± 0.0424 | 13.1332 ± 0.3599 | 3.6797 ± 0.0006 | |
| DB | Ineq. rate | 0.1595 ± 0.0043 | 0.4371 ± 0.0189 | 0.7480 ± 0.0697 | 0.1384 ± 0.0055 |
| Ineq. mag. | 12.6677 ± 0.1207 | 2.2624 ± 0.1080 | 6.6766 ± 2.8241 | 0.2607 ± 0.0392 | |
| Dyn.-K | 1.6078 ± 0.0003 | 1.4074 ± 0.0577 | 2.1756 ± 0.4463 | 0.0733 ± 0.0326 | |
| Dyn.-L | 1.5567 ± 0.0351 | 1.3675 ± 0.0723 | 2.1809 ± 0.4518 | 0.0000 ± 0.0000 | |
| Dyn.-T | 1.6976 ± 0.0058 | 1.4897 ± 0.0576 | 2.3552 ± 0.4058 | 0.3736 ± 0.0647 | |
| Fid. | 13.5112 ± 0.0003 | 13.8213 ± 0.0264 | 12.5074 ± 3.2837 | 5.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
| Predictor | Metric | raw | clamp | smoother (res.) | MaDE |
|---|---|---|---|---|---|
| Recurrent | ADE (m) | 0.6345 ± 0.0240 | 0.6345 ± 0.0240 | 0.7122 ± 0.0192 | 1.1599 ± 0.1367 |
| FDE (m) | 1.7206 ± 0.0586 | 1.7206 ± 0.0586 | 1.8096 ± 0.0592 | 3.0459 ± 0.3766 | |
| Dyn.-K | 0.1711 ± 0.0224 | 0.1687 ± 0.0218 | 0.0277 ± 0.0012 | 0.0072 ± 0.0035 | |
| Ineq. rate | 0.0572 ± 0.0093 | 0.0468 ± 0.0091 | 0.0855 ± 0.0093 | 0.0114 ± 0.0059 | |
| State-space | ADE (m) | 0.6251 ± 0.0134 | 0.6251 ± 0.0134 | 0.7022 ± 0.0178 | 1.1417 ± 0.0839 |
| FDE (m) | 1.6546 ± 0.0259 | 1.6546 ± 0.0259 | 1.7717 ± 0.0290 | 3.0569 ± 0.2233 | |
| Dyn.-K | 0.1714 ± 0.0150 | 0.1685 ± 0.0145 | 0.0277 ± 0.0007 | 0.0072 ± 0.0035 | |
| Ineq. rate | 0.0583 ± 0.0057 | 0.0478 ± 0.0066 | 0.0849 ± 0.0054 | 0.0111 ± 0.0053 | |
| Transformer | ADE (m) | 0.7033 ± 0.0175 | 0.7033 ± 0.0175 | 0.7776 ± 0.0210 | 1.1058 ± 0.1466 |
| FDE (m) | 1.7802 ± 0.0304 | 1.7802 ± 0.0304 | 1.8652 ± 0.0287 | 2.9465 ± 0.3834 | |
| Dyn.-K | 0.1703 ± 0.0233 | 0.1671 ± 0.0228 | 0.0285 ± 0.0027 | 0.0071 ± 0.0035 | |
| Ineq. rate | 0.0358 ± 0.0096 | 0.0288 ± 0.0080 | 0.0648 ± 0.0134 | 0.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}
}