Deep reinforcement learning (RL) can transfer agile robot skills from simulation to the real world, but closing the sim-to-real gap by domain randomization requires expert physics knowledge, and simulator calibration from real data typically targets a few hand-picked parameters. Even then, simulators miss real-world effects, and environments reconstructed from onboard perception inherit sensing errors that limit policy improvement. We propose Neural Fidelity Calibration (NFC), which uses conditional flow matching to calibrate simulator physical parameters and residual fidelity domains online during deployment. Residual fidelity captures sim-to-real dynamics discrepancies and perception-induced environment uncertainty. NFC operates in a latent space so that realistic environments can be sampled from the inferred posterior for real-to-sim policy fine-tuning. The framework is informative: the pretrained policy is fine-tuned only when an anomaly is detected, sequential NFC seeds its proposal from the simulation-pretrained estimator, and a hallucination policy modulates posterior uncertainty following optimism in the face of uncertainty. NFC attains the most accurate posteriors among established simulation-based inference methods on five robots with up to 39 physical parameters and a 128x128 residual terrain. On a wheeled robot with a broken wheel axle deployed on snow, mud, and wet grass, NFC raises success on rough terrain from 26% to 70% and reduces orientation jerk by 88%. Code and videos will be released upon publication.
Figures & tables
Fig. 1: NFC-driven sim-to-real adaptation. (a) Residual fidelity : colored trajectories are rollouts in the calibrated simulator, black is the real execution, and their difference is the residual dynamics; the circled region of the terrain map marks uncertain perception, where NFC samples the residual environment (ground-truth minus perceived elevation) to reconstruct terrain variants for fine-tuning. (b) Simulator calibration : a conditional flow matching model infers physical parameters matching the real trajectory. (c) Informative adaptation : policy and NFC are pretrained in simulation and fine-tuned only when an anomaly is detected.
Average Log Posterior Density ( ↑ )
Anomaly Detection
Ant
Quadruped
Humanoid
Quadcopter
Jackal
TPR ( ↑ )
FPR ( ↓ )
Inference
Feature
Flat
Rough
Flat
Rough
Flat
Rough
Flat
Rough
Flat
Rough
Flat
Rough
Flat
Rough
MDN
QMC-RFF
−4.88
−0.59
−2.09
−2.30
−10.52
−13.27
−2.26
−2.47
0.64
−1.20
0.70
0.51
0.01
0.01
MDN
TCN
−2.60
−3.10
−1.64
−3.11
−2.52
−3.42
−1.79
−2.56
0.22
−1.17
0.97
0.80
0.01
0.07
FM
MLP
−1.00
−1.09
−1.14
−1.34
−1.63
−2.93
−1.20
−1.86
0.26
−1.10
0.85
0.65
0.01
0.01
FM
QMC-RFF
−2.79
−3.03
−2.17
−2.48
−2.61
−3.33
−3.00
−3.64
0.06
−1.29
0.70
0.51
0.01
0.01
TABLE I: Posterior-inference accuracy (average log-density of ground-truth parameters, ↑ ) and anomaly detection (TPR ↑ / FPR ↓ at a threshold calibrated to 99% specificity in Genesis). – denotes not applicable.
Fig. 2: Real-world scenarios for a Jackal with a broken front-left wheel axle. Laboratory ( Flat ) conditions vary surface material and a loosely attached rock; outdoor ( Rough ) conditions combine snow, wet grass, mud, and elevation change.
Fig. 3: NFC on real snowy terrain with a broken front-left wheel axle. For each history window, each method block shows a 3×2 grid: the first two columns are joint posteriors over wheel damping ( x ) and friction ( y ) for the four wheels (top: rear-right, rear-left; bottom: front-right, front-left); the third column shows the inferred residual dynamics ( Δx,Δy ; top) and residual terrain height ( Δz ; bottom). NFC singles out the front-left wheel with near-zero damping; competing methods trained on the same data yield diffuse posteriors.
PPO w/ NFC
PPO w/o Δ Fidelity
PPO w/o NFC
PPO w/ MDN-RFF
PPO w/ CMA-ES
TD-MPC2
Falco
Success Rate (%) ( ↑ )
Flat
100
100
100
100
100
100
100
Rough
70
52
26
48
44
41
30
Traj. Ratio ( ↓ )
Flat
1.80
1.80
1.90
1.53
1.99
1.50
1.60
Rough
2.10
3.20
3.70
2.40
2.35
2.70
3.60
Orien. Jerk ( ↓ ) ( rads−3 )
Flat
2.98
3.50
14.18
6.14
7.96
6.95
41.90
Rough
3.19
8.49
26.99
9.81
10.38
8.98
41.93
TABLE II: Real-world policy improvement for a Jackal with a broken front-left wheel axle across four Flat (laboratory) and three Rough (wild terrain) scenarios, 9 runs each.
Deep reinforcement learning can seamlessly transfer agile locomotion and navigation skills from the simulator to real world. However, bridging the sim-to-real gap with domain randomization or adversarial methods often demands expert physics knowledge to ensure policy robustness. Even so, cutting-edge simulators may fall short of capturing every real-world detail, and the reconstructed environment may introduce errors due to various perception uncertainties. To address these challenges, we propose Neural Fidelity Calibration (NFC), a novel framework that employs conditional score-based diffusion models to calibrate simulator physical coefficients and residual fidelity domains online during robot execution. Specifically, the residual fidelity reflects the simulation model shift relative to the real-world dynamics and captures the uncertainty of the perceived environment, enabling us to sample realistic environments under the inferred distribution for policy fine-tuning. Our framework is informative and adaptive in three key ways: (a) we fine-tune the pretrained policy only under anomalous scenarios, (b) we build sequential NFC online with the pretrained NFC's proposal prior, reducing the diffusion model's training burden, and (c) when NFC uncertainty is high and may degrade policy improvement, we leverage optimistic exploration to enable hallucinated policy optimization. Our framework achieves superior simulator calibration precision compared to state-of-the-art methods across diverse robots with high-dimensional parametric spaces. We study the critical contribution of residual fidelity to policy improvement in simulation and real-world experiments. Notably, our approach demonstrates robust robot navigation under challenging real-world conditions, such as a broken wheel axle on snowy surfaces.
Youwei Yu, Lantao Liu
Luddy School of Informatics, Computing, and Engineering at Indiana University, Bloomington, IN 47408, USA.
A policy that transfers from simulation to a lab robot often fails in the field. Calibrating a simulator from real-world data typically targets only a few hand-picked parameters, and even calibrated simulators fail to capture unmodeled dynamics, while environments reconstructed via onboard perception inherit sensing noise and artifacts. We propose Neural Fidelity Calibration (NFC), a framework based on conditional flow matching that infers online, directly from a robot's execution data, both simulator physical parameters and residual fidelity - the remaining dynamics discrepancy and the gap between perceived and true environment geometry. A simulation-trained anomaly detector determines when recalibration or fine-tuning is required using onboard sensory signals alone, while an exploration policy actively modulates posterior uncertainty using optimism in the face of uncertainty. Across five robot platforms with up to 39 calibrated parameters and a 128x128 residual terrain map, NFC achieves the most accurate posterior distributions compared to established simulation-based inference baselines. In physical outdoor experiments with a wheeled robot suffering an axle failure across snow, mud, and wet grass, NFC increases rough-terrain navigation success from 26% to 70% while reducing orientation jerk by 88%.
In recent years, reinforcement learning (RL) has shown remarkable success in robotics when a fast and accurate simulator is available for a given task. When using RL and simulation, more simulator realism is generally beneficial but becomes harder to obtain as robots are deployed in increasingly complex and widescale domains. In such settings, simulators will likely fail to model all relevant details of a given target task and this observation motivates the study of sim2real with simulators that leave out key task details. In this paper, we formalize and study the abstract sim2real problem: given an abstract simulator that models a target task at a coarse level of abstraction, how can we train a policy with RL in the abstract simulator and successfully transfer it to the real-world? Our first contribution is to formalize this problem using the language of state abstraction from the RL literature. This framing shows that an abstract simulator can be grounded to match the target task if the grounded abstract dynamics take the history of states into account. Based on the formalism, we then introduce a method that uses real-world task data to correct the dynamics of the abstract simulator. We then show that this method enables successful policy transfer both in sim2sim and sim2real evaluation.
Yunfu Deng, Yuhao Li, Josiah P. Hanna
Department of Computer Sciences, University of Wisconsin–Madison, Madison, WI 53706 USA · Manning College of Information and Computer Sciences, University of Massachusetts Amherst, Amherst, MA 01003 USA