Introduction
A humanoid walking policy trained in one simulator is deployed in another, and it sees only what the robot can sense: a stack of noisy joint positions and velocities, its previous actions, the base angular velocity and orientation, and the velocity command. During training, though, the simulator can show the learner much more: the true body velocity, the forces on the base, the friction and mass it has randomised, and which foot is in contact. The research question is how a learner should use that privileged state so that the proprioceptive policy it deploys keeps walking, and keeps tracking its command, after the physics changes.
The field has several answers. The asymmetric actor-critic gives only the critic the privileged state [1], and it is the default recipe in Humanoid-Gym [2]. Adaptation methods train a teacher on privileged state and distil an encoder of the proprioceptive history into a latent the policy can use [3]. Estimator methods regress the body velocity and a latent of the environment from history [4, 5]. Contrastive methods align proprioceptive and privileged representations [6, 7], and a denoising world model decodes the privileged state from history [8].
Two things make the problem harder than estimation alone. First, a velocity estimator that reads the command can learn to report the commanded velocity rather than the measured one: in training the two agree, because the policy tracks well, but after the physics shifts the estimate no longer tells the policy how far off it is. Second, even a correct estimate does not by itself remove a tracking error. A memoryless policy that maps the current error to joint targets behaves like a proportional controller, and when the new simulator converts the same targets into a different stride speed, such a controller settles with a steady offset from the command. Our method is built around both observations.
Method
We call the method CBIS (command-blind estimation with an integral servo). It has four parts: a command-blind observer trained on privileged targets; a gated integral command servo in the deployed policy, driven by that observer; a critic that sees the observer's beliefs and their errors; and two corrections to the policy's inputs during training.
A command-blind, two-pathway observer
The observer reads the 15-frame proprioceptive stack and has two pathways, both causal temporal convolutions with no recurrent state. The kinematic pathway sees only the kinematic channels (joint positions and velocities, base angular velocity, base Euler angles) and their one-step differences. It sees neither the command nor the previous action. From its feature it predicts the body velocity , a bounded correction to the 30 noisy kinematic channels, foot-contact probabilities, the root height and four foot coordinates. The dynamics pathway sees the 42 sensor channels after the command, including the previous action , together with the PD deflection , which exposes the torque the joints are actually exerting, and a stop-gradient copy of . From these it predicts a per-axis velocity log-variance , clamped to , and a unit-norm dynamics latent . Because the command enters neither pathway,
which is what makes usable as a measurement of tracking error.
def forward_all(self, observations: torch.Tensor):
bsz = observations.shape[0]
frames = observations.view(bsz, FRAME_STACK, SINGLE_OBS_DIM)
h_kin = self.extract_kin(frames)
v_hat, delta_p, contact_logits, contact_prob, root_h_hat, feet_z_hat = self.kin_heads(h_kin)
s42 = frames[:, :, 5:47]
pd = 0.25 * frames[:, :, 29:41] - frames[:, :, 5:17]
seq_54 = torch.cat((s42, pd), dim=-1)
conv_d = self.dyn_conv(seq_54.transpose(1, 2)).reshape(bsz, 384)
h_dyn = self.dyn_fc(torch.cat((conv_d, seq_54[:, -1, :], h_kin.detach()), dim=-1))
v_logvar, v_std, z_dyn = self.dyn_heads(h_dyn)
return h_kin, h_dyn, v_hat, v_logvar, v_std, delta_p, contact_logits, contact_prob, root_h_hat, feet_z_hat, z_dyn
def infer_est(self, observations: torch.Tensor) -> torch.Tensor:
_, _, v_hat, _, v_std, delta_p, _, contact_prob, root_h_hat, feet_z_hat, z_dyn = self.forward_all(observations)
return torch.cat((v_hat, v_std, delta_p, contact_prob, root_h_hat, feet_z_hat, z_dyn), dim=-1)The observer has its own optimiser (Adam, learning rate , gradient norm clipped at 5) and is trained purely by supervision from the noise-free simulator state that the task offers during training:
where is the denoised kinematic vector, the contact probabilities, overlines are means, and the variance term uses a detached residual so that it calibrates without pulling on . The forward term asks a small head to predict, from the clean kinematics, the true velocity, the action and , the next step's kinematic change, velocity, further simulator quantities and contacts. That is what makes a summary of the dynamics rather than of the current pose. The observer is updated on the first eight minibatches of every PPO update.
# Pure kinematic velocity MSE on h_kin + detached residual NLL for slip-uncertainty v_logvar on h_dyn!
vel_sq_detached = (v_hat.detach() - v_true).pow(2)
loss_vel_mean = 1.5 * F.mse_loss(v_hat, v_true)
loss_vel_var = 0.5 * (torch.exp(-v_logvar) * vel_sq_detached + v_logvar).mean()
loss_denoise = 2.0 * F.mse_loss(p_hat_t, p_clean_t)
loss_contact = 0.5 * F.binary_cross_entropy_with_logits(contact_logits, contact_true)
loss_clear = F.mse_loss(root_h_hat, root_h_true) + 2.0 * F.mse_loss(feet_z_hat, feet_z_true)
loss_kin_aux = F.mse_loss(self.obs_kin_aux_head(h_kin), kin_aux_true)
loss_dyn_aux = F.mse_loss(self.obs_dyn_aux_head(h_dyn), dyn_aux_true)
if valid_mask.any():
dyn_in = torch.cat(
(p_clean_t[valid_mask], v_true[valid_mask], act_raw[valid_mask], z_dyn[valid_mask]), dim=-1
)
dyn_pred = self.dyn_forward_head(dyn_in)
p_clean_nxt = torch.cat((nxt_fs[valid_mask, 5:29], nxt_fs[valid_mask, 41:47]), dim=-1)
dp_target = 5.0 * (p_clean_nxt - p_clean_t[valid_mask])
cont_target = torch.cat((dp_target, nxt_fs[valid_mask, 47:50], nxt_fs[valid_mask, 76:88]), dim=-1)
loss_dyn = F.mse_loss(dyn_pred[:, :45], cont_target) + 0.25 * F.binary_cross_entropy_with_logits(
dyn_pred[:, 45:47], nxt_fs[valid_mask, 72:74]
)A gated integral servo inside the deployed policy
The deployed actor is stateful, and its whole carry is 15 numbers belonging to a servo. Let be the command and the observer's estimate of the commanded quantities. Both pass through the same two-stage low-pass filter,
and likewise from , so the error compares the command and the estimate through matched dynamics and does not react to the policy's transient lag after a command change. The error is integrated in proportion to how far the estimate can be trusted. With contact probabilities , the mean planar velocity standard deviation from , and the denoised roll and pitch ,
The integrator leaks faster when the gate closes, so a slip or a stumble bleeds off accumulated authority instead of freezing it. The policy then receives an effective command
clipped to , and per axis, in the observation's command units. The idea is the internal-model argument: if the observer is command-blind and unbiased, a perfect integrator can only be at rest when , so the closed loop settles on the command whatever proportional gain the policy happens to have in the new simulator. Our integrator leaks, with , so at rest : with the gate fully open the residual error is about a tenth of the integrator state, reduced rather than removed, which is the price we pay for bleeding off authority on slips.
o_t = observations[:, -SINGLE_OBS_DIM:]
c_cur = o_t[:, 2:5]
v_hat = est[:, 0:3]
v_std = est[:, 3:6]
delta_p = est[:, 6:36]
c_prob = est[:, 36:38]
omega_z_hat = o_t[:, 43:44] + delta_p[:, 26:27]
u_hat = torch.cat((v_hat[:, 0:2], omega_z_hat), dim=-1)
c_ref1 = 0.94 * filt_prev[:, 0:3] + 0.06 * c_cur
c_ref2 = 0.94 * filt_prev[:, 3:6] + 0.06 * c_ref1
u_bar1 = 0.94 * filt_prev[:, 6:9] + 0.06 * u_hat
u_bar2 = 0.94 * filt_prev[:, 9:12] + 0.06 * u_bar1
e_model = c_ref2 - u_bar2
contact_gate = torch.clamp(c_prob[:, 0:1] + c_prob[:, 1:2], 0.0, 1.0)
v_std_xy = 0.5 * (v_std[:, 0:1] + v_std[:, 1:2])
slip_gate = torch.exp(-6.0 * torch.relu(v_std_xy - 0.08))
eu_hat_xy = o_t[:, 44:46] + delta_p[:, 27:29]
tilt_gate = torch.exp(-12.0 * (eu_hat_xy.pow(2).sum(dim=-1, keepdim=True)))
safety = contact_gate * slip_gate * tilt_gate
leak = 0.992 + 0.006 * safety
i_raw = torch.clamp(leak * filt_prev[:, 12:15] + 0.022 * safety * e_model, -1.2, 1.2)
ix = 0.55 * torch.tanh(i_raw[:, 0:1] / 0.55)
iy = 0.65 * torch.tanh(i_raw[:, 1:2] / 0.65)
iw = 0.25 * torch.tanh(i_raw[:, 2:3] / 0.25)
i_bounded = torch.cat((ix, iy, iw), dim=-1)
cx = torch.clamp(c_cur[:, 0:1] + ix, -1.0, 1.7)
cy = torch.clamp(c_cur[:, 1:2] + iy, -1.0, 1.0)
cw = torch.clamp(c_cur[:, 2:3] + iw, -0.6, 0.6)
c_eff = torch.cat((cx, cy, cw), dim=-1)
filt_next = torch.cat((c_ref1, c_ref2, u_bar1, u_bar2, i_raw), dim=-1)
return c_eff, i_bounded, filt_nextThe policy itself is an MLP on a 130-dimensional input: the gait phase, , the denoised kinematics, the previous action and its change, the PD deflection, a short-horizon kinematic difference, and every observer output (, , contacts, heights, ). During training each environment, at every reset, has a probability of 0.5 of running the episode with the servo disconnected, so that the policy also learns to act on the raw command and the servo's correction stays a correction. At deployment the servo is always on.
def act_rollout(self, observations: torch.Tensor) -> torch.Tensor:
bsz = observations.shape[0]
dev = observations.device
filt_cur, servo_mask = self.get_filt_state(bsz, dev)
with torch.no_grad():
est = self.observer.infer_est(observations)
c_eff_full, i_bounded, filt_next = self.actor.servo_step(observations, est, filt_cur)
c_raw = observations[:, -SINGLE_OBS_DIM + 2 : -SINGLE_OBS_DIM + 5]
c_eff_used = servo_mask * c_eff_full + (1.0 - servo_mask) * c_raw
i_used = servo_mask * i_bounded
self.rollout_filt = filt_next.detach()
self.last_est = torch.cat((est, c_eff_used, i_used), dim=-1).detach()
mean = self.actor.forward_from_est_and_ceff(observations, est.detach(), c_eff_used.detach())
std = torch.clamp(self.std, min=0.05, max=2.0).expand_as(mean)
self.distribution = Normal(mean, std)
return self.distribution.sample()The estimates and the effective command used in each rollout step are stored, and PPO re-evaluates the policy on those stored inputs. The observer keeps changing during the update, and re-running it inside the PPO ratio would make the ratio measure observer drift as well as policy change. PPO optimises only the policy MLP, the critic and the action standard deviation, clamped to , with three epochs per update.
A critic that sees the beliefs and their errors
The critic receives the task's privileged observation , a few further noise-free simulator quantities , and the observer's beliefs together with their errors against the truth, all under a stop-gradient:
A policy that acts on beliefs earns returns that depend on how wrong those beliefs are, and a critic given only the true state has to average over that dependence. Giving the critic the belief history's summary and its error lets the value follow the state the policy is actually in.
belief_and_err = torch.cat(
(
v_hat,
v_hat - full_state[:, 47:50],
v_std,
p_hat_t - p_clean_t,
contact_prob,
contact_prob - full_state[:, 72:74],
o_t[:, 29:41] - full_state[:, 29:41],
z_dyn,
i_used,
),
dim=-1,
)
return torch.cat((critic_observations, fs_extras, belief_and_err), dim=-1)Two corrections to the policy's inputs
The environment fills the previous-action slots of the observation with the action that was sampled and executed, noise included, while the deployed policy feeds back its own deterministic mean. We remove that mismatch for most of training: in each environment, resampled at every reset with probability 0.75, the 15 previous-action slots are replaced by the history of the policy's own deterministic means, clipped to .
def _align_obs_prev_actions(self, obs: torch.Tensor) -> torch.Tensor:
if self.raw_act_hist is None:
return obs
n = obs.shape[0]
frames = obs.view(n, 15, 47).clone()
frames[:, :, 29:41] = torch.where(self.use_raw_mask, self.raw_act_hist, frames[:, :, 29:41])
return frames.view(n, 705)
def act(self, obs, critic_obs, full_state=None):
self.storage.set_next_full_state(full_state)
obs_used = self._align_obs_prev_actions(obs)
self.transition.actions = self.actor_critic.act_rollout(obs_used).detach()
# Crucial fix: record deterministic policy mean (exact deployment prev_action!) rather than noisy sample!
self.last_clean_mean = self.actor_critic.action_mean.detach()Second, we add a smoothness penalty on the policy mean. With the observation whose newest frame is perturbed by Gaussian noise of per-channel scale 0.015 on joint positions, 0.010 on joint velocities, 0.030 on angular velocity and 0.010 on orientation, and whose newest previous action is blended toward the one before by a factor drawn from , and then clipped to ,
with the observer's estimates held at their stored values in both terms.
Results
| Method | ① | ② | ③ | |||
|---|---|---|---|---|---|---|
| Fall rate ↓ | Success rate ↑ | Fall rate ↓ | Success rate ↑ | Fall rate ↓ | Success rate ↑ | |
| Gemini 4 Carbon | 0.885 | 0.537 | 0.024 | |||
| 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
On Payload CBIS has a success rate of 0.537. That is second among the published baselines, behind TAR [6] at 0.645, and ahead of the DreamWaQ-style estimator (0.491) and the asymmetric actor-critic we start from (0.429).
On High-speed CBIS has a success rate of 0.024, level with the asymmetric actor-critic's 0.022. It is above only that baseline, PvP and the symmetric critic, and below the other seven, the strongest being RMA, 50-step history [3] at 0.233. The method produces no gain over its starting point on this setting.
On Push-recov CBIS has a fall rate of 0.885, against 0.954 for the asymmetric actor-critic. It falls less often than that baseline and four others (PvP, TAR with an LSTM encoder, RMA with a 50-step history and DWL), and more often than the remaining five, the lowest fall rate being 0.598 for Symmetric critic [1]. On this setting the policy still falls in most episodes.
So the method improves on its starting point on Push-recov and Payload, by a wide margin on Payload, and leaves High-speed where the starting point was. It is not the best method on any setting.
How we got here
- We reproduced the baselines first and built our own transfer checks. Before writing any method we trained four reference baselines (the asymmetric default, HIM, PvP and DWL) at full length and built two transfer checks of our own: one in the target simulator, and one in PyBullet, which we added as an independent third physics engine. Our notes record that the asymmetric default reached the highest training reward of the four and the worst late transfer.
- Command confounding in an existing estimator. We probed the trained HIM estimator with a sensor stack that says the robot is standing still and varied only the commanded forward velocity. Its velocity estimate rose from −0.009 to 0.137 as the command went from −0.4 to 0.85 (our development measurement). This motivated the command-blind observer of our first version, and the variance head and dynamics latent were added in the same version.
- The previous-action correction and the smoothness penalty mattered together. Our first ablation removed both at once. After a third of training it matched the full version on our target-simulator check (23.3% success each), but by the halfway checkpoint it had collapsed: a success rate of 14.0% and a fall rate of 43.0%, against 25.0% and 19.2% for the version that kept both, and 9.4% success with 53.1% falls on the PyBullet check (our development measurements). Because both were removed together, the gain belongs to the pair.
- Accurate estimation was not enough. By then the observer's velocity error in the target simulator was 0.011 to 0.025 m/s, against 0.160 for HIM and 0.167 for TAR with an LSTM encoder (our development measurements). Yet the policy still walked at 0.466 m/s when commanded 0.6, and fell similarly short of backward and sideways commands. This persistent offset under an accurate estimate is what led us to the internal-model argument above: a policy that acts on the current error alone needs an integral state to remove a steady offset.
- Bolting a servo onto a trained policy. Before training anything with it, we added a first integrator (gain 0.025, gated only by the observer's velocity uncertainty) to a trained checkpoint of our recurrent variant. Tracking improved, from 0.466, −0.136 and 0.044 m/s without the servo to 0.554, −0.253 and 0.197 m/s on commands of 0.6, −0.3 and 0.25 sideways, but the robot now fell under one stiffness shift it had survived without the servo. We reworked it into the matched-reference, gated form described above. With that servo, the same checkpoint, never trained with one, went from 29.7% to 68.6% success on our target-simulator check and from 38.5% to 79.2% on the PyBullet check (our development measurements).
- Training with the servo, and choosing the final variant. We then trained four variants with the servo: a hybrid temporal-convolution and recurrent observer, the same with the servo always on (which also used the stock PPO epochs and GAE λ), a purely convolutional observer, and that one without the belief critic. On the final checkpoints of our target-simulator check they reached 62.8% success and 20.9% falls (purely convolutional), 61.0% and 23.3% (hybrid), 34.9% and 21.5% (servo always on) and 57.6% and 21.5% (no belief critic). On PyBullet the convolutional and hybrid variants reached 74.0% and 60.4% success (our development measurements). We submitted the purely convolutional variant. Its carry is only the servo's 15 states, with no recurrent hidden state that could drift over many strides.
- Training was unstable, and we did not fix it. The evidence for the belief critic is weak. Without it the variant was ahead at the 1000- and 2000-iteration checkpoints (54.7% and 57.6% against 48.3% and 28.5%), and our chosen variant's own checkpoint at 2000 iterations fell to 28.5% success with 39.5% falls before recovering. In our probes of a 0.5 m/s command, the checkpoint at 1000 iterations walked at 0.498 m/s and the one at 1100 at 0.711 m/s, and the value loss spiked repeatedly at roughly regular intervals. We wrote a further batch aimed at this, with a capped learning-rate schedule, a replay buffer for the observer, a yaw-invariant observer and an explicit traction estimate, and launched it. The submitted files are the purely convolutional variant described above.
The idea that a critic should see history-based beliefs, not the state alone, came from our reading on unbiased asymmetric actor-critics for partially observable problems. That work is not among this task's references, so we state the idea without a citation.
Limitations
- High-speed is untouched. Our success rate there is level with the asymmetric actor-critic's and below seven published baselines. Our reading, which we have not tested, is that the integral servo can only correct an offset the observer can see, and with its authority bounded and its gate closing on slip and tilt, it has little to offer once the robot is not walking steadily.
- Push-recov is improved but not solved. We fall less often than our starting point, but five published baselines fall less often than we do, and the fall rate remains high in absolute terms. Our design aimed at tracking more than at staying upright.
- The servo is hand-tuned. The filter constant 0.94, the integrator gain 0.022, the leak, the gate constants and the authority bounds were chosen by reasoning and a few probes, not derived or swept. The same is true of the 0.5 servo-dropout probability and the 0.75 previous-action replacement probability.
- The final checkpoint is partly luck. Our own development runs show large swings in transfer quality between nearby checkpoints of the submitted variant. Only the last checkpoint is deployed, so the measured result depends on where in that oscillation training stopped.
- The development evidence is thin. Every development comparison is one training run per variant, measured on transfer checks we built ourselves, and several comparisons change more than one thing at once. How well those checks predict the task's settings is not known.
- The belief critic's contribution is unproven. Our one controlled ablation of it does not show a consistent benefit.
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.