Simulators are cheap places to train robot controllers, but controllers trained there often fail on hardware because the simulated physics is subtly wrong. One effective repair, called grounded action transformation, leaves the policy alone and corrects the simulator. A small learned network sits between the policy and the simulator. It rewrites each commanded action so that the simulator's next state matches what the real robot would have done. A few dozen real trajectories are enough to fit it. The catch is that every current version learns one correction for one fixed real condition. If the payload changes, the floor changes from tile to foam, or a joint wears, the correction is wrong and must be refit from new hardware data.
We propose to make the correction depend on a short, automatically inferred summary of the current physical condition. An encoder reads a handful of real transitions and produces a low-dimensional latent vector, a compact code standing in for unknown quantities such as friction or payload. The action-rewriting network then takes this code as an extra input. Real data from many conditions is pooled to train a single correction. A new condition then costs only the few transitions needed to infer its code, not a fresh grounding run. The policy is trained in the grounded simulator conditioned on the same code. In short, latent parameter discovery becomes the tool for cutting the hardware sample bill of simulator grounding when real physics varies.
Core Claim
A latent-conditioned action transformer, trained on pooled real data from $K$ physical conditions, will ground the simulator for an unseen $(K{+}1)$-th condition from one or two real trajectories. Its accuracy should match per-condition grounding methods that need far more data from that condition. The advantage over the simplest alternative, a context-conditioned policy trained under domain randomization, should appear specifically when the real mismatch includes effects the simulator cannot represent by changing its parameters. Examples are actuator delay, gear backlash, and nonlinear damping. We expect the advantage to vanish when the mismatch lies inside the randomized parameter range. That prediction is what makes the claim falsifiable.
Where This Sits
The grounding line supplies the method. Grounded Action Transformation composes a real forward model with an inverse simulator model and improved NAO walking speed from 19.52 to 27.97 cm/s using 65 hardware trajectories. RGAT trains the transformer end-to-end with RL to avoid compounding regression errors. GARAT recasts grounding as imitation from observation, using a discriminator between real and grounded-simulated transitions, and reports near-target performance from a single trajectory. SGAT adds a stochastic forward model and walked over concealed foam 9 of 10 times where deterministic GAT fell every time. All four learn $g(s,a)$ for one stationary target. That stationarity is exactly what we remove.
A second line motivates the latent: it shows that physical conditions can be summarized without labels. IIDA compresses context transitions into a vector that clusters by surface and weight. It reached 57.1% success on a real UR10 sliding task versus 42.6% for domain randomization. Perception-prediction networks recover latents correlating with log-mass at $R^2=0.90$. Modulated Neural ODEs separate time-invariant dynamics factors from state. Their caution that point-estimate latents are brittle out of distribution constrains our design: we keep the code low-dimensional and test extrapolation explicitly. None of these works uses the latent to correct a simulator. IIDA conditions a forward model and a planner on it.
Two latent-adaptation methods are the closest neighbors, and we contrast them directly. Found-adapt freezes a latent-conditioned policy and adapts only its latent in about six seconds. Its latent indexes behaviors the policy already learned in simulation, so it cannot express dynamics the simulator never produced. Our latent indexes corrections to the simulator, so unmodeled effects can be absorbed. V2A infers per-trajectory modality codes by expectation-maximization to filter heterogeneous offline data. On D4RL it scored a total of 1612.9 versus 1395.9 for DVDF across 24 tasks. V2A is offline curation only, but it supplies evidence that unlabeled, trajectory-level dynamics codes can be learned reliably from mixed data. We borrow its temporal-consistency idea for our encoder.
TuneNet adjusts explicit simulator parameters from one rollout and reached 87% success on a real bounce-shot task. It is the explicit-parameter counterpart. It cannot capture effects that lack a simulator knob, which our experiments isolate.
Research Program
The system has three learned parts. An encoder $q_\phi(z \mid C)$ maps a context set $C$ of real transitions $(s,a,s')$ from one condition to a code $z \in \mathbb{R}^d$ with $d \le 8$. It is a permutation-invariant set network, so the order of transitions does not matter. The transformer $g_\psi(s,a,z)$ outputs a replacement action $\hat a$ for the simulator. A discriminator $D_\omega(s,a,s',z)$ tries to tell real transitions from grounded-simulator transitions under the same code. Training follows GARAT's adversarial imitation, pooled across conditions:
$$\min_{\psi,\phi}\max_{\omega}\; \sum_{k=1}^{K} \mathbb{E}_{(s,a,s')\sim \mathcal{R}_k}\big[\log D_\omega(s,a,s',z_k)\big] + \mathbb{E}_{(s,a)\sim \mathcal{R}_k,\, s'\sim P_{sim}(\cdot\mid s, g_\psi(s,a,z_k))}\big[\log(1-D_\omega(s,a,s',z_k))\big].$$
Here $\mathcal{R}_k$ is the real data from condition $k$, and $P_{sim}$ is the simulator's transition. The code $z_k$ is drawn from $q_\phi$ applied to a context subset of $\mathcal{R}_k$ that is disjoint from the transitions being scored. Keeping these disjoint prevents the code from memorizing individual transitions.
Two safeguards keep the code meaningful. First, an auxiliary next-state prediction loss in the style of IIDA gives the encoder a dense signal, since adversarial gradients alone are noisy. Second, a small information penalty on $z$ stops the transformer from ignoring the simulator and rebuilding dynamics from the code. The policy $\pi(a \mid s, z)$ is then trained by standard RL inside the grounded simulator, sampling codes from those seen in training. At deployment on a new condition, the robot runs one or two exploratory trajectories with the current policy, infers $z$, and acts.
The key design choice is that grounding cost is paid once across many conditions. A new condition needs only inference, not new adversarial training. The main risk is that pooled adversarial training collapses or that $z$ ignores the condition. We monitor this by measuring how well $z$ predicts the hidden condition parameters with a linear probe ($R^2$), the same diagnostic used by perception-prediction networks. Episode-level codes cannot track mid-episode switches such as contact changes. A sliding-window encoder is a secondary variant, evaluated but not central to the claim.
Baselines
The naive reference point is a policy trained in the ungrounded simulator and run unchanged on each target condition. It defines the floor that any method must clear.
The strongest conceptual competitor is a context-conditioned policy trained under broad domain randomization. This is an IIDA-style encoder feeding the policy, with randomization over every simulator parameter that varies across target conditions. It never grounds anything and relies on the encoder to pick a behavior. It gets the same simulator compute and the same real context transitions at deployment, and its randomization ranges are tuned on held-out conditions with the same budget. On hardware, IIDA's version beat plain randomization 57.1% to 42.6%. That makes it the method to beat, not the plain randomization baseline.
The strongest grounding competitor is GARAT run separately per condition. It gets exactly the new condition's real trajectories, from one to fifty, with the same transformer architecture and tuning budget. GARAT claims strong one-trajectory grounding, but no reported numeric returns were found on Lacuna for GARAT. We therefore reproduce it on its own environments before comparing, and report how closely our reproduction matches its qualitative claims.
Explicit-parameter tuning in the style of TuneNet, followed by policy training in the tuned simulator, represents the system-identification answer. Found-adapt-style latent adaptation of a frozen simulator-pretrained policy represents adaptation without grounding. Neither paper reports numbers on our condition families: no reported result found on Lacuna for TuneNet or Found-adapt on shifted MuJoCo locomotion returns.
Three ablations isolate the key ingredient. A pooled GARAT transformer with no code tests whether conditioning matters at all. An oracle transformer given the true condition identity tests how much the unsupervised code loses. Removing the auxiliary prediction loss tests whether the encoder needs dense supervision. The upper reference is a policy trained directly in each target condition with millions of transitions.
Beating the competitors means the following. At one or two target trajectories, we must exceed per-condition GARAT's normalized return with non-overlapping confidence intervals over seeds. We must match per-condition GARAT at the trajectory count where it saturates. On the unmodeled-effect families, we must exceed the randomized context policy.
Why not just…?
Why not just train a context-conditioned policy under domain randomization and skip grounding? This is the real threat, and we do not argue it away. If every real difference can be reached by turning simulator knobs, randomization plus a context encoder may match us at lower cost. The evidence that it falls short elsewhere is indirect: GARAT reports that noise-envelope and randomization baselines failed on Ant and Minitaur, where grounding succeeded. Our experiment settles the question by splitting target families into in-span shifts (mass, friction) and out-of-span shifts (delay, backlash, nonlinear damping). We predict a tie on the first and a gap on the second. If no gap appears on out-of-span shifts, the proposal's central claim fails.
Why not just rerun GARAT for each new condition? GARAT may already ground well from one trajectory, which would erase our sample advantage. We test this directly with per-condition GARAT learning curves over target trajectory counts. Pooling should help most when single-condition data is too thin for adversarial training to stabilize. If per-condition GARAT is equally good at one trajectory, the amortization claim is false and we will report that.
Why not just tune explicit simulator parameters, as TuneNet does? For in-span shifts this may win outright, and it is more interpretable. IIDA reports implicit identification beating explicit identification on hardware. However, Gap 3 in the literature shows that no one has compared them head-to-head under equal sample budgets. Our design runs both under identical budgets of ten or fewer target trajectories. We expect TuneNet to win or tie when the shift has a simulator knob and to fail when it does not.
Proposed Experiments
We use the MuJoCo environments on which GARAT and RGAT were evaluated: Hopper, HalfCheetah, Walker, and Ant. We follow the sim-to-sim surrogate protocol, in which a modified MuJoCo plays "reality." For each environment we build a family of about thirty target conditions. In-span conditions vary mass and friction, as in Found-adapt's G and F shifts. Out-of-span conditions add action delay of one to four steps, deadband backlash, and velocity-squared damping that the source simulator cannot express. Training uses twenty conditions. Ten are held out, including some outside the training ranges, to probe the out-of-distribution weakness that MoNODE flagged.
The primary metric is target-condition return, normalized by the target-trained upper reference, plotted against the number of real trajectories from the new condition. Secondary metrics are grounding error, measured as discriminator accuracy and one-step state error between real and grounded transitions, and code quality, measured as linear-probe $R^2$ against the hidden parameters.
The decisive checks are three. First, at one or two trajectories, the latent-conditioned transformer must beat per-condition GARAT on held-out conditions. Second, it must beat the randomized context policy on out-of-span conditions while roughly tying on in-span ones. Third, the code ablation must lose most of the gain while the oracle recovers it, showing that the inferred condition rather than pooling alone does the work.
A stretch stage would repeat the in-span versus out-of-span comparison on a small legged or arm platform with swappable payloads. Every prior grounding result in this lineage except GAT and SGAT stayed in simulation, so we treat the hardware stage as confirmation rather than the basis of the claim.
References
- Grounded Action Transformation for Robot Learning in Simulation
- Reinforced Grounded Action Transformation for Sim-to-Real Transfer
- An Imitation from Observation Approach to Sim-to-Real Transfer
- Stochastic Grounded Action Transformation for Robot Learning in Simulation
- Context is Everything: Implicit Identification for Dynamics Adaptation
- Unsupervised Learning of Latent Physical Properties Using Perception-Prediction Networks
- Modulated Neural ODEs
- Latent Adaptation of Foundation Policies for Sim-to-Real Transfer
- Unifying Value Alignment and Assignment in Cross-Domain Offline Reinforcement Learning with Heterogeneous Datasets
- TuneNet: One-Shot Residual Tuning for System Identification and Sim-to-Real Robot Task Transfer