Introduction
A simulator can show a locomotion learner things the robot will never sense: its true base velocity, the disturbances acting on it, its friction and mass, its foot contacts. The deployed policy sees only proprioception: a stack of recent joint positions and velocities, its previous actions, the base angular velocity and orientation, the gait clock and the velocity command. The question this task asks is how the learner should use the privileged state during training so that the proprioceptive policy it deploys transfers to a second simulator it was never trained in.
The field offers a ladder of answers. The least invasive is the asymmetric actor-critic: give the privileged state to the critic only, so that it shapes advantages but never reaches the deployed network [1]; this is the Humanoid-Gym default [2]. Further up, the privileged state is distilled into the actor, either through a teacher's latent that a history encoder learns to regress [3], or through estimators and internal models trained on privileged targets [4, 5], or through representations aligned with the teacher's or the privileged view by contrastive learning [6, 7], or through a denoising world model [8].
Two things make the problem hard in ways that the training reward does not reveal. First, the deployed policy is judged in a simulator whose contact model, actuation and observation semantics differ from the training simulator's, so any feature the actor leans on that is specific to the training simulator becomes a liability, and the more the privileged path feeds the actor, the more such features it can supply. Second, as we found in our own development runs, transfer is not a monotone function of training: in the training simulator the return saturates, while transfer peaks early and then oscillates from checkpoint to checkpoint, so that the policy exported at the end of training is close to a lottery ticket drawn from that oscillation.
Method
Our method keeps the privileged state where the default puts it, in the critic, and changes three things about the deployed actor: what it can see, what it is trained to be invariant to, and which weights are exported. The actor and critic are the stock MLPs; the method adds no parameters to either.
What the actor sees, and what the critic sees
Absolute yaw is the one channel of the actor's observation that carries no information about how to walk and whose value depends on where an episode happens to start. We remove it architecturally: the deployed actor multiplies its 15-frame input by a fixed mask that zeroes the base yaw angle (index 46) in every 47-float frame, so neither training nor deployment can make the policy depend on it. The critic receives the full privileged history, with no channel removed: its mask is all ones. This is the asymmetric critic of the default [1, 2]; the privileged state enters training through the advantages and nowhere else.
def _yaw_mask():
m = torch.ones(FRAME_STACK * SINGLE_OBS_DIM)
for k in range(FRAME_STACK):
m[k * SINGLE_OBS_DIM + 46] = 0.0
return m
def _critic_mask():
# Ablation: full privileged critic (no diet).
return torch.ones(PRIV_FRAME_STACK * SINGLE_PRIV_DIM)
class YawInvariantPolicy(nn.Module):
def __init__(self, mlp):
super().__init__()
self.mlp = mlp
self.register_buffer("yaw_mask", _yaw_mask())
def forward(self, observations):
return self.mlp(observations * self.yaw_mask)That the critic keeps everything is a decision we came to late, and against our initial design. We explain why in Section 4.
Three invariances of the mean action
Let be the actor's mean action for the stacked observation , and write for the same quantity with the gradient stopped. On a slice of each PPO mini-batch (the first 24576 of its already shuffled rows) we add three losses, each of which states something that is true of good walking in any simulator.
Mirror equivariance. A left-right reflection of the robot should produce the reflected action. We write the reflection as a fixed permutation with sign flips, on each observation frame and on the 12-dimensional action: the two legs swap, the roll- and yaw-type joints, the lateral and yaw commands, the roll and yaw rates and the roll and yaw angles change sign, and the gait clock advances by half a cycle (its sine and cosine change sign), so that the mirrored left leg takes the stance role of the original right leg. The loss is
def _mirror_tensors(device):
"""Left-right mirror (sagittal reflection) of one 47-float frame and of the
12-float action: mirrored_frame[i] = sign[i] * frame[perm[i]]. Legs swap;
roll/yaw-type joint angles, vy, dyaw, ang-vel x/z and euler roll/yaw flip
sign; the gait clock advances half a cycle (sin, cos -> -sin, -cos) so the
mirrored left leg takes the stance role of the original right leg."""
joint_perm = [6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5]
joint_sign = [-1.0, -1.0, 1.0, 1.0, 1.0, -1.0] * 2
perm = list(range(SINGLE_OBS_DIM))
sign = [1.0] * SINGLE_OBS_DIM
sign[0] = -1.0
sign[1] = -1.0
sign[3] = -1.0
sign[4] = -1.0
for base in (5, 17, 29):
for j in range(12):
perm[base + j] = base + joint_perm[j]
sign[base + j] = joint_sign[j]
sign[41] = -1.0
sign[43] = -1.0
sign[44] = -1.0
sign[46] = -1.0
perm_t = torch.tensor(perm, dtype=torch.long, device=device)
sign_t = torch.tensor(sign, dtype=torch.float32, device=device)
act_perm = torch.tensor(joint_perm, dtype=torch.long, device=device)
act_sign = torch.tensor(joint_sign, dtype=torch.float32, device=device)
return perm_t, sign_t, act_perm, act_signConsistency under sensor noise and actuator delay. We perturb the observation, , in two ways. Each channel receives extra Gaussian noise at the scale the environment already uses for that channel (0.03 on joint positions, 0.015 on joint velocities, 0.06 on angular velocity and 0.018 on the orientation angles). And in every frame the previous-action channels are blended toward the action recorded one frame earlier,
with the oldest frame blended toward itself. This imitates an actuator delay of random length, so that the policy cannot rely on the exact meaning of its previous-action input. The loss asks the action not to move:
def _augment_obs(self, obs):
"""Sensor-noise + actuator-delay augmentation: extra proprioceptive
noise at the environment's scales, and previous-action channels blended
toward the action before them (random per-sample delay)."""
bsz = obs.shape[0]
x = obs.reshape(bsz, FRAME_STACK, SINGLE_OBS_DIM).clone()
x = x + torch.randn_like(x) * self.noise_scales
prev_act = x[:, :, 29:41]
shifted = torch.cat((prev_act[:, :1], prev_act[:, :-1]), dim=1)
alpha = torch.rand(bsz, 1, 1, device=self.device) * 0.6
x[:, :, 29:41] = (1.0 - alpha) * prev_act + alpha * shifted
return x.reshape(obs.shape)Temporal smoothness. We store, for every transition, the next actor frame and a validity flag that is zero when the transition ended an episode. Shifting the stack by one frame and appending that successor gives , and
where is the validity flag. Unlike the other two, this loss has no stop-gradient: both endpoints are pulled together.
The PPO objective becomes
with the clipped surrogate, clipped value loss, entropy term and learning-rate schedule of the stock implementation unchanged. The three weights are five times the ones we started with (0.1, 0.1 and 0.01); the stronger setting is what the final method uses.
# Simulator-independent invariance regularizers on the policy mean
sub = min(REG_SUBSAMPLE, obs_batch.shape[0])
obs_sub = obs_batch[:sub]
mu_sub = mu_batch[:sub]
mu_detached = mu_sub.detach()
mirror_loss = F.mse_loss(
self.actor_critic.policy_mean(self._mirror_obs(obs_sub)),
self._mirror_actions(mu_detached))
consistency_loss = F.mse_loss(
self.actor_critic.policy_mean(self._augment_obs(obs_sub)), mu_detached)
obs_next = torch.cat((obs_sub[:, SINGLE_OBS_DIM:], extras["next_actor"][:sub]), dim=1)
valid = extras["next_valid"][:sub]
temporal_loss = ((self.actor_critic.policy_mean(obs_next) - mu_sub).pow(2).mean(dim=-1, keepdim=True) * valid).sum() \
/ valid.sum().clamp(min=1.0)
loss = (surrogate_loss + self.value_loss_coef * value_loss - self.entropy_coef * entropy_batch.mean()
+ W_MIRROR * mirror_loss + W_CONSISTENCY * consistency_loss + W_TEMPORAL * temporal_loss)Export the trajectory average, not the last iterate
The third change addresses the oscillation of transfer late in training. With the number of learning iterations and , we keep a running sum of the actor's parameters at iterations , held as detached tensors on the CPU rather than as parameters, and after the final update we overwrite the actor with their mean,
The exported policy is therefore an average over the last nine tenths of training. The critic and the action standard deviation are not averaged; neither is part of the deployed mean policy.
def _snapshot_or_install(self):
total = self.num_learning_iterations or 3001
self.iteration += 1
start = max(1, int(0.1 * total))
actor = self.actor_critic.actor
if self.iteration >= start and (self.iteration - start) % 100 == 0:
with torch.no_grad():
flat = torch.cat([p.detach().reshape(-1).cpu() for p in actor.parameters()])
if self.snap_sum is None:
self.snap_sum = flat.clone()
else:
self.snap_sum += flat
self.snap_count += 1
if self.iteration >= total and self.snap_count > 0:
with torch.no_grad():
avg = (self.snap_sum / self.snap_count).to(self.device)
offset = 0
for p in actor.parameters():
n = p.numel()
p.copy_(avg[offset:offset + n].reshape(p.shape))
offset += nWeight averaging is a different lever from the invariance losses. The losses make each iterate smoother and less dependent on simulator-specific features; the average removes the part of the remaining variation between iterates that is not shared by them, which is what made the final iterate a lottery.
Results
| Method | ① | ② | ③ | |||
|---|---|---|---|---|---|---|
| Fall rate ↓ | Success rate ↑ | Fall rate ↓ | Success rate ↑ | Fall rate ↓ | Success rate ↑ | |
| Muse Wonder Full | 0.906 | 0.456 | 0.162 | |||
| Asymmetric actor-critic | 0.954 | 0.004 | 0.536 | 0.429 | 0.932 | 0.022 |
| Symmetric critic | 0.598 | 0.004 | 0.779 | 0.095 | 0.752 | 0.001 |
| RMA | 0.862 | 0.018 | 0.574 | 0.245 | 0.646 | 0.126 |
| DreamWaQ | 0.775 | 0.037 | 0.499 | 0.491 | 0.830 | 0.095 |
| Hybrid Internal Model | 0.766 | 0.023 | 0.576 | 0.392 | 0.756 | 0.136 |
| TAR | 0.780 | 0.014 | 0.344 | 0.645 | 0.526 | 0.170 |
| PvP | 0.960 | 0.003 | 0.730 | 0.262 | 0.994 | 0 |
| TAR, LSTM encoder | 0.947 | 0.002 | 0.543 | 0.412 | 0.888 | 0.025 |
| RMA, 50-step history | 0.950 | 0.010 | 0.440 | 0.435 | 0.394 | 0.233 |
| DWL | 0.986 | 0.002 | 0.615 | 0.369 | 0.602 | 0.066 |
- ① MuJoCo · mixed commands + unseen pushes
- ② MuJoCo · forward gait + payload range up to 1.25x body weight
- ③ MuJoCo · high-speed forward commands
Compared with the asymmetric actor-critic it builds on, our method is better on all three settings. On Push-recov its fall rate is 0.906 against 0.954; on Payload its success rate is 0.456 against 0.429; and on High-speed it is 0.162 against 0.022, the largest relative change of the three.
It is not ahead of the field on any of them. On High-speed it is third among our method and the ten published baselines, behind RMA, 50-step history [3] at 0.233 and TAR at 0.170. On Payload it is also third, behind TAR [6] at 0.645 and the DreamWaQ-style estimator at 0.491. On Push-recov it is in the middle: five of the ten baselines fall less often, the best of them being Symmetric critic [1] at 0.598, and five fall more often.
The absolute level of the fall rate on Push-recov is the most important number in the table for judging our method. Our development proxy, a harder suite of our own design in the second simulator, had our final policies falling in only a small minority of episodes; the measured fall rate on Push-recov is far higher than anything that proxy showed. Our proxy therefore did not represent at least one of the evaluated conditions, and our selection between variants, which was made entirely on that proxy, should be read with that in mind.
How we got here
The final method is not the one we set out to build. Our first design used the privileged state much more aggressively, and the method narrowed through a series of development runs, each trained end to end and evaluated on exported policies in the second simulator with our own nominal and stress suites. All figures in this section are our development measurements.
- Our starting thesis was a privileged belief, and a reduced critic. We first built a causal history encoder (per-frame embedding and a causal 1-D convolution) producing a belief vector and a velocity estimate, trained by its own optimiser on three targets taken from privileged state: base velocity, foot contacts, and a one-step forward prediction of clean proprioception. The critic was to see only privileged channels the actor could in principle infer, with the disturbance, friction and mass channels zeroed. The motivation came from work showing that naive asymmetric learning can fail under partial observability and that which privileged signals the critic receives matters; that work is outside this task's references and we do not cite it here. The yaw mask and the three invariance losses were part of this first design.
- The encoder transferred its estimate but not its walking. The velocity estimate transferred well (we measured an RMSE of 0.03 m/s in the second simulator), but the encoder variants plateaued lower in the training simulator (a return of 139 at iteration 711, against 176 for the default at iteration 992) and transferred worse than a plain MLP. We dropped the encoder and kept a "flat" variant: stock MLP, yaw mask, reduced critic, invariance losses. The estimator constants and the successor privileged frames this design needed are still present in the submitted files, unused.
- A probe found the load-bearing channel. Corrupting input channels of a trained default policy in the second simulator showed that zeroing or shifting yaw, zeroing joint velocities and flipping the gait clock each had no effect, while zeroing the previous-action channels made every episode fall. Those channels are blended by a randomised actuator delay in the training simulator, so their meaning depends on how a simulator models latency. This led us to the canonicalisation variant below; the delay blending in the consistency loss was already part of our first design.
- Canonicalising the action history peaked high and was seed-fragile. A stateful actor that carried its own raw action history and overwrote the previous-action channels identically in training and deployment peaked high early, but the family built on it (with regime-wise advantage normalisation and snapshot selection added) had poor finals on two training seeds, and we abandoned it.
- The reduced critic accelerated late fragility. Both reduced-critic variants developed severe falls under low friction later in training. Our hypothesis was that a critic blind to friction cannot centre advantages across friction regimes; normalising advantages within friction quartiles delayed the collapse but did not prevent it. Restoring the full critic removed the early falls on our suite, although its final policy was no better than the reduced-critic variant's and its tracking still oscillated late; we built the stronger regularisation on the full-critic variant, which is why the submitted critic mask is all ones.
- Selecting a snapshot by privileged return failed. We tried to export the snapshot with the best worst-friction-quartile return in the training simulator, at first with a bug that never updated the friction tracker and then fixed, with a jitter tie-break. Because returns in the training simulator keep rising, it chose late snapshots, and its finals ranged from excellent to a complete failure across seeds.
- Smoothness tracked transfer, so we strengthened it. Across our checkpoints, action jitter correlated at about with stress-suite success in our own analysis. Raising the three loss weights fivefold on the full-critic variant kept jitter lowest and gave the most durable training curves; in its best training run the final policy reached 0.958 success on our stress suite, against 0.562 for the default's final policy.
- Averaging rescued the hostile initialisation. One random initialisation made every family we trained from it collapse at some point. For the strongly regularised variant, a raw mid-training checkpoint from that initialisation scored 0.156 on our stress suite, while the average of the snapshots up to the same point scored 0.844. Averaging cost a little where training had gone well. With averaging, all three of our training runs ended with final policies that held up on our stress suite, with the best mean and the best worst case of any family we trained, and that is what we submitted.
Limitations
- The method says little about privileged information. The research question is how to use the privileged state; our answer is to give all of it to the critic, which is the default. Every gain over the default comes from changes to the actor's inputs, its training losses and its export, none of which uses privileged state. The successor privileged frames are stored and never used.
- It is behind the best baselines everywhere. Methods that feed the privileged state into the actor, TAR and RMA with a long history among them, are ahead on Payload or High-speed, and five baselines fall less often on Push-recov, the symmetric critic by a wide margin. Our evidence for keeping the full critic is mixed even on our proxy, and it does not come from the measured settings.
- Our proxy was miscalibrated. All variant selection was done on our own suites in the second simulator, on few episodes per checkpoint, and those suites showed low fall rates where Push-recov shows a high one. The development measurements in Section 4 rank variants against each other under that proxy; they do not predict the measured results.
- Averaging assumes training runs to completion. The average is installed only after the iteration count is reached; a run stopped early exports its last iterate and loses the protection. The averaging window and spacing are fixed constants, and averaging a trajectory that passes through different gaits can in principle produce weights that walk worse than either.
- The code carries a stale description. The comment above the masks still describes a critic restricted to inferable channels, while the mask keeps every channel; the estimator weights in the update file are leftovers of the abandoned encoder. Neither affects what runs.
- The mirror map is hand-written. The sign and permutation pattern encodes our reading of the robot's joint conventions and observation layout. It was not tested in isolation, and an error in it would pull the policy toward a wrong symmetry rather than fail loudly.
References
- Lerrel Pinto, Marcin Andrychowicz, Peter Welinder et al. (2018). Asymmetric Actor Critic for Image-Based Robot Learning. RSS.
- Xinyang Gu, Yen-Jen Wang, Jianyu Chen (2024). Humanoid-Gym: Reinforcement Learning for Humanoid Robot with Zero-Shot Sim2Real Transfer. ICRA.
- Ashish Kumar, Zipeng Fu, Deepak Pathak et al. (2021). RMA: Rapid Motor Adaptation for Legged Robots. RSS.
- I Made Aswin Nahrendra, Byeongho Yu, Hyun Myung (2023). DreamWaQ: Learning Robust Quadrupedal Locomotion With Implicit Terrain Imagination via Deep Reinforcement Learning. ICRA.
- Junfeng Long, Zirui Wang, Quanyi Li et al. (2024). Hybrid Internal Model: Learning Agile Legged Locomotion with Simulated Robot Response. ICLR.
- Amr Mousa, Neil Karavis, Michele Caprio et al. (2025). TAR: Teacher-Aligned Representations via Contrastive Learning for Quadrupedal Locomotion. IROS.
- Mingqi Yuan, Tao Yu, Haolin Song et al. (2026). PvP: Data-Efficient Humanoid Robot Learning with Proprioceptive-Privileged Contrastive Representations. CVPR.
- Xinyang Gu, Yen-Jen Wang, Xiang Zhu et al. (2024). Advancing Humanoid Locomotion: Mastering Challenging Terrains with Denoising World Model Learning. RSS.