arXiv:2609.11314cs.LGSep 2026

Manuscript Offprint

arXiv:2609.11314

A Dynamic Fusion Large Language Model for Traffic Flow Prediction

Xue Qiu, Jianli Xiao

Xue Qiu 1^{1} ID^{ID} and Jianli Xiao 1^{1}(✉) ID^{ID}

School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai, China

233370847@st.usst.edu.cn, audyxiao@sjtu.edu.cn

Abstract. Traffic flow prediction is a core supporting technology for intelligent transportation systems. It uses historical data to infer future traffic dynamics in specific areas, thereby helping to alleviate congestion and improve resource allocation efficiency. Traditional neural networks struggle to break through accuracy limits due to their reliance on singular feature modeling, while large language models (LLMs) suffer from insufficient capture of spatial topological information and mining spatiotemporal correlation. This study proposes a Dynamic Fusion Large Language Model (DF-LLM) for traffic flow prediction. The model incorporates three core components: spatiotemporal embedding module, spatiotemporal fusion module, and LLM backbone. The spatiotemporal embedding module enables synergistic representation of multi-scale spatiotemporal features. The spatiotemporal fusion module integrates spatial topology and dynamic dependencies via graph convolution. The LLM backbone adopts a differentiated parameter adaptation strategy to balance training efficiency and traffic data adaptability. Additionally, it introduces a context aggregation attention module to strengthens global dependencies. More importantly, the LLM backbone takes the residual connections to mitigate the gradient vanishing in deep networks. Experiments show that DF-LLM has achieved better performance by comparing the metrics on all the four datasets.

Keywords: Traffic Flow Prediction · Intelligent Transportation Systems · Large Language Models · Spatiotemporal Features · Dynamic Fusion

1 Introduction

Within intelligent transportation systems (ITS), traffic flow prediction plays a pivotal role, enabling accurate forecasting of future traffic conditions based on historical data. This capability is essential for advancing traffic management, alleviating congestion, and optimizing resource allocation [1,2][1,2].

While traditional time series models like ARIMA and Kalman Filtering can capture linear temporal trends, they struggle to model the complex spatiotemporal dependencies in traffic data. Convolutional neural networks (CNNs) and recurrent neural networks (RNNs) have been widely used to capture spatial and

Xue Qiu ID^{ID} and Jianli Xiao (✉)^{(✉)}

temporal dependencies [3]. Nevertheless, these models are fundamentally constrained by the irregular, non-Euclidean topology of traffic data and its multi-scale periodic patterns. Graph convolutional networks (GCNs) [4–7] have been introduced to explicitly address spatial structure in traffic networks, but they often suffer from over-smoothing, limiting their ability to capture global patterns. Attention-based models offer more flexibility but come with complex architectures and substantial computational overhead.

LLMs have achieved significant progress across multiple domains and are gradually being utilized in time series research. By leveraging extensive pretraining and massive parameter capacities, LLMs maintain structural stability while enhancing performance [8]. However, LLM-based approaches mainly focus on the temporal dimension, largely neglecting the rich spatial topology in traffic networks [9, 10]. Additionally, the structural and semantic disparities between language and traffic data hinder LLMs from effectively transferring knowledge, potentially compromising prediction performance.

To address these challenges, we propose DF-LLM, a unified spatiotemporal forecasting framework that integrates graph-based spatial modeling with a pretrained Transformer backbone for traffic flow prediction. The proposed framework incorporates a spatiotemporal fusion module with residual connections and a differentiated parameter adaptation strategy, enabling effective domain adaptation while preserving valuable pretrained knowledge. Extensive experiments demonstrate that DF-LLM achieves competitive or superior forecasting performance compared with existing advanced methods, highlighting its potential for intelligent transportation systems.

References (18)