Deep Imitative Models for Flexible Inference, Planning, and Control

Nicholas Rhinehart, Rowan McAllister, Sergey Levine

TL;DR

This paper introduces "Imitative Models," a framework that combines the safety and realism of imitation learning (IL) with the flexibility of model-based reinforcement learning (MBRL). By training a probabilistic model to forecast expert trajectories and treating it as a planning prior, the authors enable autonomous agents to navigate toward arbitrary, unseen goals at test time while remaining robust to noisy or poorly specified objectives.

What Problem Does This Paper Address?

When designing autonomous agents, researchers typically choose between two paradigms, both of which have significant drawbacks:

  1. Imitation Learning (IL): The agent learns to mimic expert demonstrations. While this produces natural, human-like behavior, standard IL models are rigid; they cannot easily be directed toward new, arbitrary goals at test time without extensive retraining or explicit goal labels during training.
  2. Model-Based Reinforcement Learning (MBRL): The agent learns a dynamics model of what is physically possible in the environment and uses a reward function to plan paths. However, designing a reward function that captures complex, desirable behavior (like smooth driving or lane discipline) is notoriously difficult—a problem known as "reward engineering." Without a strong behavioral bias, MBRL planners can easily choose erratic or dangerous paths.

This paper bridges the gap by creating a model that learns what behavior is desirable entirely from offline data, while retaining the test-time flexibility to plan for novel tasks and goals.

Methods

The core innovation is the Imitative Model, a probabilistic density function $q(S|\phi)$ trained to forecast expert trajectories ($S$) conditioned on environmental observations ($\phi$, such as LIDAR maps and traffic light states).

Instead of planning by maximizing an engineered reward function, the authors frame planning as Maximum A Posteriori (MAP) inference. At test time, the optimal plan $s^*$ is found by maximizing the combination of the imitation prior and a test-time goal likelihood:

$$\arg\max_s \log q(s|\phi) + \log p(G|s,\phi)$$

Where:

  • $\log q(s|\phi)$ is the imitation prior, which scores how "expert-like" a trajectory is.
  • $\log p(G|s,\phi)$ is the goal likelihood, which evaluates how well the trajectory achieves the target task.

To instantiate the density model, the authors extend R2P2 (Reparameterized Pushforward Policy), a generative autoregressive flow that maps simple latent noise to complex, multimodal trajectory distributions using invertible, differentiable neural networks.

The authors derive three families of goal likelihoods to flexibly direct the agent:

  • Constraint-based goals (Hyperparameter-free): Restricts the final state to a specific point, line segment, or polygon region.
  • Unconstrained goals (Hyperparameter-based): Uses Gaussian distributions to encourage the agent to reach a target state or sequence of states without strictly forcing it.
  • Costed planning: Incorporates energy-based likelihoods to penalize trajectories that cross hazardous areas, such as potholes.
Figure 1: Our method: deep imitative models. Top Center. We use demonstrations to learn a probability density function q of future behavior and deploy it to accomplish various tasks. Left: A region in the ground plane is input to a planning procedure that reasons about how the expert would achieve that task. It coarsely specifies a destination, and guides the vehicle to turn left. Right: Goal positions and potholes yield a plan that avoids potholes and achieves one of the goals on the right.

Datasets

The method was evaluated using the CARLA autonomous driving simulator.

  • Training Data: The authors collected a 25-hour dataset of expert driving in Town01 under dynamic conditions (surrounded by 100 other vehicles). This resulted in over 60,000 training scenes, each containing 2 seconds of past context and 4 seconds of future trajectory recorded at 10Hz.
  • Evaluation: Testing was performed on both the familiar Town01 and an unseen map, Town02, across static and dynamic navigation benchmarks.

Key Insights and Ideas

  • Expert Dynamics vs. World Dynamics: Traditional MBRL models the physics of the entire world (everything that can happen). Imitative Models only model the distribution of expert actions (what should happen). This drastically restricts the search space during planning to safe, realistic trajectories.
  • The Prior as a Regularizer: Because the imitation prior strongly penalizes non-expert behavior, it acts as a powerful regularizer. If a high-level route planner provides a "bad" goal (e.g., a waypoint on the wrong side of the road or on a sidewalk), the imitation prior prevents the vehicle from executing it blindly. The agent will get as close to the goal as possible while still staying safely in its designated lane.

Key Results

The Imitative Model was compared against six IL baselines (including variants of Conditional Imitation Learning) and an MBRL baseline.

  • State-of-the-Art Performance: In CARLA’s benchmark, the proposed method substantially outperformed all prior approaches. For instance, in the challenging Town02 dynamic test setting, the best Imitative Model configuration achieved a 100% success rate, compared to just 36% for the MBRL baseline and 66% for the strongest prior IL method (CILRS).
  • Extreme Noise Robustness: When the authors introduced "decoy" waypoints (distracting, highly perturbed goals), the model successfully ignored the decoys and executed safe paths. Even when all waypoints were intentionally placed on the wrong side of the road, the agent achieved a 100% success rate in Town01 by driving on the correct side of the road while tracking the general direction of the faulty goals.
  • Zero-Shot Obstacle Avoidance: By multiplying the imitation prior with an energy-based cost map at test time, the agent successfully steered around newly introduced potholes without ever seeing a pothole during training.

Limitations and Future Work

  • Decoupled Control: The Imitative Model outputs spatial trajectories (paths), which are then executed by a low-level, hand-tuned PID controller to manage steering, throttle, and braking. A fully end-to-end differentiable pipeline that outputs control directly while maintaining probabilistic interpretability remains an open challenge.
  • Traffic Light Heuristics: Although the model incorporates traffic light states, the authors introduced a "smart waypointer" heuristic to explicitly adjust goal distances when encountering red lights to ensure perfect stopping behavior. Fully internalizing complex, discrete traffic rules purely within the continuous trajectory density function is an area for improvement.

Summary updated

BibTeX
@inproceedings{rhinehart2020deep,
  author = {Nicholas Rhinehart and Rowan McAllister and Sergey Levine},
  title = {{Deep Imitative Models for Flexible Inference, Planning, and Control}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=hvzm3JFHKoQ},
}
Figure