Mitigating Covariate Shift in Imitation Learning for Autonomous Vehicles Using Latent Space Generative World Models

Alexander Popov, Alperen Degirmenci, David Wehr, Shashank Hegde, Ryan Oldja, Alexey Kamenev, Bertrand Douillard, David Nistér, Urs Muller, Ruchi Bhargava, Stan Birchfield, Nikolai Smolyanskiy

TL;DR

Imitation learning for autonomous driving often fails when small errors compound, causing the vehicle to drift into unfamiliar situations—a problem known as covariate shift. This paper from NVIDIA mitigates this by co-training the driving policy with a latent-space generative world model that acts as an internal "neural simulator," teaching the vehicle how to recover from errors without requiring massive amounts of real-world failure data.

What Problem Does This Paper Address?

Behavior Cloning (BC)—where an autonomous vehicle (AV) learns to drive by mimicking human expert demonstrations—works well until the vehicle makes a minor mistake. Because human experts rarely drive off the road or into guardrails, the training data lacks examples of how to recover from bad states.

When the AV inevitably drifts away from the expert's trajectory, it enters an unseen state distribution. This mismatch is called covariate shift. Unable to handle these novel states, the driving policy's errors compound rapidly, often leading to catastrophic failures.

Fig. 1: Training with a latent generative world model allows our policy to visit latent states that were not observed in the expert demonstrations, and learn to recover by minimizing the KL-divergence between world model rollouts and expert demonstrations, teaching the policy to select actions that guide the agent toward favorable states.

While methods like DAgger mitigate this by collecting online corrections or using heuristic data augmentations, they are expensive, fragile, and difficult to implement cleanly. This paper addresses how to build a robust policy that can recover from perturbations entirely within a self-contained, end-to-end neural network framework.

Methods

The authors introduce an end-to-end architecture that combines a driving policy with a latent space generative world model.

Fig. 2: System architecture diagram showing transition from time t −1 to t. During training we backpropagate through an entire episode consisting of 12 timesteps (red boxes show the losses). During deployment the system is operated recurrently.

Key components include:

  1. Transformer-Based Perception Encoder: This novel encoder uses a pre-trained DINOv2 backbone as a robust featurizer. It processes sequential camera frames, ego-motion, and navigation paths using multi-view cross-attention and a learned scene query to output a compact observation vector ($o_t$).
  2. Latent State Estimator & Predictive World Model: The state estimator computes a posterior distribution based on actual observations, while the world model predicts a prior future state distribution conditioned only on past history and the driving policy's chosen actions.
  3. Closed-Loop Latent Training: During training, the system stochastically alternates between using the actual estimated state and the world model's "imagined" prior state. By forcing the policy to operate on these imagined trajectories, the world model acts as an internal simulator. The policy learns to select actions that minimize the KL-divergence between the world model's rollouts and expert demonstrations, effectively learning how to steer back toward safe, familiar states.
Fig. 3: Our novel transformer-based multi-view perception encoder. Input data is tokenized, and frame tokens are cross- attended to match patches. Scene descriptor is computed via cross-attention between learned scene query and scene tokens. Output is computed by adding navigation and ego motion embeddings to the scene descriptor.

Datasets

The model was trained and evaluated using two primary sources:

  • CARLA Simulator: Expert driving data consisting of 50k episodes (1.2 seconds each, sampled at 10 Hz) was collected using a privileged reinforcement learning agent. Evaluation was performed on the held-out Town05 Long benchmark under unseen weather conditions, as well as Town02 for ablation studies.
  • NVIDIA DRIVE Sim / Real-World Dataset: To test the model's capacity for photo-realistic and physical complexity, the authors trained the system on a 450-hour internal real driving dataset containing 1.3 million episodes collected across various geographic locations by NVIDIA's autonomous fleet.

Key Insights and Ideas

  • The World Model as a Neural Simulator: Instead of relying on an expensive graphics engine or dangerous real-world exploration to find edge cases, the latent world model stochastically generates unusual/perturbed states internally. This allows the policy to practice "recovery maneuvers" entirely in latent space.
  • DINOv2 Bridges the Sim-to-Real Gap: By using a frozen, self-supervised DINOv2 backbone trained on massive real-world imagery, the perception encoder extracts features that are highly robust. This allows a model trained on real-world data to be deployed directly into a simulator like DRIVE Sim for validation without fine-tuning.
  • Staged Convergence: The authors noted a distinct training dynamic: the perception encoder and decoders converge first, followed by the world predictor, and finally, the driving policy network.

Key Results

  • State-of-the-Art Performance: On the CARLA Leaderboard 1.0 (Town05 Long), the proposed method achieved a Driving Score of 70.0, outperforming the previous single-camera state-of-the-art (MILE, which scored 61.1). Remarkably, this was achieved using only 50k training episodes, compared to MILE's 242k episodes.
  • Robustness to Disturbances: In qualitative testing, the authors introduced severe manual steering overrides (30-degree turns for 300 ms). While standard Behavior Cloning crashed into guardrails, the world-model-infused policy successfully recovered and completed the route.
Fig. 4: Top-down qualitative comparison of policies driv- ing along a route in CARLA [6], while steering control disturbances were applied (red arrows). Behavior cloning was not able to recover from the second disturbance, hitting the guardrail and terminating early. Our system successfully recovered and completed the route.
  • Real-Time Deployment: When evaluated in NVIDIA DRIVE Sim with an artificially introduced 250 ms control lag, the policy demonstrated robust recovery. The entire pipeline runs near real-time at 10Hz on an NVIDIA Orin AGX embedded GPU.

Limitations and Future Work

While the latent diffusion video decoder generates high-quality, temporally consistent perspective views for system inspection, some visual artifacts remain present in complex scenes.

For future work, the authors propose:

  • Replacing the MLP/GRU-based world predictor with more advanced sequence models, such as Mamba (selective state space models), to improve long-horizon forecasting.
  • Quantifying exactly how much the world model reduces the total volume of real-world data required to train safe neural planners.
  • Integrating reinforcement learning techniques specifically to target rare, long-tail safety scenarios.

Summary updated

BibTeX
@misc{popov2024mitigating,
  author = {Alexander Popov and Alperen Degirmenci and David Wehr and Shashank Hegde and Ryan Oldja and Alexey Kamenev and Bertrand Douillard and David Nistér and Urs Muller and Ruchi Bhargava and Stan Birchfield and Nikolai Smolyanskiy},
  title = {{Mitigating Covariate Shift in Imitation Learning for Autonomous Vehicles Using Latent Space Generative World Models}},
  year = {2024},
  eprint = {2409.16663},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.16663},
}
Figure