This paper introduces ILPO (Imitating Latent Policies from Observation), a framework that allows an agent to learn how to perform a task simply by watching an expert, even when the expert's specific actions (the "buttons pressed") are invisible.
TL;DR
ILPO enables imitation learning from state-only observations by first discovering a set of "latent actions" that explain expert transitions, and then grounding those latents to real-world actions using a tiny amount of environment interaction. It significantly outperforms previous state-of-the-art methods in sample efficiency, reaching expert-level performance in classic control tasks in under 100 steps.
What Problem Does This Paper Address?
Standard Imitation Learning (IL) usually requires "state-action" pairs—knowing exactly what the expert did in every situation. However, in the real world, we often only have access to "state-only" observations, like a video of a human performing a task.
Existing "Imitation from Observation" (IfO) methods, such as Behavioral Cloning from Observation (BCO), typically follow a "model-first" approach: the agent spends a long time interacting with the environment to learn an inverse dynamics model (predicting the action given two states) before it even looks at the expert data. This is often sample-inefficient and potentially dangerous in real-world scenarios. ILPO flips this script by learning a policy in a "latent" space first, then "grounding" it to real actions later.
Methods
ILPO follows a two-step approach:
-
Step 1: Learning Latent Policies (Offline): The agent looks at the expert's state transitions $(s_t, s_{t+1})$ and tries to predict the next state. Crucially, it assumes there are $k$ discrete "latent actions" ($z$) that could have caused the change.
-
Latent Forward Dynamics: The model predicts $k$ possible next states. It uses a minimum loss objective: only the prediction closest to the actual next state is updated. This prevents the model from "averaging" different actions into a single blurry prediction.
- Latent Policy: Simultaneously, the agent learns a prior $\pi(z|s)$, which is the probability that the expert would choose a specific latent action $z$ in state $s$.
- Step 2: Action Remapping (Online): Now the agent enters the environment. It doesn't know which latent action $z$ corresponds to which real action $a$ (e.g., does $z=1$ mean "jump" or "move left"?). By taking a few real actions and observing the results, it learns a mapping $\pi(a|z, s)$. This is analogous to a human watching a friend play a game to understand the strategy, then picking up the controller and pressing buttons for a minute to figure out the layout.
Datasets
The authors evaluated ILPO on two main benchmarks:
- Classic Control (OpenAI Gym): Cartpole, Acrobot, and Mountain Car. These provide low-dimensional state spaces to test the core logic of the algorithm.
- CoinRun (OpenAI): A procedurally generated 2D platformer. This is a much harder "high-dimensional" challenge involving 128x128 pixel inputs and complex dynamics, testing the model's ability to generalize across different levels.
Key Insights and Ideas
- The "Min-Loss" Trick: By only penalizing the "winning" latent action, the model naturally clusters transitions into distinct modes. This effectively "discovers" the underlying action space of the environment without ever seeing a label.
- Policy-First, Grounding-Second: ILPO demonstrates that you can learn the intent and strategy of an expert (the latent policy) entirely offline. The online phase is reduced from "learning how the world works" to simply "learning the mapping of the controls."
- Generalization through Embeddings: The use of state embeddings ($E_p, E_a$) allows the remapping network to generalize. If the agent learns that $z=1$ means "move up" in one part of the screen, the neural network helps it realize $z=1$ likely means "move up" everywhere else too.
Key Results
- Superior Sample Efficiency: In Cartpole and Acrobot, ILPO reached expert performance in fewer than 100 environment interactions. In contrast, BCO required thousands of steps to achieve similar results.
- Robustness in High Dimensions: On the pixel-based CoinRun, ILPO significantly outperformed BCO. While ILPO didn't always reach the absolute peak of the expert (due to some "bad" random initializations), its best runs were near-expert, whereas BCO struggled to learn meaningful behavior.
- Latent Space Flexibility: The authors found that setting the number of latent actions $|Z|$ equal to the number of real actions $|A|$ was a good heuristic, but the model was surprisingly robust even if $|Z|$ was slightly different.
Limitations and Future Work
- Discrete Actions Only: The current formulation relies on a discrete set of latent actions. Extending this to continuous action spaces (like robotic arm torques) remains an open challenge.
- Deterministic Assumption: The model assumes transitions are deterministic. In highly stochastic environments, the "min-loss" approach might struggle to distinguish between different actions and random environmental noise.
- Expert Noise Requirement: Interestingly, the authors noted that ILPO performs better when the expert data is slightly "noisy" (stochastic), as this helps the model see the boundaries between different latent actions more clearly.
- Future Direction: A promising next step is "cross-embodiment" learning—learning a latent policy from a human video and mapping it to a robot with a completely different physical structure.
Summary updated