Introduction
A whole-body motion tracker is one policy that makes a simulated 29-joint humanoid follow any clip of a motion library, from walking to floor work, by setting joint position targets at 50 Hz. The task asks for a learning system that does two things on one GPU: reach a target tracking return as early as possible in wall-clock time, and hold a policy at the end of training that still tracks well under perturbations, on recordings it never saw and on clips from another motion collection.
The tracking problem itself follows BeyondMimic [1], where it was solved with PPO [2]; the starter is that configuration. The fastest recent methods instead differentiate the tracking return. SuperMimic backpropagates through imagined rollouts of a learned world model [3], BlinkMimic and XMimic make that loop fast enough to train in minutes [4, 5], and Mimic differentiates through the physics engine itself [6]. Three properties of the problem shape what we built on top of this loop.
The gradient the policy needs is the model's least reliable part. Backpropagation through a world model uses , the response of the next state to a change of command. A model fitted to on-policy trajectories sees each state with essentially one command, so this response is identified only through the variation the policy happens to produce, and near contact changes it is often wrong.
The fast simulator is not the evaluated one. The provided fused engine runs a control step of thousands of robots in a few milliseconds and gives analytic gradients, but it simulates the robot without the ankle coupling limits of the evaluated model. A learner that collects its data there inherits that difference.
What is handed over is a deterministic policy trained under noise. The collector explores with Gaussian action noise, and the policy learns to operate in the state distribution that noise creates. The deployed policy is the noise-free mean. In our development runs this gap grew with training time, so a learner whose training return kept rising could hand over a policy that tracked worse.
Method
Our learner keeps the loop of the world-model methods: collect transitions in a batch of simulated robots, fit a world model to them, and update the policy by backpropagation through imagined rollouts of that model, with a critic for the return beyond the horizon [3, 4]. The code started from a copy of the XMimic baseline [5] and keeps several components that its own comments attribute to BlinkMimic (Muon for matrix parameters, a semi-implicit world model with mirror augmentation, an exponential moving average of the policy with decay 0.99 as the handed-over network). What we changed is how the simulator is used, how the model is identified, how the action is parameterized, and how the policy to hand over is chosen. Training runs in JAX on the fused engine with 3072 simulated robots; the deployed policy is a PyTorch module.
Correcting the fast engine with an identified impulse
Before training, we fit the part of the dynamics that the fused engine leaves out. We draw reference states from the training library, half of them among the frames whose joint configuration lies closest to the limits of the robot's joint tendons, perturb them, and step both the exact differentiable build of the evaluation's simulation and the fused engine from the same state with the same command. For each tendon limit with unit normal and bound the features are the penetrations and before and after the fast step and the corresponding normal speeds , expanded into a small basis of averaged and deepest penetration, approach and separation speeds and a crossing fraction, all gated by activity. A ridge regression maps these features to the difference between the two simulators' next states,
and the correction is applied to velocities and poses after every step of the fast engine, in collection as well as in the paired interventions below.
for step in range(4):
f = torch.minimum(f + 1, library.clip_end[library.clip_of_frame[f]] - 1)
ctrl = library.joint_pos[f] + lag * library.joint_vel[f] + 0.3 * scale * jitter(library.joint_pos[f])
aq, av, aw = exact.step(q, v, ctrl, warm, friction=friction, com_offset=com)
torch.cuda.synchronize(device)
bq, bv, bw = fast.step(q, v, warm, ctrl, friction, com)
torch.cuda.synchronize(device)
pen0, pen1 = q[:, 7:] @ normal - upper, bq[:, 7:] @ normal - upper
speed0, speed1 = v[:, 6:] @ normal, bv[:, 6:] @ normal
samples.append(torch.cat((pen0, pen1, speed0, speed1), -1))
inv = diffsim.quat_conjugate(bq[:, 3:7])
vel = torch.cat((diffsim.quat_rotate(inv, av[:, :3] - bv[:, :3]), av[:, 3:] - bv[:, 3:]), -1)
dq = diffsim.quat_multiply(inv, aq[:, 3:7])
orientation = 2.0 * torch.where(dq[:, :1] >= 0, dq[:, 1:], -dq[:, 1:])
pose = torch.cat(
(diffsim.quat_rotate(inv, aq[:, :3] - bq[:, :3]), orientation, aq[:, 7:] - bq[:, 7:]), -1
)
targets.append(torch.cat((vel, pose / 0.02), -1))
q, v, warm = (aq, av, aw) if step % 2 == 0 else (bq, bv, bw)A world model identified by paired interventions
The world model predicts the increment of the state over one control step in the robot's heading frame. It is a residual on an analytic prior: we linearize four semi-implicit substeps of the joint PD servos around the default pose with the floating-base mass matrix, which gives a response matrix , and form the motor effort with the servo lag and the action scale. The predicted increment is
where is a three-layer MLP of width 1024 and the randomized dynamics context. It is trained on open-loop windows of five steps, half of each batch mirrored left to right.
The new ingredient is a second loss. In one collection step out of four, every robot is stepped twice from the same state: once with the policy's action and once with , . The second outcome is not used for training the policy; it is stored with the transition.
# Matched one-step interventions identify action sensitivities, including changes of contact mode.
da = 0.35 * jax.random.normal(k_delta, a.shape)
other_target = sim.default_q + sim.alpha * (a + da) + env["xi"][:, sim.layout.joint_offset]
initial = env["data"]
has_pair = carry["buf"]["ptr"] % INTERVENTION_STRIDE == 0
env, out = sim.step_core(consts["model"], motion, env, a)
alternate = jax.lax.cond(
has_pair,
lambda: flatten_state(sim.state(sim.physics(consts["model"], initial, other_target))),
lambda: out["s1"],
)
alt = unflatten_state(alternate)
out = {**out, "alt": flatten_state(alt), "da": da}For the paired transitions the model must reproduce the measured velocity difference , where collects body-frame linear and angular root velocity and joint velocities, from its own two predictions, . This is a secant, not a tangent: it identifies the finite response to a change of command, including a change of contact mode. We weight it by generalized least squares. Until the nominal prediction is accurate, its own error bounds how precisely a difference can be fitted, so the scale is
a pseudo-Huber loss on the standardized misfit. Coordinates that the model already predicts well acquire their sensitivity first.
# A matched alternative command identifies the local response at fixed state.
paired = intervention_indices(w["s"].shape[0])
start = tuple(x[paired] for x in pre["S0"])
other, _ = self._wm_step(wm, wm_b, start, w["a"][paired, 0] + w["da"][paired], xi_n[paired, 0])
rot = start[1]
shift = self.velocity_difference(tuple(x[paired] for x in preds[0]), other, rot)
actual = self.velocity_difference(
tuple(x[paired, 0] for x in pre["T"]), unflatten_state(w["alt"][paired]), rot
)
# Generalized least squares: until the nominal response is accurate,
# its measured velocity error sets a floor on the precision of a
# paired target. Reliable coordinates acquire their sensitivity first.
baseline = self.velocity_difference(tuple(x[:, 0] for x in pre["T"]), preds[0], pre["S0"][1])
residual_variance = sg(jnp.mean(jnp.square(baseline), axis=0))
std = jnp.sqrt(wm_b["contrast_norm"]["var"] + residual_variance + 1.0e-4)
misfit = (shift - actual) / std
huber = 2.0 * (jnp.sqrt(1.0 + misfit * misfit) - 1.0)
loss += (len(paired) / w["s"].shape[0]) * c.wm_window * huber.mean()A structured, mirror-symmetric policy
The policy does not output the joint targets directly. For each joint we solve, in closed form, a finite-horizon tracking problem for the linearized servo: a quadratic cost on position and velocity errors, weighted by how much each joint moves the tracked bodies at the default pose, plus a rate penalty, over a horizon of 50 control steps whose reference is a cubic Hermite spline through the policy's ten preview frames. The first optimal move of that problem gives a feed-forward gain on the preview (), feedback gains on the current joint error () and a carry-over of the previous action. The network adds a correction scaled by , :
The last term is a Reynolds projection: the same encoder-decoder network is evaluated on the observation and goal and on their sagittal mirror images, and the two outputs are averaged after mirroring back with the joint permutation and sign flips , so the policy is exactly symmetric while it learns. The observation history contains joint errors against the reference, an actuator deflection term , and a support odometry: from an exact finite Fourier series of the leg kinematics we compute, for each foot, the root velocity and height that a stationary sole would imply, relative to the reference's, which gives the policy feedback on the pelvis translation it cannot measure. The goal holds ten reference frames at the uneven offsets 1, 2, 3, 5, 8, 12, 18, 26, 37 and 50 steps.
def pi_apply(params, bufs, obs_hist, goal, ref, z=None, previous=0.0, current=None):
"""a = dec(enc(g), o_{t-9..t}) + (q_ref(f+1) - q0) / alpha (--pi_ref_skip); ref = (goal offset of q(f+1), q0, alpha)."""
off, q0, alpha, lag, retain, control, perm, sign = ref
# Reynolds projection of a single shared actor over sagittal reflection.
pair = jnp.stack((obs_hist, mirror_observation(jnp, obs_hist, perm, sign)), axis=0)
o = rn_apply(bufs["obs_norm"], pair).reshape(pair.shape[:-2] + (-1,))
pair_goal = jnp.stack((goal, mirror_goal(jnp, goal, perm, sign)), axis=0)
if z is None:
z = pi_encode(params, bufs, pair_goal)
a = mlp_apply(params["dec"], jnp.concatenate((z, o), -1), jax.nn.elu)
a = 0.5 * (a[0] + mirror_joint(a[1], perm, sign))
J = a.shape[-1]
gain_q, gain_v, x_gain, keep = control
if current is None:
current = (goal[..., off : off + J], goal[..., off + J : off + 2 * J] * 10.0)
q = (obs_hist[..., -1, :J] + current[0] - q0) / alpha
qd = (obs_hist[..., -1, J : 2 * J] + current[1]) / alpha
feed = preview_feedforward(goal, q0, alpha, gain_q, gain_v)
return keep * previous + feed + x_gain[0] * q + x_gain[1] * qd + (1.0 - retain) * aPolicy learning in imagination
The policy is updated on 1024 imagined rollouts of steps per iteration, started from replayed states with their observation histories rebuilt as the deployed policy would see them, with sensor noise and pushes drawn inside the imagination. The objective is
with the task's tracking reward plus a foot-contact term of weight 0.25 and a sigmoid relaxation of the termination test. Because the world-frame root position term is the only one that depends on horizontal translation, and the model's error in translation compounds, we add to the bootstrap a term computed from the translation the simulator actually produced after the same replayed start, weighted by how closely the imagined end state agrees with the recorded one. Training starts are drawn from bins of the library by an empirical-Bayes estimate of each bin's return, pooled across bins with similar kinematics (k-means on heading-invariant motion descriptors), with 30% of starts placed before recent failures.
Choosing the policy to hand over
Three mechanisms run outside the learner and change only the network that is handed over.
Drift-aware averaging. Over the last snapshots (taken every 500 iterations, at most seven) we model the policy's action on a fixed set of probe inputs as linear in time plus noise, estimate the drift and the residual variance , and choose convex weights that minimize the risk . Averaging is applied only when the estimated gain is positive, and it is shrunk toward the current snapshot by how far the averaged network's actions differ from the averaged actions.
Marginalizing the collector's noise. The policy was trained in a closed loop where every command carried noise of standard deviation 0.1, and that noise reaches the network through the joint positions, velocities and previous commands in its history. We propagate it through the linearized servo of each joint, a stationary two-state system, with an adjoint over the ten history slots plus the stationary covariance of the initial state, and obtain for each neuron of the decoder's first layer the standard deviation of its pre-activation. The deterministic policy then uses, in that layer only, the expected activation under that noise, by three-point Gauss-Hermite quadrature:
@torch.inference_mode()
def deviations(self, actor):
J, H, D = actor.J, actor.H, actor.obs_mean.numel()
layer = actor.dec[0]
weights = layer.weight[:, -H * D :].reshape(layer.out_features, H, D)
weights = weights * (actor.obs_var + 1.e-4).rsqrt()
command = weights[:, :, 2 * J + 6 : 3 * J + 6]
pos = weights[:, :, :J] - command / actor.ref_alpha
vel = weights[:, :, J : 2 * J] - command * actor.damping_time / actor.ref_alpha
state_weight = torch.stack((pos, vel), -1)
sensitivity = torch.zeros_like(state_weight[:, 0])
energy = torch.zeros(layer.out_features)
for t in reversed(range(H)):
sensitivity = state_weight[:, t] + torch.einsum("nji,jik->njk", sensitivity, self.A)
direct = command[:, t] + (sensitivity * self.B).sum(-1)
energy.add_(direct.square().sum(-1))
initial = torch.einsum("nji,jik->njk", sensitivity, self.A)
energy += (torch.einsum("nji,jik->njk", initial, self.covariance) * initial).sum((1, 2))
return (self.noise * energy.clamp_min(0.0).sqrt(),)Paired physical selection. On a CPU thread, alongside training, we compare four policies on the same short trajectories in double-precision CPU MuJoCo with the robot model of the differentiable build: the current snapshot, a slow average of snapshots with rate , the current snapshot with the marginalized first layer, and the policy deployed so far. Half the trajectories are nominal and half carry the training randomization of friction, centre of mass, encoder bias, sensor noise and pushes, identical for all four policies. Every comparison is paired, with the threshold for four policies; a challenger whose lower bound clears the incumbent is then confirmed on a separate set of trajectories three times as long before it is deployed. The comparisons become rarer as training goes on, every snapshots.
observations.append(scores)
sample = np.concatenate(observations, axis=1)
diff = sample[:3] - sample[3]
improvement = diff.mean(axis=1)
error = diff.std(axis=1, ddof=1) / math.sqrt(sample.shape[1])
lower = improvement - z * error
if lower.max() > 0.0 or (improvement + z * error).max() < 0.0:
break
# Prefer the short or long average when joint rollouts cannot resolve
# a gain from the extra marginalization. All comparisons are paired.
arm = 3
for challenger in (1, 0, 2):
if not lower[challenger] > 0.0:
continue
pair = sample[challenger] - sample[arm]
if arm == 3 or pair.mean() > z * pair.std(ddof=1) / math.sqrt(pair.size):
arm = challenger
statistics = (tuple(improvement.tolist()), tuple(error.tolist()))
if arm != 3:
# After one discounted time constant a locally competent controller
# may still drift or lose balance. Confirm the same improvement on
# an independent bank at three time constants (95% reward mass).Finally, the handed-over module recomputes the reference velocities it receives from the reference poses in the convention of the training library, which it estimates at start-up, and replaces a given velocity only beyond a dead zone set by the library's own residuals. The training libraries' velocities match centred pose differences, and in our development tests the correction left the actions on them unchanged.
Results
| Method | ① | ① | ② | ② | |||
|---|---|---|---|---|---|---|---|
| Time to target return ↓ | Perturbed tracking return ↑ | Held-out tracking return ↑ | Other-collection return ↑ | Time to target return ↓ | Perturbed tracking return ↑ | Held-out tracking return ↑ | |
| GPT-6.2 Astra | 165.3 | 0.878 | 0.885 | 0.846 | 173.3 | 0.946 | 0.959 |
| PPO, BeyondMimic configuration | 10,800 | 0.334 | 0.544 | 0.567 | 10,800 | 0.678 | 0.690 |
| SuperMimic | 2,117 | 0.826 | 0.794 | 0.797 | 3,256 | 0.923 | 0.932 |
| InstantTrack | 428.0 | 0.824 | 0.796 | 0.775 | 2,986 | 0.858 | 0.873 |
| BlinkMimic | 424.5 | 0.835 | 0.817 | 0.817 | 3,124 | 0.911 | 0.927 |
| XMimic | 313.8 | 0.836 | 0.823 | 0.815 | 2,845 | 0.911 | 0.927 |
| ∇Mimic | 1,112 | 0.792 | 0.813 | 0.823 | 9,246 | 0.888 | 0.915 |
| BlinkMimic 2 | 833.0 | 0.809 | 0.803 | 0.818 | 575.0 | 0.926 | 0.946 |
- ① MuJoCo Warp Unitree G1 · LAFAN1, 33 clips, 2 h of motion · time to a 0.82 tracking return
- ① MuJoCo Warp Unitree G1 · LAFAN1, 33 clips, 2 h of motion · time to a 0.82 tracking return
- ② MuJoCo Warp Unitree G1 · LAFAN1, 33 clips, 2 h of motion · tracking return at the end of the budget, under perturbations, on held-out takes and on another motion collection
- ② MuJoCo Warp Unitree G1 · LAFAN1, 33 clips, 2 h of motion · tracking return at the end of the budget, under perturbations, on held-out takes and on another motion collection
Our method is ahead of every published baseline on all four settings and on every metric reported there. The time to target is 165.26 s on Small (time), against 313.85 s for the fastest baseline, XMimic [5], and 173.27 s on Large (time), against 574.96 s for BlinkMimic 2. The end-of-training policies are ahead as well. On Small (return) the perturbed return is 0.878 against 0.836 (XMimic [5]), the held-out return 0.885 against 0.823 (XMimic [5]), and the cross-collection return 0.846 against 0.823 (∇Mimic [6]). On Large (return) the perturbed return is 0.946 against 0.926 (BlinkMimic 2) and the held-out return 0.959 against 0.946 (BlinkMimic 2). The margins on Small (return) are wider than on Large (return), where the strongest baselines already reach higher returns.
These are single runs per setting, and the method combines many changes at once. The table does not say which of them carries the gain; our development measurements below give partial evidence for some of them and none for others.
How we got here
Our first learner did not use a world model. It differentiated a tracking-error objective over short simulated rollouts of 0.4 s, with the gradients turned into smooth joint-target corrections. It produced accurate postures and poor balance: in our development runs it reached a return of 0.128 on complete clips of one training library after 294 s, where the XMimic baseline reached 0.846 after 396 s. Adding a privileged critic that estimates the probability of a fall (our second version) helped but did not close the gap. While that version was still training, we copied the XMimic code and rebuilt our ideas on its world-model loop.
- Paired interventions came from the diagnosis of that gap. We tested two explanations, delayed credit for falls and wrong action gradients near contact changes, and identified the action response directly by stepping the simulator a second time from the same state. Accounting for configuration and foot support in the dynamics estimate reduced the normalized action-response error on 1,600 paired simulator transitions from 0.495 to 0.352 in our development check.
- Probing every transition was too expensive. Removing the second step entirely reached the target earlier in our development runs than probing every transition. We kept one probe in four and the variance weighting that lets the paired loss grow in influence as the nominal predictions become accurate.
- Symmetry after the fact hurt. Averaging an asymmetrically trained policy with its mirror image helped on short clips but lowered full-clip return in our development run from 0.819 to 0.761, because it changes the drift the policy has learned to correct. Projecting onto the symmetric policy during learning, as in the final code, avoids that shift.
- The engine's missing ankle limits were measured, not assumed small. On held-out transitions where the limits were active, the fitted impulse model cut the fast engine's joint-velocity error by more than half in our development check.
- Equal-weight checkpoint averaging lowered returns; drift-aware averaging raised them. At 200 s, the drift-aware rule raised full-clip return in our development measurements from 0.813 to 0.834 on one library and from 0.916 to 0.921 on a sample of the other. Later in training the same rule helped on one library and hurt on the other, which is why the paired physical selection decides.
- The deployed policy degraded while the collector improved. In long development runs the noise-free policy tracked worse over time while the training reward rose. Replaying the collector's action noise in a physical trial of a 98-minute policy raised its return from 0.895 to 0.944, while changing the ankle constraints or the IMU timing had little effect. This led first to retaining policies by paired trials and then to the analytic marginalization, whose first-layer variance agreed with an independent covariance computation to within two parts in ten million. In a paired development test on perturbed recordings, handing over the latest network directly gave 0.601 and 0.754 on the two libraries, and the final deployment rule 0.804 and 0.867 on the same starts and disturbances.
- An ensemble was left out. A larger ensemble of policies improved some external test sets, but parameter averaging and a distilled symmetric readout recovered only part of that gain, and we did not put the oversized ensemble in the submission.
For these checks we used, besides the training libraries, public recordings of the same robot from outside both libraries. The evidence for the last design step was mixed there: confirming a challenger at two horizons rather than one gave 0.805 against 0.790 on one library and 0.868 against 0.881 on the other in our development test, differences of about one paired standard error.
Limitations
- Many parts, no ablation on the scored settings. The learner changes the simulator, the world model's loss, the action parameterization, the observation, the start distribution and four steps of deployment at once. Our development measurements support some of these choices individually; the published results cannot attribute the gain to any of them.
- Robot-specific derivations. The preview controller and the noise marginalization linearize the joint servos around the default pose, the impulse correction covers only joint-type tendon limits, and the odometry uses the exact geometry of this robot's capsule soles. Each would have to be rederived for another robot, and the linearization is least accurate exactly in the dynamic motions where tracking is hardest.
- Deployment depends on host resources. The paired selection runs CPU MuJoCo trials in a thread next to the learner, and its results arrive one snapshot interval late. If the CPU simulator is unavailable the code falls back to the averaged policy, and on a slower host the learner waits for a comparison that has not yet finished. As our own docstring says, a retained policy can also survive a systematic simulator discrepancy that lasts longer than the averaging windows.
- The selection sees only the training library. Its trajectories are drawn from the library being trained on, under the training randomization. Our mixed development result for the two-horizon confirmation shows that a choice that helps on the source can cost on other recordings.
- The marginalization is a first-layer approximation. It accounts for the collector's noise only at the decoder's first nonlinearity and only through a linear servo model, and it is chosen per snapshot by the paired test rather than applied unconditionally.
- One run per setting. The table reports one training run per setting, so we cannot say how much of the margin is variation between runs. The cross-collection return is reported for Small (return) only.
References
- Qiayuan Liao, Takara E. Truong, Xiaoyu Huang et al. (2025). BeyondMimic: From Motion Tracking to Versatile Humanoid Control via Guided Diffusion.
- John Schulman, Filip Wolski, Prafulla Dhariwal et al. (2017). Proximal Policy Optimization Algorithms.
- Qiayuan Liao, Yiyang Shao, Junfeng Long et al. (2026). SuperMimic: Scaling Humanoid Whole-Body Control with One Differentiable World Model. CoRL.
- Fuyi Chen (2026). BlinkMimic: Training a Humanoid Motion Tracker in Minutes on a Single GPU.
- Nico Bohlinger, Jan Peters (2026). XMimic and XSoma: Learning Humanoid Motion Tracking and Locomotion in Under a Minute.
- Weyl Lu, Yubei Chen (2026). $\nabla$Mimic: Ultra-Efficient Humanoid Control with Differentiable Simulation.