Teaching Sim-Trained Recurrent Policies What to Do Before They Know the Physics

A robot policy trained in simulation often carries a memory: a recurrent network, or a short history buffer, that watches the robot's own joint readings and past commands and silently works out what the real world is like, such as how slippery the floor is or how heavy the payload is. That memory starts empty. For the first fraction of a second on real hardware, the policy acts with no idea of the physics. It still has to send motor commands, and on short or unstable tasks those first commands can decide the outcome. The most careful hardware comparison in the file found that recurrent "adaptive" policies scored 0% on a real puck-sliding task where a plain feed-forward policy reached 14%. The authors guessed that the episode was too short for the memory to fill (Crossing The Gap). No one has tested that guess.

This proposal makes two claims. First, the cold-start window is a separate, measurable failure mode, distinct from the policy's quality once its memory has filled. Second, the standard way of training these policies is badly matched to that window. In that standard recipe, a student network imitates a "teacher" that sees the true physics. A teacher that already knows the friction never needs to probe for it, so the student is trained either to copy confident actions it cannot justify, or, if early steps are dropped from the loss as the burn-in literature recommends, to do nothing in particular at all. We propose to measure this window directly and then fix it. The fix keeps imitation for the policy's settled behavior and adds reinforcement-learning fine-tuning of the student, always started from an empty memory, so that it learns how to act while it does not yet know the physics.

Core Claim

Recurrent state initialization lag is the drop in accuracy while a sequence model's hidden state moves from its default value, usually all zeros, to a state that reflects the data. It is well understood offline. Recurrent video models restore early frames poorly while their state fills (Efficient Video Super-Resolution through Recurrent Latent Space Propagation). Tuning the burn-in phase shows that excluding the first $m$ steps of each training chunk from the loss reduces regret roughly as $\lambda^m/(N-m)$, where $\lambda$ is the network's forgetting rate and $N$ the chunk length. It reports test-error reductions of 51% on Silver-Box and 69–79% on RLC circuits. R2D2 fixed the same problem in replay-based reinforcement learning by storing hidden states and unrolling 40 burn-in steps before computing gradients.

All of these fixes discard or skip the transient. A deployed robot cannot do that, because every step is a real torque. Our claim is that the transient needs its own behavior, and that this behavior cannot come from privileged-teacher imitation. The best action under uncertainty about the dynamics is often a hedged or probing action that no teacher with full knowledge would ever take. If the claim holds, the conclusion in Crossing The Gap that feed-forward policies should be preferred is partly an artifact of initialization rather than a verdict on recurrence.

Research Program

The first part of the program is diagnostic, and every later step depends on it. For any history-based policy, we compare two copies running on the same target dynamics. One starts from the default empty state. The other starts from a "warm" state taken from a long earlier rollout under the same physics. We call the difference in success or return between the two the cold-start cost.

We also record a convergence curve. At each time $t$, we measure the distance between the cold copy's hidden state and the hidden state it eventually settles into. Fitting a decay rate to this curve gives an empirical forgetting rate comparable to the $\lambda$ in Schiller et al.'s bound. This is our closed-loop extension of their analysis: in closed loop, the cold policy's early actions change the states it observes next, so the transient can compound rather than simply decay. We expect the cold-start cost to be large when task length is comparable to the convergence time, and small otherwise. That is the regime the Valassakis guess points to.

The second part is the method, which has three stages built on the two-phase design of RMA. In RMA, a base policy is trained with access to an encoding of the true physical parameters, and a temporal network then learns to predict that encoding from proprioceptive history.

In stage one, we train a privileged teacher in simulation with domain randomization, meaning the physics parameters are randomly varied across training episodes.

In stage two, we distill a small recurrent student, a gated recurrent unit network, from the teacher. The imitation loss is masked for the first $m$ steps of each trajectory, with $m$ tuned as Schiller et al. prescribe. This gives the student a clean settled behavior without the corrupted early gradients the burn-in literature warns about.

In stage three, we fine-tune the student with reinforcement learning. Every episode starts from the student's learned initial hidden state, and the physics is resampled both at episode onset and at random switch points mid-episode. The critic receives the privileged simulator state, while the actor sees only deployable sensor inputs. After step $m$, the imitation loss stays on as a regularizer so that settled behavior does not drift. Before step $m$, only task reward shapes behavior, so the student is free to discover hedging or probing actions. The learned initial state replaces the all-zeros default and is trained jointly with the policy.

The key ingredient is stage three's division of labor: imitate when the student has the information, optimize for reward when it does not. This differs from end-to-end recurrent reinforcement learning, which is what the adaptive LSTM in Crossing The Gap did and which failed on hardware. It also differs from masked distillation alone, which leaves the transient untrained.

Baselines

The naive reference point is the same distilled recurrent student deployed with an all-zeros initial state and trained with imitation from step zero. This is how RMA-style and Kickstarting-style distillation is usually done. Every other method should beat it.

The strongest existing method on short-horizon dynamics transfer is the feed-forward "conservative" policy trained with Random Force Injection, in which random external forces are applied to the simulated system during training. Crossing The Gap reports success rates for it of 86% on reaching, 81% on pushing, and 14% on sliding on a real Sawyer arm, against 33% for domain randomization and 38% for the explicit identification method EPI on pushing. It is the strongest competitor because it has no transient at all. We will run it with the same simulator, the same number of environment steps, and the same hyperparameter-search budget as our method. Beating it means matching it on pushing and reaching while clearly exceeding it on sliding and on episodes with mid-episode dynamics switches.

The strongest history-based baseline is RMA itself: a one-dimensional convolutional network over a fixed window, with a zero-padded buffer at onset. The file reports success rates on terrain for RMA but no numbers on its onset or switch transient beyond the statement that the gait stabilizes in "less than one second." For RMA's cold-start cost specifically, no reported result was found on Lacuna. We will retrain it on our tasks with matched compute.

Three ablations isolate the ingredients. The first is masked distillation alone, our stage two without stage three. It shows whether Schiller-style burn-in is enough. The second is stage three without the learned initial state. The third is a warm-state oracle that starts from the hidden state of a long rollout on the true target dynamics. The oracle is an upper bound on how much any cold-start fix could gain.

Why not just…?

Why not just use a feed-forward policy with Random Force Injection? On reaching and pushing, this may genuinely be enough, and we expect to tie it there. The case against it as a general answer is its own 14% on sliding in Crossing The Gap, and the fact that RMA's tasks, such as a payload up to body weight or terrain switches, need in-episode inference that a memoryless policy cannot do. If our method does not beat it on sliding and on switch episodes, the claim fails.

Why not just run a scripted probing motion before the task starts, so the memory is warm when it matters? This is the most serious threat. Wherever there is idle time before the task begins, it may work as well as anything learned. We include it as a baseline: a fixed excitation trajectory of length matched to the measured convergence time, followed by the cold student. The experiments settle the question in two places. Pre-task probing cannot help with mid-episode dynamics switches, such as stepping onto a slippery surface. It also cannot reveal properties that only appear during the task, such as the friction between puck and plate, which is invisible until the puck moves. If scripted probing matches our method even on those cases, we will report that the right answer is a protocol rather than a training method.

Why not just apply standard burn-in, as Schiller et al. and R2D2 do? Burn-in decides which steps produce gradients. It does not decide which actions are taken on hardware during those steps. Our masked-distillation ablation is exactly this alternative. The prediction is that it improves settled performance but leaves the cold-start cost unchanged, or even worse, because the transient behavior is never trained.

Why not just learn a better initial state, such as the average hidden state across simulated physics? This is cheap and could absorb much of the gain. It is the second ablation, and the comparison between it and the full method shows whether reward-driven transient behavior adds anything beyond a better starting point.

Proposed Experiments

The first and most important check comes before any method work. On simulated analogues of the Sawyer pushing and sliding tasks, and on the six MuJoCo tasks of RRLS with its adversarial uncertainty sets for mass, friction, and damping (SuReLI/RRLS), we measure the gap between the warm-state oracle and the cold student. RRLS has no reported scores in the file, so all of its numbers will be our own. As a stand-in for real hardware, we use a held-out simulator configuration. Its parameters lie outside the training range, it adds the 15–19 ms control latency measured by Tan et al., and it adds sensor noise. We sweep episode length relative to the measured convergence time.

If the oracle gap is small even on short episodes, the Valassakis guess is wrong and recurrent policies fail for other reasons. We would publish that result and stop. If the gap is large and shrinks as episodes lengthen, the cold-start window is real.

We then compare the full method against all baselines and ablations under matched budgets. We report success rate, return over the first $T$ steps, time until the hidden state settles, and the fraction of failures that occur within the transient window. All results use 10 seeds, following RRLS practice.

If a Sawyer arm is available, the hardware test replicates the reaching, pushing, and sliding protocol of Crossing The Gap. This lets us compare directly against the reported 81% and 14% for Random Force Injection, and test whether a recurrent policy trained for the transient can lift sliding above its reported 0%.

A secondary physical test, which depends on access to the platform, is the Darwin OP2 biped from Sim-to-Real Transfer for Biped Locomotion. There, baselines fell within 1–3 seconds, a window comparable to RMA's settling time. This is the clearest setting where the transient alone could decide survival, and we would measure time upright against the reported 5–6 seconds.