C-TRAIL: A Commonsense World Framework for Trajectory Planning in Autonomous Driving
Authors: Zhihong Cui, Haoran Tang, Tianyi Li, Yushuai Li, Peiyuan Guan, Amir Taherkordi, Tor Skeie
Organizations: the Department of Informatics, University of Oslo, Norway · the Department of Computing, Hong Kong Polytechnic University, Hong Kong, China · the Department of Computer Science, Aalborg University, Denmark
Trajectory planning for autonomous driving increasingly leverages large language models (LLMs) for commonsense reasoning, yet LLM outputs are inherently unreliable, posing risks in safety-critical applications. We propose C-TRAIL, a framework built on a Commonsense World that couples LLM-derived commonsense with a trust mechanism to guide trajectory planning. C-TRAIL operates through a closed-loop Recall, Plan, and Update cycle: the Recall module queries an LLM for semantic relations and quantifies their reliability via a dual-trust mechanism; the Plan module injects trust-weighted commonsense into Monte Carlo Tree Search (MCTS) through a Dirichlet trust policy; and the Update module adaptively refines trust scores and policy parameters from environmental feedback. Experiments on four simulated scenarios in Highway-env and two real-world levelXData datasets (highD, rounD) show that C-TRAIL consistently outperforms state-of-the-art baselines, reducing ADE by 40.2%, FDE by 51.7%, and improving SR by 16.9 percentage points on average. The source code is available at https://github.com/ZhihongCui/CTRAIL.
Figures & tables
Fig. 1: The commonsense world paradigm for trajectory planning in dynamic environments
Fig. 2: The C-TRAIL, A Commonsense World Framework for Trajectory Planning in Autonomous Driving
Fig. 4: Examples of correct and incorrect LLM outputs.
Category
Setting
Simulation Environment
Simulator
Highway-env [ 46 ]
Scenarios
Highway, Merge, Roundabout,
Intersection
Action space ∣A∣
{IDLE, FASTER, SLOWER,
LANE_LEFT, LANE_RIGHT}
TABLE I: Experiment settings and hyperparameters for C-TRAIL.
Scenario
Metric
DQN
MCTS
GRAD
LMTraj
DiLu
LangMPC
GPT-Dr
C-TRAIL (3.5)
C-TRAIL (4o)
p -value
Seen Environments
Highway
ADE ↓
2.87 ± 0.31
2.63 ± 0.26
2.51 ± 0.25
1.32 ± 0.15
1.15 ± 0.15
1.25 ± 0.18
1.20 ± 0.17
0.77 ± 0.12
0.68 ± 0.11
3.1e-5
FDE ↓
5.12 ± 0.27
4.82 ± 0.25
4.61 ± 0.22
3.24 ± 0.18
2.81 ± 0.17
3.05 ± 0.20
2.95 ± 0.19
0.92 ± 0.20
0.80 ± 0.09
8.7e-6
SR(%) ↑
25.4 ± 3.3
29.5 ± 2.5
31.2 ± 2.0
68.3 ± 2.4
73.2 ± 1.9
70.8 ± 2.2
71.5 ± 2.1
86.6 ± 2.5
88.3 ± 1.6
5.2e-6
Merge
ADE ↓
3.72 ± 0.25
3.48 ± 0.22
3.36 ± 0.18
2.17 ± 0.32
1.83 ± 0.22
2.04 ± 0.28
1.95 ± 0.26
1.27 ± 0.58
0.93 ± 0.35
4.8e-3
FDE ↓
5.93 ± 0.21
5.61 ± 0.18
5.47 ± 0.16
3.89 ± 0.37
3.07 ± 0.36
3.52 ± 0.39
3.35 ± 0.34
1.62 ± 0.28
1.42 ± 0.32
1.4e-4
TABLE II: Performance Comparison in Seen and Unseen Environments.
Variants
Highway
Merge
Roundabout
Intersection
ADE ↓
FDE ↓
SR(%) ↑
ADE ↓
FDE ↓
SR(%) ↑
ADE ↓
FDE ↓
SR(%) ↑
ADE ↓
FDE ↓
SR(%) ↑
w/o Trust
1.10 ± 0.27
1.45 ± 0.31
72.4 ± 5.6
1.55 ± 0.25
2.34 ± 0.42
70.1 ± 4.4
2.30 ± 0.32
3.40 ± 0.52
68.5 ± 4.9
2.85 ± 0.07
4.75 ± 0.09
65.7 ± 3.7
w/o Dirichlet policy
1.45 ± 0.30
1.82 ± 0.37
63.5 ± 6.2
1.85 ± 0.26
2.96 ± 0.43
60.2 ± 4.7
2.78 ± 0.36
3.91 ± 0.56
58.7 ± 5.4
3.12 ± 0.11
5.45 ± 0.13
55.3 ± 4.3
w/o Adaptive update
0.88 ± 0.25
1.12 ± 0.26
82.3 ± 5.3
1.20 ± 0.18
1.85 ± 0.29
81.0 ± 3.6
1.70 ± 0.25
2.30 ± 0.44
79.8 ± 3.5
2.05 ± 0.05
3.95 ± 0.08
77.6 ± 2.9
C‑TRAIL (GPT‑4o)
0.68 ± 0.11
0.80 ± 0.09
88.3 ± 1.6
0.93 ± 0.35
1.42 ± 0.32
87.1 ± 1.8
1.38 ± 0.25
1.75 ± 0.70
85.2 ± 2.2
1.62 ± 0.73
3.05 ± 0.34
84.2 ± 3.2
TABLE III: Ablation Study of Key Modules on Planning Performance.
Fig. 5: Trust score dynamics ( Ct ) under normal and error injection conditions on highway . Errors are injected at t=4 .
No filtering
ckin only
Dual trust (full)
Highway
RPA ↑
68.40 ± 2.15
79.60 ± 1.85
89.30 ± 1.20
SR(%) ↑
74.80 ± 2.30
82.70 ± 1.95
88.30 ± 1.35
Merge
RPA ↑
65.10 ± 2.45
76.30 ± 2.10
86.80 ± 1.45
SR(%) ↑
71.50 ± 2.60
80.30 ± 2.20
87.10 ± 1.50
Roundabout
RPA ↑
61.20 ± 2.70
74.80 ± 2.25
85.70 ± 1.55
SR(%) ↑
70.30 ± 2.85
78.90 ± 2.40
85.20 ± 1.70
TABLE IV: LLM Output Quality Before and After Trust Filtering.
Scenario
Method
ADE ↓
FDE ↓
SR(%) ↑
Highway (Normal)
GRAD
2.51 ± 0.25
4.61 ± 0.22
31.2 ± 2.0
DiLu
1.15 ± 0.15
2.81 ± 0.17
73.2 ± 1.9
C-TRAIL
0.68 ± 0.11
0.80 ± 0.09
88.3 ± 1.6
Highway (Aggressive)
GRAD
3.18 ± 0.33
5.42 ± 0.30
22.5 ± 2.8
DiLu
1.72 ± 0.22
3.65 ± 0.24
58.4 ± 3.1
C-TRAIL
0.92 ± 0.15
1.18 ± 0.14
79.6 ± 2.4
TABLE V: Performance Under Normal vs. Aggressive NPC Behavior.
γdiri
Highway
Merge
Roundabout
Intersection
ADE ↓
FDE ↓
SR(%) ↑
ADE ↓
FDE ↓
SR(%) ↑
ADE ↓
FDE ↓
SR(%) ↑
ADE ↓
FDE ↓
SR(%) ↑
0.1
0.82 ± 0.14
0.98 ± 0.12
84.5 ± 2.3
1.15 ± 0.39
1.72 ± 0.37
83.2 ± 2.4
1.62 ± 0.28
2.08 ± 0.74
81.3 ± 2.8
1.95 ± 0.78
3.52 ± 0.40
79.8 ± 3.6
0.3
0.68 ± 0.11
0.80 ± 0.09
88.3 ± 1.6
0.93 ± 0.35
1.42 ± 0.32
87.1 ± 1.8
1.38 ± 0.25
1.75 ± 0.70
85.2 ± 2.2
1.62 ± 0.73
3.05 ± 0.34
84.2 ± 3.2
0.5
0.75 ± 0.13
0.91 ± 0.11
86.1 ± 2.0
1.05 ± 0.37
1.58 ± 0.35
84.8 ± 2.1
1.51 ± 0.27
1.93 ± 0.72
83.0 ± 2.5
1.78 ± 0.75
3.28 ± 0.37
81.7 ± 3.4
0.7
0.91 ± 0.16
1.08 ± 0.14
82.7 ± 2.5
1.28 ± 0.41
1.89 ± 0.39
80.5 ± 2.8
1.78 ± 0.31
2.35 ± 0.78
78.4 ± 3.1
2.15 ± 0.80
3.85 ± 0.43
76.3 ± 3.8
0.9
1.12 ± 0.19
1.35 ± 0.18
78.2 ± 3.1
1.52 ± 0.44
2.24 ± 0.42
75.8 ± 3.3
2.08 ± 0.35
2.78 ± 0.82
73.6 ± 3.7
2.58 ± 0.85
4.32 ± 0.48
70.5 ± 4.2
TABLE VI: Sensitivity of Trust Calibration Rate γdiri on Planning Performance.
Density 2.0
Density 3.0
Scenario
Lanes
ADE ↓
FDE ↓
ADE ↓
FDE ↓
Highway
4
0.68 ± 0.11
0.80 ± 0.09
0.74 ± 0.12
0.88 ± 0.11
5
0.71 ± 0.12
0.84 ± 0.11
0.78 ± 0.13
0.92 ± 0.12
Merge
4
0.93 ± 0.35
1.42 ± 0.32
1.05 ± 0.42
1.57 ± 0.37
5
0.97 ± 0.36
1.48 ± 0.33
1.11 ± 0.38
1.64 ± 0.35
Roundabout
2
1.38 ± 0.25
1.75 ± 0.70
1.45 ± 0.28
1.87 ± 0.75
TABLE VII: Robustness to Lane Count and Vehicle Density.
Highway
Roundab.
highD
rounD
LMTraj
Infer (s)
1.56 ± 0.14
1.73 ± 0.20
1.61 ± 0.16
1.78 ± 0.22
Mem (MB)
276 ± 4
295 ± 4
278 ± 5
298 ± 5
DiLu
Infer (s)
15.39 ± 0.50
17.81 ± 0.37
15.72 ± 0.48
18.05 ± 0.42
Mem (MB)
613 ± 19
662 ± 20
621 ± 20
670 ± 21
LangMPC
Infer (s)
12.35 ± 0.39
13.42 ± 0.36
12.52 ± 0.38
13.58 ± 0.40
Mem (MB)
485 ± 14
510 ± 15
490 ± 14
515 ± 15
TABLE VIII: Computational Efficiency of LLM-Based Methods.
Fig. 6: Successfully executed planned trajectories across four scenarios. The green box denotes the ego vehicle, which follows the planned 5-step trajectory. Blue boxes represent surrounding vehicles controlled by the simulator.
Fig. 7: Failed planned trajectories resulting in collisions, illustrating three failure types: policy error (a), model error (c), and mapping error (d).
Scenario
Policy Error
Model Error
Mapping Error
Highway
52.30 ± 3.12
28.60 ± 2.71
19.10 ± 2.38
highD
50.80 ± 3.42
30.40 ± 2.93
18.80 ± 2.51
Roundabout
45.10 ± 3.24
35.80 ± 3.05
19.10 ± 2.33
rounD
42.60 ± 3.48
38.50 ± 3.15
18.90 ± 2.58
Average
47.70 ± 3.32
33.33 ± 2.96
19.00 ± 2.45
TABLE IX: Failure Breakdown (%) in Seen Environments.
Method
Recall
Plan
Update
DiLu [ 47 ]
✓
Δ
Δ
LC-LLM [ 61 ]
✓
✓
×
Voyager [ 36 ]
✓
Δ
✓
TrafficSafetyGPT [ 22 ]
✓
×
×
Wen et al. [ 62 ]
×
✓
×
MBAPPE [ 63 ]
×
✓
×
TABLE X: Comparison of representative methods across the Recall, Plan, and Update stages in trajectory planning. ✓ : the method explicitly designs a dedicated module or mechanism for the stage; Δ : the stage is partially addressed as a byproduct of the main design, without a dedicated or complete mechanism; × : the stage is not addressed.
Large language models (LLMs) are promising for autonomous driving, but semantics-only decision policies can yield physically unsafe behavior in dynamic traffic. Existing methods either perform online language reasoning without explicit dynamics verification or use world models mainly in offline pipelines, leaving a gap between semantic intent and physical feasibility at decision time. We propose Reason--Imagine--Act (RIA), a closed-loop framework that couples an LLM reasoner with an action-conditioned world model for online safety verification. At each step, the LLM proposes an action template and candidate sub-actions, the world model performs short-horizon rollouts, and a safety scorer selects the safest executable action with feedback to the next reasoning step. Under a unified CARLA point-goal protocol (1000 episodes), RIA achieves 80.05% route completion, 51.10% arrival rate, and 0.20% collision rate. Under the same closed-loop interface, RIA consistently outperforms training-free baselines, including CARLA TM and MADA, on core closed-loop metrics. For reproducibility, code is available at https://github.com/pku-smart-city/source_code/tree/main/RIA.
Zhengqi Sun, Yiwen Sun, Boxuan Liu +3
Department of Information Management, Peking University, Beijing 100871, China · School of Intelligence Science and Technology, Peking University, Beijing 100871, China · State Key Laboratory of General Artificial Intelligence, BIGAI, Beijing 100080, China +3
Vision-Language Models (VLMs) provide powerful semantic understanding and commonsense reasoning for End-to-End Autonomous Driving (E2E-AD) planning. However, trajectories directly generated by VLMs often encode only coarse driving intentions and remain insufficient for geometrically accurate, future-aware, and multi-view-grounded planning. To address these limitations, we develop the Layer-Wise World-Model-Guided Driving framework (LWDrive). LWDrive is a VLM planning framework that refines coarse trajectories through layer-wise world-model guidance. Instead of treating the VLM output as the final trajectory, LWDrive uses it as an intent-aware coarse plan, expands a diverse candidate space around it, and progressively refines the candidates through a Foresight Cascade Planner (FCP). Specifically, we introduce future-frame generation supervision to encourage the VLM to learn forward-looking scene representations, thereby injecting planning-relevant predictive dynamics into its internal hidden states. Built upon these world-model-supervised representations, FCP exploits VLM features across multiple layers and integrates historical temporal states, Action-Query representations, and current-frame multi-view Bird's-Eye-View (BEV) features to refine candidate trajectories in a coarse-to-fine manner. This design enables progressive correction of spatial positions and motion trends while grounding trajectory refinement with multi-view scene cues and preserving the high-level driving intention produced by the large model. Finally, a score head evaluates the refined candidates and selects the best trajectory as the final planning output. Experiments show that LWDrive achieves a score of 92.0 on the NAVSIM benchmark and 89.6 on NAVSIM-v2. Code and models will be made publicly available.
Trajectory planning for autonomous driving requires both high-level reasoning and precise low-level control. Large Language Models (LLMs) offer semantic-rich planning capabilities, however, their application is limited by hallucinated reasoning, poor grounding in environment dynamics, and limited numerical precision in control. We propose GAPL (Grounded Action-effect Policy Learning), a unified framework that integrates LLM-based effect estimation, simulation-based effect grounding, and policy optimization into a closed-loop system. GAPL consists of three modules: (1) an LLM-based Effect Evaluator for structured multi-dimensional action-effect estimation; (2) a Simulation-based Effect Grounder that predicts dynamics-consistent effects from simulator rollouts; and (3) an Effect-Aware Decision Maker that grounds LLM effect estimates against simulation via a distiller to guide Proximal Policy Optimization (PPO)-based policy learning. Experiments on four Highway-env scenarios demonstrate that GAPL consistently outperforms baselines, achieving average reductions of {0.76, 0.86, 2.00} in collision rate, average displacement error (ADE), and final displacement error (FDE), and an average reward gain of 1.44.
Zhihong Cui, Hengyu Liu, Zhangkai Wu +5
Department of Informatics, University of Oslo, Oslo, Norway · Department of Computer Science, Aalborg University, Aalborg, Denmark · University of Sydney, Sydney, Australia +2