Large language models (LLMs) have shown great promise for autonomous driving, yet their discrete tokenization of numbers not only limits precise numerical reasoning but also introduces redundant decoding steps for each value, posing challenges for vehicle control. These limitations affect both the processing of sensor measurements and the generation of precise control commands, creating a fundamental barrier for deploying LLM-based autonomous driving systems. In this paper, we introduce DriveCode, a novel numerical encoding method that represents continuous values as dedicated embeddings rather than discrete text tokens. DriveCode employs a number projector to map scalars into the language model's hidden space, enabling seamless integration with visual and textual features in a unified multimodal sequence. Evaluated on OmniDrive, DriveGPT4, and DriveGPT4-V2 datasets, DriveCode demonstrates superior performance in trajectory prediction and control signal generation, confirming its effectiveness for LLM-based autonomous driving systems.
We provide some data examples here.
DriveCode consistently outperforms baselines across multiple datasets in both trajectory prediction and control signal generation tasks.
| Method | L2 Error (m) ↓ |
|---|---|
| Text | 3.0797 |
| DriveCode (Ours) | 2.8274 |
| Method | Speed (m/s) | Turning Angle (degree) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| RMSE ↓ | A0.1 ↑ | A0.5 ↑ | A1.0 ↑ | A5.0 ↑ | RMSE ↓ | A0.1 ↑ | A0.5 ↑ | A1.0 ↑ | A5.0 ↑ | |
| ADAPT | 3.02 | 9.56 | 24.77 | 37.07 | 90.39 | 11.98 | 27.93 | 66.83 | 75.13 | 89.45 |
| DriveGPT4 | 1.30 | 30.09 | 60.88 | 79.92 | 98.44 | 8.98 | 59.23 | 72.89 | 79.59 | 95.32 |
| xVal | 1.13 | 26.58 | 63.46 | 82.53 | 99.10 | 8.78 | 56.99 | 72.89 | 80.08 | 93.20 |
| DriveCode (Ours) | 1.08 | 27.50 | 64.60 | 82.99 | 99.10 | 7.71 | 57.18 | 72.54 | 80.25 | 93.71 |
| Method | Theta Error (degree) ↓ | Point Error (L2, m) ↓ | Speed Error (m/s) ↓ |
|---|---|---|---|
| xVal | 0.07409 | 0.01166 | 0.02162 |
| DriveCode (Ours) | 0.07377 | 0.01137 | 0.02131 |
@misc{wang2026drivecodedomainspecificnumerical,
title={DriveCode: Domain Specific Numerical Encoding for LLM-Based Autonomous Driving},
author={Zhiye Wang and Yanbo Jiang and Rui Zhou and Bo Zhang and Fang Zhang and Zhenhua Xu and Yaqin Zhang and Jianqiang Wang},
year={2026},
eprint={2603.00919},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2603.00919},
}