Imitation by Predicting Observations

Andrew Jaegle, Yury Sulsky, Arun Ahuja, Jake Bruce, Rob Fergus, Greg Wayne

TL;DR

FORM (Future Observation Reward Model) is a non-adversarial approach to imitation from observation that treats learning as a sequence prediction problem. By matching the log-likelihood of observation transitions between an expert and an imitator, it achieves expert-level performance on continuous control tasks while proving significantly more robust to environmental noise and distractors than standard adversarial methods like GAIL.

What Problem Does This Paper Address?

Imitation learning typically relies on "expert demonstrations" consisting of state-action pairs. However, in many real-world scenarios—like a robot learning by watching a human—we can observe the effects of behavior (the observations) but not the underlying control signals (the actions). This is known as Imitation from Observation (IfO).

Current state-of-the-art IfO methods, such as GAIL (Generative Adversarial Imitation Learning), frame this as an adversarial game: a discriminator tries to distinguish between expert and imitator states, while the policy tries to fool the discriminator. While powerful, these methods are notoriously finicky. They are sensitive to hyperparameters and, more importantly, they often fail when there is a "domain shift"—small, task-irrelevant differences between the expert's environment and the imitator's (e.g., different background textures or lighting). Because GAIL tries to match the global "occupancy" of states, it often latches onto these irrelevant distractors, leading to poor imitation performance.

Methods

The authors introduce FORM, which derives a reward function from a principled inverse reinforcement learning (IRL) objective: minimizing the KL-divergence between the distribution of observation sequences produced by the imitator and the expert.

Key to this approach are "effect models"—generative models $p(x_t | x_{t-1})$ that predict the next observation given the current one. Unlike standard transition models in model-based RL, these are not conditioned on actions; they capture the combined effect of the agent's policy and the environment's dynamics.

FORM learns to track the unseen task reward by matching observation log-likelihoods.

The FORM algorithm operates in two main phases:

  1. Offline: A demonstrator effect model is trained via maximum likelihood on a fixed dataset of expert observations.
  2. Online: The imitator trains its own effect model on its current experience while simultaneously optimizing its policy using a reward defined as the difference in log-likelihoods: $$r_t = \log p^{Demonstrator}(x_t | x_{t-1}) - \log p^{Imitator}(x_t | x_{t-1})$$

By using separate models rather than a single adversarial discriminator, FORM avoids the instabilities of zero-sum games. The policy optimization itself is handled by MPO (Maximum a Posteriori Policy Optimization), a stable off-policy actor-critic algorithm.

Datasets

The researchers evaluated FORM on 13 tasks from the DeepMind Control Suite (DCS), including domains like Reacher, Cheetah, Walker, and the high-dimensional Humanoid.

To test robustness, they introduced a Distractor Benchmark. They appended task-irrelevant binary noise patterns to the state vectors. By varying the number of noise dimensions ($N$) and the "pool size" ($M$, the number of unique noise patterns seen during training), they simulated the kind of undersampled environmental variation that often trips up imitation agents in the real world.

Key Insights and Ideas

  • Local vs. Global Matching: The "aha moment" here is that adversarial methods like GAIL are global—they try to match the overall frequency of states. If a distractor appears in the imitator's world but not the expert's, the discriminator sees a massive difference and penalizes the agent. FORM is local; it looks at conditional probabilities ($x_t$ given $x_{t-1}$). If a distractor doesn't change how the state evolves, the conditional density remains similar, and the agent isn't misled.
  • Non-Adversarial Stability: By framing imitation as a likelihood-matching problem rather than a minimax game, FORM is inherently more stable. The second term in the reward ($\log p^I$) acts similarly to an entropy regularizer, encouraging the agent to explore and accurately model its own behavior.
  • Action-Free IRL: FORM demonstrates that you don't need to know how an expert moved (actions) to recover the intent (reward) behind their movement, provided you can model the temporal structure of their observations.

Key Results

  • Competitive Performance: In "clean" environments without distractors, FORM performs comparably to well-tuned, heavily regularized versions of GAIfO (GAIL from Observation) and significantly outperforms simpler baselines like BCO (Behavioral Cloning from Observations).
  • Superior Robustness: The most striking results appear in the distractor experiments. As shown in Figure 3, when the variety of distractors ($M$) is low, GAIfO's performance collapses because it overfits to the specific noise patterns in the expert data. FORM maintains high performance even with very few distractor samples.
FORM maintains performance in the presence of distractors where GAIfO fails.
  • Qualitative Success: On the difficult Walker Run task, FORM agents successfully ignored novel distractor patterns that caused GAIL-based agents to fail completely.

Limitations and Future Work

  • Two-Stage Efficiency: FORM requires the expert model to be fully trained offline before the online imitation phase begins. This is less efficient in terms of wall-clock time than end-to-end methods.
  • Model Validation: The authors note that the training likelihood of the expert model isn't always a perfect predictor of how well it will guide the imitator, making it difficult to know when the offline phase is "done."
  • Scaling to Pixels: The current work uses proprioceptive states (joint angles, velocities). Scaling FORM to raw image inputs will require much more complex generative models (like VQ-VAEs or large-scale video models), which introduces new challenges in density estimation and computational overhead.

Summary updated

BibTeX
@inproceedings{jaegle2021imitation,
  author = {Andrew Jaegle and Yury Sulsky and Arun Ahuja and Jake Bruce and Rob Fergus and Greg Wayne},
  title = {{Imitation by Predicting Observations}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure