MEKAWIRE
ExpertarXiv

Neural Fidelity Calibration for Informative Sim-to-Real Adaptation

Youwei Yu, Lantao Liu
From the abstract

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.

From the abstract. Our summary is in progress.

Full paper

Neural Fidelity Calibration for Informative Sim-to-Real Adaptation

Youwei Yu, Lantao Liu

Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.28274 (PDF).

Abstract

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 128\times 128 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\text{\,}\mathrm{\%} to 70\text{\,}\mathrm{\%} and reduces orientation jerk by 88\text{\,}\mathrm{\%}. Code and videos will be released upon publication.

I Introduction

Zero-shot sim-to-real RL transfers agile policies to soft [50], wheeled [59], aerial [11], and legged [31] robots, with domain randomization (DR) as the standard tool for robustness [51]. In practice, DR ranges are set by experts [34], environments are reconstructed by hand [9], and perturbations must be designed [43]; exhaustive coverage of parameters and environments is prohibitive.

The sim-to-real-to-sim paradigm trains in simulation and improves with real-world data [47], keeping risky exploration in simulation. Within it, simulation-based inference (SBI) [39] narrows DR by inferring simulator parameters from real trajectories, e.g., friction from a run on snow. Two obstacles remain in the field. First, SBI assumes a well-calibrated simulator, yet high-fidelity simulators omit real effects, and environments reconstructed from onboard sensors inherit perception errors. Second, kernel- and optimization-based estimators [40, 46] target low-dimensional parameter sets and do not scale to the dimensionality encountered in deployment.

We propose Neural Fidelity Calibration (NFC), which uses conditional flow matching to calibrate simulator parameters and residual fidelity domains online while the robot operates. Our contributions are:

  1. Simulator-to-reality shift. We separate simulator calibration (parameters aligning simulated with real dynamics) from residual fidelity, which captures discrepancies remaining after correct calibration and errors in environments reconstructed from uncertain perception.
  2. Neural Fidelity Calibration. NFC jointly infers both in a latent space with conditional flow matching, scaling to high-dimensional parameters and rich conditioning (state–action histories plus elevation or depth maps).
  3. Informative policy adaptation. The policy is fine-tuned online only when an anomaly signals imminent failure; a hallucination policy, trained jointly with the control policy, modulates NFC uncertainty under optimism in the face of uncertainty; and all real data is reused offline.

We evaluate NFC against established SBI methods on five simulated robots and on a real Jackal with a broken wheel axle across laboratory floors and wild terrain.

II Related Work

Robust sim-to-real transfer. Zero-shot transfer has succeeded in locomotion [23, 62], navigation [28, 59], and manipulation [15, 54], with DR bridging the gap. Adversarial training [12, 43] and safe RL [48, 25, 24, 37] harden policies further, but their guarantees hold relative to an assumed model and disturbance set, which an unmodeled fault can violate. This motivates continual real-world recalibration, which we trigger by anomaly detection.

Adaptive domain randomization (ADR) aligns simulator parameters with real executions [20, 50, 26], mostly via likelihood-free SBI [39]: BayesSim [40] uses random Fourier features, Muratore et al. [36] add sequential inference, and Memmel et al. [35] maximize Fisher information, while high-dimensional conditioning remains under-explored [13]. Evolution strategies [53], Bayesian optimization [38], and differentiable simulators [21, 19] are costly and still assume a simulator that can mirror reality; we drop that assumption by modeling the residual explicitly.

Optimistic exploration. Optimism in the face of uncertainty [5, 27] underlies H-UCRL [7] and its extensions [42, 49, 4]. Our hallucination policy borrows the principle but reshapes the spread of domains drawn from the NFC posterior rather than optimizing within a learned model’s confidence set.

III Preliminaries and Problem Formulation

Simulation-based inference. ADR infers simulator parameters \boldsymbol{\psi} from a real trajectory \boldsymbol{\tau} via p(\boldsymbol{\psi}|\boldsymbol{\tau})\propto p(\boldsymbol{\tau}|\boldsymbol{\psi})p(\boldsymbol{\psi}). With a black-box simulator the likelihood is intractable, so likelihood-free methods [44, 39] approximate the posterior from simulated pairs. Their cost grows quickly with the dimension of \boldsymbol{\psi}, and existing estimators target a handful of parameters [40, 46], whereas our problems couple up to 39 physical parameters with a 16\,384-dimensional residual environment, conditioned on trajectories with depth or elevation perception.

Flow matching as posterior estimator. We estimate the posterior with conditional flow matching [32], which scales to high-dimensional targets and rich conditioning [55]: a velocity field \boldsymbol{v}_{\boldsymbol{\theta}}(\boldsymbol{\psi}(k),\boldsymbol{\tau},k) is regressed onto \boldsymbol{\psi}(1)-\boldsymbol{\psi}(0) along the linear path from a Gaussian sample \boldsymbol{\psi}(0) to a parameter sample \boldsymbol{\psi}(1), and sampling integrates \mathrm{d}\boldsymbol{\psi}/\mathrm{d}k=\boldsymbol{v}_{\boldsymbol{\theta}} over k\in[0,1] with a few Euler steps, which makes online use practical. We write \boldsymbol{q}_{\boldsymbol{\theta}} for the induced conditional density.

Problem. We model a contextual MDP [14] whose context c comprises simulator parameters \boldsymbol{\psi} and environment variables \boldsymbol{e} (e.g., terrain geometry), and maximize return averaged over the posterior of contexts consistent with the real execution:

\max_{\boldsymbol{\pi}}\;\mathbb{E}_{c\sim p(c|\boldsymbol{\tau}^{\mathrm{real}})}\,\mathbb{E}_{\boldsymbol{\tau}\sim P^{\boldsymbol{\pi}}_{c}}\left[R(\boldsymbol{\tau})\right].
(1)

Calibrating to a single best-fit \boldsymbol{\psi}^{*} instead overfits, since no single setting explains the data when the simulator is imperfect and real data is scarce. Because simulation budgets are finite [59], we target informative fine-tuning during deployment rather than exhaustive pretraining.

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.

IV Neural Fidelity Calibration

Fig. 1 summarizes the framework.

IV-A Calibration and Fidelity Shifts

BayesSim-style inference explains the real trajectory only through the simulator’s own parameterization, i.e., it assumes p(\boldsymbol{\psi}|\boldsymbol{\tau}^{\mathrm{real}})\approx p(\boldsymbol{\psi}|\boldsymbol{\tau}^{\mathrm{sim}}) for some \boldsymbol{\psi}. This fails when the simulator omits real effects and when it is calibrated against a terrain perceived with error [57]. We therefore decompose real-world transitions as

s_{t+1}=\underbrace{f_{\boldsymbol{\psi}}(s_{t},a_{t}|\boldsymbol{e})}_{\mathrm{Calibration}}+\underbrace{g_{\boldsymbol{\phi}}(s_{t},a_{t}|\boldsymbol{e})}_{\mathrm{Fidelity}}+\epsilon(s_{t},a_{t}|\boldsymbol{e}),
(2)

where f_{\boldsymbol{\psi}} is the nominal simulator with parameters \boldsymbol{\psi} (mass, friction, …), g_{\boldsymbol{\phi}} models residual effects, and \epsilon is noise. The residual fidelity \boldsymbol{\phi}=\{\Delta s_{t+1},\Delta\boldsymbol{e}\} comprises the residual dynamics \Delta s_{t+1} (sim-vs-real state differences under identical conditions) and the residual environment \Delta\boldsymbol{e} (perceived vs. true environment). For a wheeled robot on rough terrain, \boldsymbol{\psi}\in\mathbb{R}^{13} holds body and wheel masses, wheel damping, and friction; \boldsymbol{\phi} holds residual dynamics over pose, velocity, and previous action (\mathbb{R}^{15}) and a residual elevation map \Delta\boldsymbol{e}\in\mathbb{R}^{128\times 128}.

We assume \boldsymbol{\psi}, \boldsymbol{\phi}, and \boldsymbol{\tau} have compact support with bounded densities, which keeps inferred parameters physically plausible (e.g., at most two broken wheels on a four-wheeled robot). NFC needs only these broad support bounds and a choice of how perturbations enter dynamics and observations; it requires no real-world anomaly labels or fault taxonomy. We then learn the joint posterior p(\boldsymbol{\psi},\boldsymbol{\phi}|\boldsymbol{\tau}) directly: a conditional density estimator \boldsymbol{q}_{\boldsymbol{\theta}} is trained on simulator-generated parameter–trajectory pairs to maximize \frac{1}{N}\sum_{n}\log\boldsymbol{q}_{\boldsymbol{\theta}}(\boldsymbol{\psi}_{n},\boldsymbol{\phi}_{n}|\boldsymbol{\tau}_{n}), so the trajectory discrepancy enters implicitly through the simulated data-generating process rather than a hand-designed distance. For fine-tuning, N posterior samples reconstruct N environments \boldsymbol{e}=\hat{\boldsymbol{e}}+\Delta\boldsymbol{e} that reset the N parallel simulators.

IV-B Sequential and Latent NFC

Sequential NFC. At deployment, the simulation-pretrained estimator serves as proposal prior, \tilde{p}(\boldsymbol{\psi},\boldsymbol{\phi})=\boldsymbol{q}^{\mathrm{sim}}(\boldsymbol{\psi},\boldsymbol{\phi}|\boldsymbol{\tau}^{\mathrm{real}}), concentrating online simulation on plausible parameters. Following Papamakarios and Murray [39], an estimator trained on proposal-generated data converges to \boldsymbol{q}(\boldsymbol{\psi},\boldsymbol{\phi}|\boldsymbol{\tau})\propto\frac{\tilde{p}(\boldsymbol{\psi},\boldsymbol{\phi})}{p(\boldsymbol{\psi},\boldsymbol{\phi})}\,p(\boldsymbol{\psi},\boldsymbol{\phi}|\boldsymbol{\tau}), i.e., the true posterior reweighted by the proposal-to-prior ratio, which recovers the posterior when \tilde{p}=p. We use this density directly for fine-tuning; each online update trains on newly simulated trajectories only, warm-started from the current network, and is much faster than pretraining.

Latent NFC. Inferring \Delta\boldsymbol{e}\in\mathbb{R}^{128\times 128} in raw space is too costly for real-time improvement. An encoder \mathcal{H}—a causal temporal convolutional network (TCN) [3] for the state–action history and an MLP for the fused perception map—compresses the execution data. In simulation both the noisy trajectory \hat{\boldsymbol{\tau}} the robot would observe and the clean, privileged trajectory \boldsymbol{\tau} are available, and their embedding difference defines the latent residual fidelity \boldsymbol{\phi}_{z}=\mathcal{H}(\boldsymbol{\tau})-\mathcal{H}(\hat{\boldsymbol{\tau}}). The estimator conditions on \mathcal{H}(\hat{\boldsymbol{\tau}}) and infers \boldsymbol{q}(\boldsymbol{\psi},\boldsymbol{\phi}_{z}|\cdot); an MLP decoder \mathcal{Z} maps \boldsymbol{\phi}_{z} back to \boldsymbol{\phi}. Velocity field, encoder, and decoder are trained jointly on the negative log-density plus a reconstruction loss \alpha\|\mathcal{Z}(\boldsymbol{\phi}_{z})-\boldsymbol{\phi}\|_{2}^{2}, alternating between updating (\boldsymbol{q}_{\boldsymbol{\theta}},\mathcal{H}) and \mathcal{Z}. The reconstruction term acts like privileged-information distillation in teacher–student transfer [18], and modeling the residual \Delta\boldsymbol{e} rather than the full environment follows residual learning in image restoration [60].

IV-C Policy Optimization with Hallucinated Randomness

Given NFC samples, the direct approach is DR with the posterior in place of hand-designed ranges. When the posterior is highly uncertain, however, sampling it directly can stall fine-tuning: very low friction makes the robot slide, very high friction makes it stick, and reward is scarce within a short online window. We introduce a hallucination policy \boldsymbol{\pi}_{\mathfrak{h}} that never acts on the robot but controls how far each fine-tuning domain may deviate from the posterior center. Let \boldsymbol{x}=[\boldsymbol{\psi},\boldsymbol{\phi}_{z}]\in\mathbb{R}^{D} be a joint latent sample and \boldsymbol{\mu} the mean of the N samples in the current round. Conditioned on the history embedding, \boldsymbol{\pi}_{\mathfrak{h}} samples a gate \boldsymbol{g}\in(0,1]^{D} per parallel environment, and each simulated domain is

\tilde{\boldsymbol{x}}=\boldsymbol{\mu}+\boldsymbol{g}\odot(\boldsymbol{x}-\boldsymbol{\mu}),\qquad\boldsymbol{x}\sim\boldsymbol{q}(\cdot\mid\hat{\boldsymbol{\tau}}),
(3)

decoded by \mathcal{Z}. \boldsymbol{g}=\boldsymbol{1} recovers the NFC posterior and \boldsymbol{g}\to\boldsymbol{0} collapses to its mean; because the gate is per-coordinate, the agent can keep the variance of wheel friction while shrinking that of the residual-terrain latent. Control and hallucination policies are optimized jointly with PPO [41],

\max_{\boldsymbol{\pi},\boldsymbol{\pi}_{\mathfrak{h}}}\;\mathbb{E}_{\boldsymbol{x}\sim\boldsymbol{q}(\cdot\mid\hat{\boldsymbol{\tau}})}\,\mathbb{E}_{\boldsymbol{g}\sim\boldsymbol{\pi}_{\mathfrak{h}}(\cdot\mid\mathcal{H}(\hat{\boldsymbol{\tau}}))}\,\mathbb{E}_{\boldsymbol{\tau}\sim P^{\boldsymbol{\pi}}_{\tilde{\boldsymbol{x}}}}\left[R(\boldsymbol{\tau})\right].
(4)

Unlike model-based RL [7], this treats the simulator as the model and learns its parameters rather than the dynamics.

IV-D Informative Sim-to-Real Adaptation

Under nominal conditions the pretrained policy performs well and real data is kept for offline refinement; in failure-prone conditions we adapt online.

Anomaly detection. We compare a nominal reference window \boldsymbol{\tau}^{\mathfrak{c}} with a target window \boldsymbol{\tau}^{\mathfrak{t}} [8] as a classifier two-sample test [33], instantiated with a Siamese network [29] whose encoder is the NFC TCN. The anomaly logit is \ell_{\mathrm{A}}=\boldsymbol{w}^{\top}|\mathcal{H}(\boldsymbol{\tau}^{\mathfrak{c}})-\mathcal{H}(\boldsymbol{\tau}^{\mathfrak{t}})|+b, trained with binary cross-entropy on simulated pairs only: nominal (y=0) when physical and residual parameters are retained, anomalous (y=1) when the target’s parameters are redrawn from the prior. A window is flagged when \ell_{\mathrm{A}}>\eta, with \eta the 99th percentile on held-out nominal pairs.

Deployment protocol (Alg. 1). Policy, NFC, and detector are pretrained in simulation under DR. Online, each detected anomaly triggers one adaptation round: NFC infers the posterior from the latest H-step window, the hallucination policy gates its spread, gated samples reset N parallel simulators, the policy is fine-tuned, and sequential NFC is updated with the gated samples as proposal. After the mission, the accumulated data refine NFC, detector, and policy.

Algorithm 1 Informative Sim-to-Real Adaptation with NFC

V Simulation Experiments

Setup. We evaluate Ant, Quadruped (Unitree Go1), Humanoid (Unitree H1), Quadcopter (Ingenuity), and Jackal (ClearPath), with |\boldsymbol{\psi}|=17,25,39,9,13 physical parameters (masses, stiffness or rotor gains, damping, friction) and residual fidelity over proprioceptive state plus a 128\times 128 residual elevation map (a residual depth map for Quadcopter). Policies and NFC are pretrained in Genesis [1] and deployed in MuJoCo [52], whose different contact and integration models plus added sensing and actuation noise provide the gap, in Flat (obstacle-free) and Rough (randomized elevation maps [59] or 3D obstacle fields [30]) environments. Policies are PPO with 4096 parallel environments; NFC pretraining uses 1\text{\times}{10}^{6} windows of H=50 steps at 25\text{\,}\mathrm{Hz}. Each online fine-tuning round takes 0.2\text{\,}\mathrm{s} (5\text{\,}\mathrm{Hz} policy improvement); online NFC training (1.75\text{\,}\mathrm{s}) runs in parallel with the 2\text{\,}\mathrm{s} execution window.

Baselines. With our flow matching (FM) head we compare feature extractors MLP (also our ablation without latent reconstruction), QMC-RFF [40], and QMC-FKS [22]; against the FM head we compare mixture density networks MDN-RFF (BayesSim) and MDN-TCN, and CMA-ES [17, 46], which minimizes trajectory MSE under identical actions.

TABLE I: Posterior-inference accuracy (average log-density of ground-truth parameters, \uparrow) and anomaly detection (TPR \uparrow / FPR \downarrow at a threshold calibrated to 99\text{\,}\mathrm{\%} specificity in Genesis). – denotes not applicable.
  • No data
    Average Log Posterior Density (\uparrow)
    Ant
    Quadruped
    Humanoid
    Quadcopter
    Jackal
    Anomaly Detection
    TPR (\uparrow)
    FPR (\downarrow)
  • Inference
    Feature
    Average Log Posterior Density (\uparrow)
    Flat
    Rough
    Flat
    Rough
    Flat
    Rough
    Flat
    Rough
    Flat
    Rough
    Anomaly Detection
    Flat
    Rough
    Flat
    Rough
  • MDN
    QMC-RFF
    Average Log Posterior Density (\uparrow)
    -4.88
    -0.59
    -2.09
    -2.30
    -10.52
    -13.27
    -2.26
    -2.47
    0.64
    -1.20
    Anomaly Detection
    0.70
    0.51
    0.01
    0.01
  • MDN
    TCN
    Average Log Posterior Density (\uparrow)
    -2.60
    -3.10
    -1.64
    -3.11
    -2.52
    -3.42
    -1.79
    -2.56
    0.22
    -1.17
    Anomaly Detection
    \mathbf{0.97}
    \mathbf{0.80}
    0.01
    0.07
  • FM
    MLP
    Average Log Posterior Density (\uparrow)
    -1.00
    -1.09
    -1.14
    -1.34
    -1.63
    -2.93
    -1.20
    -1.86
    0.26
    -1.10
    Anomaly Detection
    0.85
    0.65
    0.01
    0.01
  • FM
    QMC-RFF
    Average Log Posterior Density (\uparrow)
    -2.79
    -3.03
    -2.17
    -2.48
    -2.61
    -3.33
    -3.00
    -3.64
    0.06
    -1.29
    Anomaly Detection
    0.70
    0.51
    0.01
    0.01
  • FM
    QMC-FKS
    Average Log Posterior Density (\uparrow)
    -2.63
    -3.05
    -2.00
    -1.91
    -2.41
    -3.37
    -2.42
    -2.73
    0.24
    -1.16
    Anomaly Detection
    0.33
    0.32
    0.01
    0.00
  • CMA-ES
    N/A
    Average Log Posterior Density (\uparrow)
    -5.67
    -5.91
    -6.25
    -6.70
    -13.16
    -10.54
    -2.65
    -5.04
    -0.31
    -1.35
    Anomaly Detection
    –
    –
    –
    –
  • FM
    TCN (Ours)
    Average Log Posterior Density (\uparrow)
    \mathbf{0.57}
    \mathbf{0.46}
    \mathbf{-0.42}
    \mathbf{-0.46}
    \mathbf{-1.03}
    \mathbf{-2.64}
    \mathbf{-0.90}
    \mathbf{-1.50}
    \mathbf{1.21}
    \mathbf{0.69}
    Anomaly Detection
    \mathbf{0.97}
    \mathbf{0.80}
    0.01
    0.07
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.

Anomaly detection. Detectors are trained only on Genesis pairs and evaluated on 10\,000 nominal and 10\,000 anomalous MuJoCo windows per robot–terrain setting, with anomalous parameters in the tails of the prior (Table I, right). With the false-alarm rate calibrated, methods separate on TPR: the TCN detector misses a few percent of windows on Flat and one in five on Rough, kernel features over a third. In deployment it flags 96\text{\,}\mathrm{\%}100\text{\,}\mathrm{\%} of anomalous episodes.

NFC accuracy. Measured by the average log-density of ground-truth parameters under the predicted posterior [40], NFC is best in all ten settings (Table I, left). Accuracy drops from Flat to Rough, where perception enters the conditioning, and as |\boldsymbol{\psi}| grows. FM-MLP is the strongest baseline, so the flow matching head already improves over MDN; the TCN encoder adds the remaining margin, and fixed random bases (RFF, FKS) trail because they cannot adapt to high-dimensional conditioning. CMA-ES converges offline given 100 rather than 10 simulation iterations, but each iteration re-runs the simulator, which is incompatible with online adaptation.

Policy improvement. We compare PPO w/ NFC with ablations PPO w/o \DeltaFidelity (physical calibration only) and PPO w/o NFC (fine-tuned directly on execution data), with PPO w/ MDN-RFF and PPO w/ CMA-ES, and with the model-based TD-MPC2 [16], which fine-tunes its dynamics model and policy from execution data alone. In normalized return, PPO w/ NFC is best in all ten robot–terrain settings (e.g., Jackal Rough: 0.82 vs. 0.69 w/o \DeltaFidelity, 0.20 w/o NFC, 0.52 MDN-RFF, 0.50 CMA-ES, 0.41 TD-MPC2). Removing residual fidelity lowers return in all ten settings, with the largest drop on Quadruped (0.34) and the smallest on Humanoid (0.03), so its contribution depends on embodiment rather than robot complexity; disabling NFC entirely causes the largest loss. TD-MPC2 beats PPO w/o NFC in nine of ten settings but never PPO w/ NFC, and its perception-aware dynamics model runs at only 6\text{\,}\mathrm{Hz}.

Fig. 3: NFC on real snowy terrain with a broken front-left wheel axle. For each history window, each method block shows a 3\times 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 (\Delta x,\Delta y; top) and residual terrain height (\Delta z; bottom). NFC singles out the front-left wheel with near-zero damping; competing methods trained on the same data yield diffuse posteriors.
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.
  • Success Rate (%) (\uparrow)
    Flat
    PPO w/ NFC
    \mathbf{100}
    PPO w/o \DeltaFidelity
    \mathbf{100}
    PPO w/o NFC
    \mathbf{100}
    PPO w/ MDN-RFF
    \mathbf{100}
    PPO w/ CMA-ES
    \mathbf{100}
    TD-MPC2
    \mathbf{100}
    Falco
    \mathbf{100}
  • Rough
    \mathbf{70}
    PPO w/ NFC
    52
    PPO w/o \DeltaFidelity
    26
    PPO w/o NFC
    48
    PPO w/ MDN-RFF
    44
    PPO w/ CMA-ES
    41
    TD-MPC2
    30
  • Traj. Ratio (\downarrow)
    Flat
    PPO w/ NFC
    1.80
    PPO w/o \DeltaFidelity
    1.80
    PPO w/o NFC
    1.90
    PPO w/ MDN-RFF
    1.53
    PPO w/ CMA-ES
    1.99
    TD-MPC2
    \mathbf{1.50}
    Falco
    1.60
  • Rough
    \mathbf{2.10}
    PPO w/ NFC
    3.20
    PPO w/o \DeltaFidelity
    3.70
    PPO w/o NFC
    2.40
    PPO w/ MDN-RFF
    2.35
    PPO w/ CMA-ES
    2.70
    TD-MPC2
    3.60
  • Orien. Jerk (\downarrow) (\mathrm{rad}\text{\,}{\mathrm{s}}^{-3})
    Flat
    PPO w/ NFC
    \mathbf{2.98}
    PPO w/o \DeltaFidelity
    3.50
    PPO w/o NFC
    14.18
    PPO w/ MDN-RFF
    6.14
    PPO w/ CMA-ES
    7.96
    TD-MPC2
    6.95
    Falco
    41.90
  • Rough
    \mathbf{3.19}
    PPO w/ NFC
    8.49
    PPO w/o \DeltaFidelity
    26.99
    PPO w/o NFC
    9.81
    PPO w/ MDN-RFF
    10.38
    PPO w/ CMA-ES
    8.98
    TD-MPC2
    41.93
  • Pos. Jerk (\downarrow) (\mathrm{m}\text{\,}{\mathrm{s}}^{-3})
    Flat
    PPO w/ NFC
    \mathbf{4.36}
    PPO w/o \DeltaFidelity
    9.32
    PPO w/o NFC
    8.41
    PPO w/ MDN-RFF
    6.92
    PPO w/ CMA-ES
    7.79
    TD-MPC2
    5.27
    Falco
    6.95
  • Rough
    \mathbf{6.26}
    PPO w/ NFC
    12.46
    PPO w/o \DeltaFidelity
    12.42
    PPO w/o NFC
    9.39
    PPO w/ MDN-RFF
    11.44
    PPO w/ CMA-ES
    18.46
    TD-MPC2
    8.87

VI Real-World Experiments

Setup. The ClearPath Jackal carries a RealSense D435i, a Velodyne LiDAR, and an IMU; depth and LiDAR-inertial odometry are fused onboard into elevation maps [10, 2, 58], and policy optimization runs on a laptop GPU. All scenarios use a broken front-left wheel axle (Fig. 2). Flat comprises four laboratory challenges (standard floor; floor with a loosely attached rock on the robot; mixed materials; mixed materials with the rock) and Rough three wild-terrain challenges (wet grass and snow; elevated terrain with wet grass and snow; mud and snow in a forest). The task is a figure-eight course of 3\text{\,}\mathrm{m} diameter followed as waypoints; a lap succeeds when every waypoint is reached within 0.25\text{\,}\mathrm{m} without rollover or human intervention. Each controller is run 9 times per scenario; the detector flagged all 2160 anomalous trajectories.

Baselines and metrics. We compare NFC against FM-MLP, FM-RFF, FM-FKS, and MDN-RFF for calibration, and PPO w/ NFC against its ablations, PPO w/ MDN-RFF, PPO w/ CMA-ES, TD-MPC2, and Falco [61], a high-rate motion-primitive planner with tuned 200\text{\,}\mathrm{Hz} PID control and access to elevation maps [6, 56]. Following [45, 59] we report success rate, trajectory ratio (traveled over target path length; 1.0 is ideal), orientation jerk, and position jerk.

Calibration results. Fig. 3 shows calibration and residual fidelity on snow. The calibrated damping of the front-left wheel averages 0, consistent with an undriven, free-spinning wheel, while friction on all four wheels averages 0.4, reflecting the snow. Competing methods trained on the same data produce diffuse posteriors that do not single out the broken wheel. For the residual environment, the onboard map is noisy and incomplete because of complex geometry and materials, and NFC samples plausible, diverse terrain reconstructions (Fig. 1a). Ground truth for residual fidelity is unavailable in the real world, so its effect is measured through policy improvement.

Policy improvement. Table II summarizes the results. First, NFC is essential: PPO fine-tuned only on real data (PPO w/o NFC) succeeds on Flat but oscillates with high jerk, handling the anomaly in outcome but not in motion quality, and on Rough falls into repetitive back-and-forth motion. Second, residual fidelity matters: PPO w/o \DeltaFidelity, which injects the perceived map directly into simulation, improves over PPO w/o NFC (52\text{\,}\mathrm{\%} vs. 26\text{\,}\mathrm{\%} Rough success) but stays well below the full method; the gap is attributable to the residual dynamics and perception uncertainty that only \DeltaFidelity models. Third, Falco attains low position jerk from its 200\text{\,}\mathrm{Hz} loop but the highest orientation jerk because its primitives ignore the asymmetric traction of the broken axle, and TD-MPC2 is sample-efficient but computationally heavy once perception enters state propagation. Overall, NFC raises Rough success from 26\text{\,}\mathrm{\%} to 70\text{\,}\mathrm{\%} while reducing orientation jerk by 88\text{\,}\mathrm{\%}, handling a broken axle and unstructured terrain together.

VII Limitations and Conclusion

Detection contrasts a reference and a target window, so slowly developing changes produce little signal and are absorbed only offline. Parameters and residuals need not be uniquely identifiable from a short trajectory, so inferred values should be read together with the downstream policy result. Fine-tuning updates persist across rounds, so returning to an earlier regime does not by itself restore earlier behavior; regime-indexed policies selected by the NFC posterior, and pairing the anomaly trigger with a recovery policy, are natural extensions.

NFC jointly calibrates simulator physics and residual fidelity—residual dynamics and residual environment—for informative online fine-tuning. With sequential latent NFC and optimistic hallucination, it delivers accurate posteriors at real-time cost and, on real rough terrain with a broken axle, lifts success from 52\text{\,}\mathrm{\%} to 70\text{\,}\mathrm{\%} over calibration alone.

References

  1. [1] G. Authors (2024) Genesis: A Generative and Universal Physics Engine for Robotics and Beyond.
  2. [2] C. Bai, T. Xiao, Y. Chen, H. Wang, F. Zhang, and X. Gao (2022) Faster-LIO: Lightweight Tightly Coupled Lidar-Inertial Odometry Using Parallel Sparse Incremental Voxels. IEEE Robotics and Automation Letters 7 (2), pp. 4861–4868.
  3. [3] S. Bai, J. Z. Kolter, and V. Koltun (2018) An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. arXiv:1803.01271.
  4. [4] A. Bhardwaj, J. Rothfuss, B. Sukhija, Y. As, M. Hutter, S. Coros, and A. Krause (2024) Data-Efficient Task Generalization via Probabilistic Model-Based Meta Reinforcement Learning. IEEE Robotics and Automation Letters 9 (4), pp. 3918–3925.
  5. [5] R. I. Brafman and M. Tennenholtz (2002) R-max-a general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research 3 (Oct), pp. 213–231.
  6. [6] C. Cao, H. Zhu, Z. Ren, H. Choset, and J. Zhang (2023) Representation granularity enables time-efficient autonomous exploration in large, complex worlds. Science Robotics 8 (80), pp. eadf0970.
  7. [7] S. Curi, F. Berkenkamp, and A. Krause (2020) Efficient model-based reinforcement learning through optimistic policy search and planning. Advances in Neural Information Processing Systems 33, pp. 14156–14170.
  8. [8] Z. Z. Darban, G. I. Webb, S. Pan, C. C. Aggarwal, and M. Salehi (2025) CARLA: Self-supervised contrastive representation learning for time series anomaly detection. Pattern Recognition 157, pp. 110874.
  9. [9] A. Escontrela, J. Kerr, K. Stachowicz, and P. Abbeel (2024) Learning Robotic Locomotion Affordances and Photorealistic Simulators from Human-Captured Data. In 8th Annual Conference on Robot Learning,
  10. [10] P. Fankhauser, M. Bloesch, and M. Hutter (2018) Probabilistic Terrain Mapping for Mobile Robots with Uncertain Localization. IEEE Robotics & Automation Letters 3 (4), pp. 3019–3026.
  11. [11] I. Geles, L. Bauersfeld, A. Romero, J. Xing, and D. Scaramuzza (2024) Demonstrating Agile Flight from Pixels without State Estimation. In Proceedings of Robotics: Science and Systems, Delft, Netherlands.
  12. [12] A. Gleave, M. Dennis, C. Wild, N. Kant, S. Levine, and S. Russell (2020) Adversarial Policies: Attacking Deep Reinforcement Learning. In International Conference on Learning Representations,
  13. [13] D. Greenberg, M. Nonnenmacher, and J. Macke (2019) Automatic posterior transformation for likelihood-free inference. In International Conference on Machine Learning, pp. 2404–2414.
  14. [14] A. Hallak, D. D. Castro, and S. Mannor (2015) Contextual Markov Decision Processes. External Links: 1502.02259
  15. [15] A. Handa, A. Allshire, V. Makoviychuk, A. Petrenko, R. Singh, J. Liu, D. Makoviichuk, K. Van Wyk, A. Zhurkevich, B. Sundaralingam, and Y. Narang (2023) DeXtreme: Transfer of Agile In-hand Manipulation from Simulation to Reality. In 2023 IEEE International Conference on Robotics and Automation (ICRA), Vol. , pp. 5977–5984.
  16. [16] N. Hansen, H. Su, and X. Wang (2024) TD-MPC2: Scalable, Robust World Models for Continuous Control. In The Twelfth International Conference on Learning Representations,
  17. [17] N. Hansen (2016) The CMA evolution strategy: A tutorial. arXiv preprint arXiv:1604.00772.
  18. [18] H. He, P. Wu, C. Bai, H. Lai, L. Wang, L. Pan, X. Hu, and W. Zhang (2024) Bridging the Sim-to-Real Gap from the Information Bottleneck Perspective. In 8th Annual Conference on Robot Learning,
  19. [19] E. Heiden, C. E. Denniston, D. Millard, F. Ramos, and G. S. Sukhatme (2022) Probabilistic Inference of Simulation Parameters via Parallel Differentiable Simulation. In 2022 International Conference on Robotics and Automation (ICRA), Vol. , pp. 3638–3645.
  20. [20] E. Heiden, M. Macklin, Y. S. Narang, D. Fox, A. Garg, and F. Ramos (2021) DiSECt: A Differentiable Simulation Engine for Autonomous Robotic Cutting. In Proceedings of Robotics: Science and Systems, Virtual.
  21. [21] E. Heiden, D. Millard, E. Coumans, Y. Sheng, and G. S. Sukhatme (2021) NeuralSim: Augmenting Differentiable Simulators with Neural Networks. In 2021 IEEE International Conference on Robotics and Automation (ICRA), Vol. , pp. 9474–9481.
  22. [22] J. Hertrich (2024) Fast Kernel Summation in High Dimensions via Slicing and Fourier Transforms. SIAM Journal on Mathematics of Data Science 6 (4), pp. 1109–1137.
  23. [23] D. Hoeller, N. Rudin, D. Sako, and M. Hutter (2024) ANYmal parkour: Learning agile navigation for quadrupedal robots. Science Robotics 9 (88), pp. eadi7566.
  24. [24] K. Hsu, A. Z. Ren, D. P. Nguyen, A. Majumdar, and J. F. Fisac (2023) Sim-to-Lab-to-Real: Safe reinforcement learning with shielding and generalization guarantees. Artificial Intelligence 314, pp. 103811. External Links: ISSN 0004-3702
  25. [25] K. Hsu, V. Rubies-Royo, C. Tomlin, and J. F. Fisac (2021) Safety and Liveness Guarantees through Reach-Avoid Reinforcement Learning. In Proceedings of Robotics: Science and Systems, Virtual.
  26. [26] P. Huang, X. Zhang, Z. Cao, S. Liu, M. Xu, W. Ding, J. Francis, B. Chen, and D. Zhao (2023) What went wrong? closing the sim-to-real gap via differentiable causal discovery. In Conference on Robot Learning, pp. 734–760.
  27. [27] T. Jaksch, R. Ortner, and P. Auer (2010) Near-optimal Regret Bounds for Reinforcement Learning. Journal of Machine Learning Research 11 (51), pp. 1563–1600.
  28. [28] F. Jenelten, J. He, F. Farshidian, and M. Hutter (2024) DTC: Deep Tracking Control. Science Robotics 9 (86), pp. eadh5401.
  29. [29] G. Koch, R. Zemel, R. Salakhutdinov, et al. (2015) Siamese neural networks for one-shot image recognition. In ICML deep learning workshop, Vol. 2, pp. 1–30.
  30. [30] M. Kulkarni, T. J. L. Forgaard, and K. Alexis (2023) Aerial Gym – Isaac Gym Simulator for Aerial Robots. External Links: 2305.16510
  31. [31] J. Lee, M. Bjelonic, A. Reske, L. Wellhausen, T. Miki, and M. Hutter (2024) Learning robust autonomous navigation and locomotion for wheeled-legged robots. Science Robotics 9 (89), pp. eadi9641.
  32. [32] Y. Lipman, R. T. Chen, H. Ben-Hamu, M. Nickel, and M. Le (2022) Flow matching for generative modeling. arXiv preprint arXiv:2210.02747.
  33. [33] D. Lopez-Paz and M. Oquab (2016) Revisiting classifier two-sample tests. arXiv preprint arXiv:1610.06545.
  34. [34] Y. J. Ma, W. Liang, H. Wang, S. Wang, Y. Zhu, L. Fan, O. Bastani, and D. Jayaraman (2024) DrEureka: Language Model Guided Sim-To-Real Transfer. In Proceedings of Robotics: Science and Systems,
  35. [35] M. Memmel, A. Wagenmaker, C. Zhu, D. Fox, and A. Gupta (2024) ASID: Active Exploration for System Identification in Robotic Manipulation. In The Twelfth International Conference on Learning Representations,
  36. [36] F. Muratore, T. Gruner, F. Wiese, B. Belousov, M. Gienger, and J. Peters (2022) Neural Posterior Domain Randomization. In Proceedings of the 5th Conference on Robot Learning, A. Faust, D. Hsu, and G. Neumann (Eds.), Proceedings of Machine Learning Research, Vol. 164, pp. 1532–1542.
  37. [37] D. P. Nguyen, K. Hsu, W. Yu, J. Tan, and J. F. Fisac (2024) Gameplay Filters: Robust Zero-Shot Safety through Adversarial Imagination. In 8th Annual Conference on Robot Learning,
  38. [38] K. Ota, D. K. Jha, D. Romeres, J. van Baar, K. A. Smith, T. Semitsu, T. Oiki, A. Sullivan, D. Nikovski, and J. B. Tenenbaum (2021) Data-Efficient Learning for Complex and Real-Time Physical Problem Solving Using Augmented Simulation. IEEE Robotics and Automation Letters 6 (2), pp. 4241–4248.
  39. [39] G. Papamakarios and I. Murray (2016) Fast \epsilon-free inference of simulation models with Bayesian conditional density estimation. NIPS’16, Red Hook, NY, USA, pp. 1036–1044. External Links: ISBN 9781510838819
  40. [40] F. Ramos, R. Possas, and D. Fox (2019) BayesSim: Adaptive Domain Randomization Via Probabilistic Inference for Robotics Simulators. In Proceedings of Robotics: Science and Systems, FreiburgimBreisgau, Germany.
  41. [41] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov (2017) Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347.
  42. [42] P. G. Sessa, M. Kamgarpour, and A. Krause (2022) Efficient model-based multi-agent reinforcement learning via optimistic equilibrium computation. In International Conference on Machine Learning, pp. 19580–19597.
  43. [43] F. Shi, C. Zhang, T. Miki, J. Lee, M. Hutter, and S. Coros (2024) Rethinking Robustness Assessment: Adversarial Attacks on Learning-based Quadrupedal Locomotion Controllers. In Proceedings of Robotics: Science and Systems, Delft, Netherlands.
  44. [44] S. A. Sisson, Y. Fan, and M. M. Tanaka (2007) Sequential Monte Carlo without likelihoods. Proceedings of the National Academy of Sciences 104 (6), pp. 1760–1765.
  45. [45] S. Siva, M. Wigness, J. Rogers, and H. Zhang (2021) Enhancing Consistent Ground Maneuverability by Robot Adaptation to Complex Off-Road Terrains. In 5th Annual Conference on Robot Learning,
  46. [46] N. Sobanbabu, G. He, T. He, Y. Yang, and G. Shi (2025) Sampling-based system identification with active exploration for legged robot sim2real learning. arXiv preprint arXiv:2505.14266.
  47. [47] K. Stachowicz, L. Ignatova, and S. Levine (2024) Lifelong Autonomous Improvement of Navigation Foundation Models in the Wild. In 8th Annual Conference on Robot Learning,
  48. [48] K. Stachowicz and S. Levine (2024) RACER: Epistemic Risk-Sensitive RL Enables Fast Driving with Fewer Crashes. In Proceedings of Robotics: Science and Systems, Delft, Netherlands.
  49. [49] B. Sukhija, L. Treven, C. Sancaktar, S. Blaes, S. Coros, and A. Krause (2023) Optimistic Active Exploration of Dynamical Systems. In Thirty-seventh Conference on Neural Information Processing Systems,
  50. [50] G. Tiboni, A. Protopapa, T. Tommasi, and G. Averta (2023) Domain Randomization for Robust, Affordable and Effective Closed-Loop Control of Soft Robots. In 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Vol. , pp. 612–619.
  51. [51] J. Tobin, R. Fong, A. Ray, J. Schneider, W. Zaremba, and P. Abbeel (2017) Domain randomization for transferring deep neural networks from simulation to the real world. In 2017 IEEE/RSJ international conference on intelligent robots and systems (IROS), pp. 23–30.
  52. [52] E. Todorov, T. Erez, and Y. Tassa (2012) MuJoCo: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033.
  53. [53] Y. Tsai, H. Xu, Z. Ding, C. Zhang, E. Johns, and B. Huang (2021) DROID: Minimizing the Reality Gap Using Single-Shot Human Demonstration. IEEE Robotics and Automation Letters 6 (2), pp. 3168–3175.
  54. [54] M. T. Villasevil, A. Simeonov, Z. Li, A. Chan, T. Chen, A. Gupta, and P. Agrawal (2024) Reconciling Reality through Simulation: A Real-To-Sim-to-Real Approach for Robust Manipulation. In Proceedings of Robotics: Science and Systems, Delft, Netherlands.
  55. [55] J. B. Wildberger, M. Dax, S. Buchholz, S. R. Green, J. H. Macke, and B. Schölkopf (2023) Flow Matching for Scalable Simulation-Based Inference. In Thirty-seventh Conference on Neural Information Processing Systems,
  56. [56] F. Yang, C. Wang, C. Cadena, and M. Hutter (2023) iPlanner: Imperative Path Planning. In Proceedings of Robotics: Science and Systems, Daegu, Republic of Korea.
  57. [57] Y. Yu and L. Liu (2025) Neural fidelity calibration for informative sim-to-real adaptation. arXiv preprint arXiv:2504.08604.
  58. [58] Y. Yu, Y. Liu, F. Fu, S. He, D. Zhu, L. Wang, X. Zhang, and J. Li (2023) Fast extrinsic calibration for multiple inertial measurement units in visual-inertial system. In 2023 IEEE International Conference on Robotics and Automation (ICRA), Vol. , pp. 01–07.
  59. [59] Y. Yu, J. Xu, and L. Liu (2024) Adaptive Diffusion Terrain Generator for Autonomous Uneven Terrain Navigation. In 8th Annual Conference on Robot Learning,
  60. [60] Z. Yue, J. Wang, and C. C. Loy (2025) Efficient Diffusion Model for Image Restoration by Residual Shifting. IEEE Transactions on Pattern Analysis and Machine Intelligence 47 (1), pp. 116–130.
  61. [61] J. Zhang, C. Hu, R. G. Chadha, and S. Singh (2020) Falco: Fast likelihood‐based collision avoidance with extension to human‐guided navigation. Journal of Field Robotics 37, pp. 1300 – 1313.
  62. [62] Z. Zhuang, S. Yao, and H. Zhao (2024) Humanoid Parkour Learning. In 8th Annual Conference on Robot Learning,