Robotics · Machine Learning · June 2026
Direct Imitation Learning for Autonomous Driving: When the World-Model Latent Loses the Lane
Shilo Jeyaraj · University of Waterloo · Independent Researcher · 2026
Abstract
World-model-based approaches to autonomous driving compress sensory observations into a compact latent state before learning a policy. We show that on the MetaDrive simulator, a DreamerV3-style recurrent world model loses the lane/heading signal in its latent representation, causing any latent-conditioned policy to idle regardless of how much data or compute is invested (route completion 2%, vs. 22% for a direct obs→action clone). Pivoting to direct behavioral cloning from a 259-dimensional state vector with a three-layer MLP reveals a different ceiling: distribution shift. The policy commits to driving but goes off-road 50% of the time because it has only seen the expert driving perfectly. We show that injecting triangular steering perturbations (DART) during expert collection and relabeling with the IDM oracle cuts off-road rate from 50% to 30% and raises route completion from 24% to 39%. A per-scene breakdown reveals that this aggregate masks near-expert performance on three of four geometry types (straight 96%, curve 87%, intersection 84%) while a single geometry — roundabouts — accounts for nearly all remaining failures (route 42%, off-road 60%). Scene-targeted data augmentation raises roundabout route completion to 64% (+22 percentage points) without regressing other scenes. Three iterations of DAgger with IDM relabeling match but do not exceed the plain BC + augmentation baseline, as growing dataset heterogeneity raises behavioral cloning loss and causes regression by iteration 3. We conclude that for CPU-scale imitation learning in simulation, targeted scene augmentation is a more stable improvement lever than online DAgger. All code and trained checkpoints are available at github.com/shilojeyaraj/driving-world-model.
1.Introduction
Learning to drive from demonstrations is a canonical imitation learning problem. Modern approaches follow one of two paradigms: (1) learn a world model that predicts future latent states under imagined actions, then optimise a policy against those imaginations; or (2) clone a policy directly from observations to actions using an expert oracle. The world-model paradigm is theoretically attractive — imagination-based planning can explore policies without executing dangerous actions — but relies critically on the latent representation preserving the information the policy needs.
In this work we study what happens when the latent representation fails to preserve that information. On the MetaDrive procedural driving simulator, we train a DreamerV3-style RSSM on 8,000 steps of expert IDM demonstrations, then train a policy on the frozen world-model latent via behavioral cloning. The result is an agent that idles: route completion 2%, behavioral cloning loss 2.06. Crucially, the 259-dimensional observation space already contains the full lane/heading signal explicitly — the world model is compressing it away rather than enriching it.
A three-layer MLP cloned directly from the 259-dim state to a 2-dim action achieves bc_loss 0.05 and route completion 22–24% out of the box. This reframing shifts the bottleneck from representation to distribution shift: behavioral cloning fails not because the policy lacks information, but because it has only seen the expert driving cleanly and cannot recover once it drifts. The rest of this paper characterises and addresses this gap through recovery data injection (DART perturbation), targeted scene augmentation, and online data aggregation (DAgger).
Our contributions are:
- 1An empirical demonstration that a DreamerV3-style world model on vector observations loses the lane signal in its latent, making latent-conditioned policies unable to drive regardless of training budget.
- 2A recovery data protocol using triangular steering perturbation (DART) and IDM relabeling that cuts off-road rate by 40% relative (50%→30%) and increases route completion from 24% to 39%.
- 3A per-scene diagnostic revealing that aggregate route metrics mask near-expert performance on most geometry types; a single geometry (roundabouts) dominates the residual gap.
- 4A scene-targeted augmentation strategy that raises roundabout route completion by 22 percentage points while preserving performance on all other scenes.
- 5An empirical comparison of DAgger vs. static augmentation at CPU-scale, showing that DAgger matches but does not exceed the augmented BC baseline and regresses by iteration 3 due to dataset heterogeneity.
2.Related Work
Imitation Learning for Autonomous Driving
ALVINN introduced behavioral cloning for driving from camera images. Ross et al. formalised Dataset Aggregation (DAgger) to address distribution shift by iteratively querying the expert at states visited by the current policy. ChauffeurNet augments demonstrations with synthesised perturbations and auxiliary loss heads to improve recovery behaviour. Our work applies these ideas in a low-compute, simulation-only setting using the Intelligent Driver Model as the oracle.
World Models for Driving
DreamerV3 learns a recurrent world model (RSSM) by jointly optimising a reconstruction decoder, a reward predictor, and a discount predictor, then derives a policy by imagining rollouts in latent space. Our failure case — a world model that compresses away the precise signal the policy needs — is a known risk with RSSM-based representations when the observation space is already low-dimensional and the model is under-trained.
Distribution Shift in Behavioral Cloning
DAgger corrects distribution shift by on-policy data collection; DART injects noise to force the policy into off-distribution states during collection, providing recovery labels without requiring online expert querying. We combine both approaches and compare their effectiveness at modest compute.
MetaDrive
MetaDrive is a lightweight, procedurally generated driving simulator with a modular road block system supporting diverse geometry types (straight, curve, intersection, roundabout). Its Intelligent Driver Model (IDM) provides a rule-based expert oracle that can be queried at arbitrary states, making it ideal for DAgger and relabeling experiments.
3.Methods
Environment and Observation Space
All experiments use MetaDrive's MetaDriveEnv with 50 training maps and a held-out evaluation set. The observation is a 259-dimensional vector comprising ego vehicle state (speed, heading, lateral offset), LiDAR point cloud returns (120 beams), and navigation targets. Actions are 2-dimensional: steering ∈ [−1, 1] and acceleration ∈ [−1, 1]. Episode length is capped at 1,000 steps; an episode terminates on collision, going off-road, or reaching the route endpoint.
Expert Oracle
We use MetaDrive's built-in Intelligent Driver Model (IDM) as the expert oracle throughout. IDM is rule-based (not learned), models car-following and lane-keeping using closed-form kinematic equations, and achieves 99% route completion on held-out maps. We query it via IDMPolicy.act() at each environment step to obtain expert action labels.
World-Model Baseline (RSSM-BC)
We train a DreamerV3-style RSSM with a 32×32 categorical latent, GRU recurrent state of dimension 512, and decoders for observation reconstruction, reward, and discount. Training uses 8,000 IDM demonstration steps over 50,000 gradient steps. We then freeze the world-model encoder and train a two-layer MLP actor on the latent state via behavioral cloning (L1 loss against IDM actions) for 5,000 gradient steps with batch size 64.
Direct Policy (DirectBC)
The direct policy is a three-layer MLP with hidden dimension 256 and SiLU activation. Output is squashed by tanh to [−1, 1]². Trained with L1 loss against IDM action labels, Adam optimiser, learning rate 3×10⁻⁴, batch size 256.
Recovery Data via DART Perturbation
To teach recovery behaviour we inject triangular steering impulses during collection, following DART. At each step with probability ppert = 0.02, steering is displaced by a triangular waveform with magnitude γ = 0.15 and duration τ ~ U[10, 40] steps. We execute the perturbed action in the environment but store the clean IDM action as the training label, so the policy sees the recovery state but learns the correct centering action. We collect 8,000 clean steps and 8,000 perturbed steps, training on the combined 16,000-step dataset.
Scene-Targeted Augmentation
After identifying roundabouts as the dominant failure geometry via per-scene evaluation, we inject additional demonstrations specifically on roundabout maps (map="O" in MetaDrive). We collect an additional 4,000 clean IDM steps and 4,000 recovery steps on roundabout geometry and mix them into the training dataset, giving a total of 24,000 training steps.
DAgger
At each DAgger iteration we roll out the current policy for 2,000 steps, relabel each state with the IDM action via IDMPolicy.act(), and aggregate into the training buffer. We run 3 iterations, starting from the clean+recovery+boost baseline. We evaluate two DAgger variants: one applied to the direct policy and one applied to the RSSM-conditioned actor as an ablation.
Evaluation Protocol
All evaluation uses deterministic fixed seeds on held-out maps. We report:
- Route completion %: fraction of the route navigated before episode termination, averaged across episodes.
- Off-road rate: fraction of episodes that terminate due to leaving the drivable surface.
- Crash rate: fraction of episodes terminating due to collision.
- Recovery rate: fraction of episodes in which the policy successfully re-enters the lane after being displaced off-center for the first 30 steps.
4.Results
World Model Latent vs. Direct Observation
Table 1 shows the core reframing result. The RSSM-BC policy achieves route completion identical to a random agent (2%), despite 50,000 gradient steps of world-model training and 5,000 steps of actor training. The bc_loss of 2.06 — compared to 0.05 for DirectBC — indicates that the world-model latent state does not contain sufficient lane/heading information for the actor to fit the IDM actions. The direct MLP achieves 44× lower bc_loss and drives non-trivially (22% route completion) with no world-model component at all.
The 259-dim state observation already exposes heading angle, lateral lane offset, and navigation waypoints explicitly as named features. The RSSM encoder maps this structured signal through a learned compression that, at this training scale, produces a latent that is easier to reconstruct from than to plan actions from — a known failure mode of reconstruction-based world models when the prediction task does not require preserving the action-relevant signal.
Table 1 — World-model-latent BC vs. direct obs→action BC on held-out maps (n=10 episodes). IDM is the rule-based expert upper bound.
| Policy | Route % | Off-road % | Crash % | bc_loss |
|---|---|---|---|---|
| Random | 2% | 0% | 0% | — |
| RSSM-BC (WM latent) | 2% | 0% | 0% | 2.06 |
| DirectBC (this work) | 22% | 90% | 20% | 0.05 |
| IDM (expert) | 99% | 0% | 0% | — |

Figure 1. Full project arc: route completion across all milestones on held-out maps. The RSSM-BC world-model policy (2%) is indistinguishable from a random agent; switching to direct obs→action cloning immediately lifts route completion to 24%. Recovery data (DART) raises it to 39%, scene-targeted augmentation lifts the roundabout geometry to 64%, and DAgger matches but does not exceed the BC+boost baseline. IDM (99%) is the rule-based expert upper bound.
Recovery Data Eliminates Crashes
Adding 8,000 recovery steps (Table 2) yields three improvements: route completion 24%→39% (+15pp), crash rate 20%→0%, off-road rate 50%→30% (−40% relative). The policy has learned to steer back toward the lane center after perturbation-induced drift. Crash rate reaches zero because collisions in MetaDrive arise from over-correction that swings the vehicle into traffic, which recovery training specifically addresses.
Doubling the dataset (32,000 steps) raises recovery rate from 40% to 70% but leaves route completion flat at 39%, confirming a capacity ceiling. Adding a shared auxiliary head predicting per-step reward alongside the action worsens off-road rate (30%→40%) and recovery rate (70%→40%), consistent with the auxiliary task competing for representation capacity when the observation already contains the lane signal explicitly.
Table 2 — Effect of recovery data (DART perturbation + IDM relabeling) on held-out maps (n=10 episodes).
| Training data | Route % | Off-road % | Crash % | Recovery rate |
|---|---|---|---|---|
| Clean only (8k) | 24% | 50% | 20% | — |
| Clean + recovery (16k) | 39% | 30% | 0% | 40% |
Per-Scene Breakdown Reveals a Single Failure Geometry
The aggregate route completion of 39% masks a stark geometry-dependent split (Table 3). Three of four geometry types show near-IDM performance: the policy drives straights at 96%, curves at 82%, and intersections at 84%. Roundabouts are categorically different: route 42%, success 0%, crash 40%, off-road 60%. The aggregate 30% off-road rate is almost entirely attributable to roundabouts.
This finding reframes the next improvement target. The aggregate metric suggested a broadly underperforming policy; the per-scene breakdown reveals a policy that is near-competent on most tasks, with one failing geometry type accounting for the residual gap. The 42% roundabout route completion is consistent with the policy successfully navigating the straight approach before failing at the curved entry arc, where the required steering angle is sharp and the state distribution is qualitatively different from anything in the clean training data.
Table 3 — Per-geometry evaluation of the best static BC policy (clean+recovery, 16k steps). n=10 held-out episodes per geometry.
| Geometry | Route % | Success % | Crash % | Off-road % |
|---|---|---|---|---|
| Straight (S) | 96% | 100% | 0% | 0% |
| Curve (C) | 82% | 40% | 0% | 10% |
| Intersection (X) | 84% | 70% | 30% | 0% |
| Roundabout (O) | 42% | 0% | 40% | 60% |
Scene-Targeted Augmentation Raises Roundabout Performance by 22pp
Adding 8,000 roundabout-specific steps (4k clean + 4k recovery) raises roundabout route completion from 42% to 64% (+22pp) and cuts off-road rate from 60% to 30% (Table 4). No other geometry regresses; curves improve by a further 5pp as a beneficial side effect of the additional curved-geometry data.
The aggregate gain is modest (+2pp) because the mixed-map evaluation samples uniformly over geometry types. The per-scene gain is the meaningful signal. Qualitatively, the boosted policy successfully navigates the roundabout entry arc in the majority of episodes, with remaining failures concentrated at tight mid-roundabout turns where the required steering exceeds the training data coverage even with augmentation.
Table 4 — Per-geometry comparison: clean+recovery (16k) vs. clean+recovery + roundabout boost (24k). n=10 held-out episodes per geometry.
| Geometry | Route % (before) | Route % (after) | Off-road % (before) | Off-road % (after) |
|---|---|---|---|---|
| Straight | 96% | 96% | 0% | 0% |
| Curve | 82% | 87% | 10% | 0% |
| Intersection | 84% | 84% | 0% | 0% |
| Roundabout | 42% | 64% | 60% | 30% |
| Aggregate | 39% | 41% | 30% | 20% |

Figure 2. Per-geometry route completion (blue) and off-road rate (red) for the boosted policy on held-out maps (n=10 per geometry). Straight, curve, and intersection reach 84–96% route completion with near-zero off-road rate. Roundabout is the sole failure geometry: 64% route completion, 30% off-road, after scene-targeted augmentation (down from 42% route, 60% off-road without it).
DAgger Matches but Does Not Exceed Augmented BC
Table 5 shows direct-policy DAgger results. Iteration 1 matches the augmented BC baseline (41%). However, iterations 2 and 3 show clear regression: route completion drops to 35% and off-road rate doubles. The bc_loss rise from 0.043 to 0.316 reveals the mechanism: IDM relabels at the policy's failure states are high-variance and structurally different from the clean training distribution. As the proportion of failure-state data grows, the combined dataset becomes harder to fit, and the optimiser trades performance on well-represented clean states for a failed attempt to fit the noisy failure-state labels.
WM-based DAgger iterates from 1% to 13% route completion, confirming that the RSSM latent can be improved by on-policy data but remains hard-capped well below the direct policy. The large gap (13% vs. 41%) after equal DAgger budgets confirms that the latent representation — not the amount of on-policy data — is the binding constraint.
Table 5 — Direct-policy DAgger from the policy_boosted initialisation. 2,000 rollout steps per iteration; IDM relabeling; n=5 held-out episodes per evaluation.
| Iteration | Route % | Off-road % | bc_loss | Note |
|---|---|---|---|---|
| 0 (BC+rec+boost) | 38% | 20% | 0.043 | strong baseline |
| 1 (+2k rollout) | 41% | 20% | 0.057 | tied policy_boosted |
| 2 (+2k more) | 39% | 20% | 0.150 | loss rising |
| 3 (+2k more) | 35% | 40% | 0.316 | regression |

Figure 3. WM-based DAgger (RSSM latent). Route completion climbs slowly (1%→13%) but plateaus far below the direct policy, confirming the latent is the hard ceiling regardless of on-policy data volume. The gap between WM DAgger (13%) and direct BC+boost (41% aggregate, 64% roundabout) is entirely attributable to representation quality.
5.Discussion
When World Models Compress Away the Signal
Our negative result on the RSSM latent is worth unpacking. The world model is trained to minimise reconstruction loss on a 259-dim observation. Of those 259 dimensions, the features most useful for reconstruction (LiDAR returns, which are smooth and predictable) are not the features most useful for action prediction (heading error and lateral lane offset, which are small in magnitude but carry the full lane-keeping signal). The RSSM optimises a reconstruction objective that weights all input dimensions equally, so the lane signal is under-represented in the latent relative to its policy-relevance.
This failure mode is specific to the mismatch between reconstruction-optimal and policy-optimal representations when observations are structured vectors rather than images. For image-based driving, the world model must decode every pixel including lane markings, forcing the latent to encode them. For vector observations, the latent is free to discard low-reconstruction-loss features regardless of policy relevance.
Recovery Data vs. Online Aggregation
Both DART and DAgger address distribution shift, but their stability properties differ at small compute budgets. DART injects controlled, bounded perturbations during collection: the car remains near the lane center (perturbation magnitude γ = 0.15, triangular decay), so the off-distribution states it visits form a narrow band around the nominal distribution. Expert labels at perturbed states are consistent and low-variance.
DAgger visits the policy's actual failure states, which are broader and more heterogeneous. IDM's relabeled actions at these states are well-defined but high-variance across the failure-state distribution and often conflict with training signals from clean demonstrations. With only 2,000 rollout steps per iteration — 12.5% of the 16,000-step clean buffer — the signal-to-noise ratio is low. At CPU-scale budgets where large rollout sets are prohibitive, DART-style static perturbation is a more reliable recovery data source.
Per-Scene Evaluation as a Development Tool
The per-scene evaluation methodology proved more informative than aggregate metrics throughout this project. The aggregate route completion of 39% suggested a broadly underperforming policy; the per-scene breakdown revealed that 75% of geometry types were solved at near-IDM level and identified a single failure mode. This allowed targeted intervention producing a 22pp per-scene gain at zero cost to other geometries — a gain that aggregate-metric-guided development would not have identified. Practitioners training driving policies in simulation should evaluate per-geometry from the start.
Limitations
All results are in MetaDrive simulation. Real-world transfer involves sensor noise, partial observability, and non-IDM traffic. The 259-dim state observation is provided by the simulator; a real deployment would require perception. All experiments ran on a single laptop CPU — the DAgger regression at 2,000 rollout steps/iteration might not appear at larger rollout budgets where the signal-to-noise ratio in the aggregated dataset is higher. IDM is a rule-based car-following model optimised for highway scenarios; its relabeled actions at roundabout entry arcs may not represent the globally optimal steering trajectory.
6.Conclusion
We have shown that a DreamerV3-style world model trained on structured vector observations loses the lane/heading signal in its latent, causing the downstream policy to idle regardless of training budget. Pivoting to direct behavioral cloning reveals a more tractable problem: distribution shift from clean centerline demonstrations. We address this with DART perturbation, per-scene diagnostic evaluation, and targeted scene augmentation, progressing from 2% route completion to 64% on the hardest geometry type (roundabouts) while achieving 84–96% on the others. DAgger matches but does not exceed the static augmentation baseline at our compute budget.
The main practical takeaways: (1) on structured vector observations, clone directly — reconstruction-based world models compress away policy-relevant signals; (2) use per-geometry evaluation from the start rather than aggregate metrics; (3) at CPU-scale, controlled static perturbation (DART) is more stable than online DAgger for recovery data generation.
References
[1] Li, Q., Peng, Z., Feng, L., Zhang, Q., Xue, Z., & Zhou, B. (2022). MetaDrive: Composing Diverse Driving Scenarios for Generalizable Reinforcement Learning. IEEE TPAMI.
[2] Hafner, D., Lillicrap, T., Norouzi, M., & Ba, J. (2023). Mastering Diverse Domains through World Models. arXiv:2301.04104.
[3] Hafner, D., et al. (2019). Learning Latent Dynamics for Planning from Pixels. ICML.
[4] Pomerleau, D. A. (1989). ALVINN: An Autonomous Land Vehicle in a Neural Network. NeurIPS.
[5] Ross, S., Gordon, G., & Bagnell, D. (2011). A Reduction of Imitation Learning to No-Regret Online Learning. AISTATS.
[6] Laskey, M., et al. (2017). DART: Noise Injection for Robust Imitation Learning. CoRL.
[7] Treiber, M., Hennecke, A., & Helbing, D. (2000). Congested Traffic States in Empirical Observations and Microscopic Simulations. Physical Review E, 62(2).
[8] Bansal, M., Krizhevsky, A., & Ogale, A. (2019). ChauffeurNet: Learning to Drive by Imitating the Best and Synthesizing the Worst. RSS.