C-TRAIL: A Commonsense World Framework for Trajectory Planning in Autonomous Driving
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
Abstract
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
| Category | Setting |
| Simulation Environment | |
| Simulator | Highway-env [ 46 ] |
| Scenarios | Highway, Merge, Roundabout, |
| Intersection | |
| Action space | {IDLE, FASTER, SLOWER, |
| LANE_LEFT, LANE_RIGHT} | |
| 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 | |
| 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 |
| No filtering | 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| Method | Recall | Plan | Update |
| DiLu [ 47 ] | |||
| LC-LLM [ 61 ] | |||
| Voyager [ 36 ] | |||
| TrafficSafetyGPT [ 22 ] | |||
| Wen et al. [ 62 ] | |||
| MBAPPE [ 63 ] |