Zero-Shot Traffic Flow Prediction with Large Language Models: A Comparison with Deep Learning Approaches
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Traffic flow prediction plays an important role in managing urban transportation systems, helping to reduce congestion and improve road safety. Although existing deep learning models improve their prediction accuracy with complex structures, they always require large datasets for task-specific training. Recently, the rapidly developed pre-trained large language models (LLMs) have shown outstanding performance in time series prediction. Motivated by the development, we apply two foundation models, Lag-Llama and Chronos, for zero-shot traffic flow prediction and compare their accuracy against traditional deep learning models. Our results show that LLMs outperform deep learning models in traffic flow prediction under both normal conditions and disruptive events. Unlike deep learning models, which require large-scale historical data and extensive training time for each task, pre-trained LLMs can be directly applied to datasets with different data sizes, traffic dynamics, and context lengths. We also find that LLMs with longer context lengths and larger model sizes achieve higher prediction accuracy but require increased inference times. Selecting an appropriate LLM is also crucial – models trained on a comprehensive dataset are more likely to achieve superior zero-shot performance, making them a practical and efficient choice for real-world traffic prediction applications.