Skip to content
Conference

Attention and residual adaptation analysis of node-token GPT2 for traffic flow forecasting

Aug 2026 · International Conference on Electromechanical Control Technology and Transportation · Vol 14324, pp. 143241Y - 143241Y-7 · 0 citations · 12 references
Engineering

TL;DR

A node-tokenized GPT-2 framework is proposed and attention adaptation and residual prediction mechanisms for traffic flow forecasting are investigated, indicating that residual prediction improves forecasting accuracy, whereas simply modifying the attention structure does not necessarily lead to reliable modeling of traffic node interactions.

Abstract

Traffic flow forecasting aims to predict future traffic states from historical observations of road networks. Although pretrained language models have demonstrated strong sequence modeling capacity, directly applying GPT-2 to traffic forecasting remains nontrivial because continuous spatiotemporal signals differ substantially from discrete text tokens. To address this issue, this paper proposes a node-tokenized GPT-2 framework and investigates attention adaptation and residual prediction mechanisms for traffic flow forecasting. Specifically, each traffic node is represented as a token by projecting its historical observations into the GPT-2 embedding space. Based on this representation, three attention mechanisms are compared, including causal attention, dense full attention, and dynamic Top-K sparse attention. In addition, a residual prediction strategy is introduced to model future traffic changes relative to the latest observed state. Experiments on the PeMS08 dataset show that GPT2-Causal-Res achieves the best performance, with an MAE of 15.3144, reducing the error by 3.47% compared with the direct prediction baseline. The results indicate that residual prediction improves forecasting accuracy, whereas simply modifying the attention structure does not necessarily lead to reliable modeling of traffic node interactions.

View source

Similar papers

Open access Aug 2026

A traffic flow forecasting model with embedded sparse dynamic graph convolution and multi-head attention LSTM

Experimental results on the public PEMS04 and PEMS08 datasets demonstrate that the proposed ESDG-ALSTM model significantly improves forecasting accuracy, confirming that ESDG-ALSTM is more sensitive to abrupt events and multimodal evolution patterns and can effectively enhance prediction performance in complex traffic...

Guozheng Li, Bai-Jing Wu, Ke Gao et al. · 0 citations
#machine learning Preprint Sep 2026

A Dynamic Fusion Large Language Model for Traffic Flow Prediction

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 l...

Xue Qiu, Jian-Li Xiao · 0 citations
Conference Aug 2026

Joint Traffic Prediction and Large Flow Detection Using a Lightweight LSTM-Attention Hybrid Model

With the rapid development of cloud computing and network communication, real-time monitoring and accurate detection of large flow events in server traffic have become crucial for ensuring stable network operation and efficient resource scheduling. However, existing traffic detection methods often suffer from poor abil...

Xiang-Yuan Meng, Feng-Biao Zan, Hai-Dong Zhang et al. · 0 citations
Open access Jul 2026

Recurrent Graph Neural Network Hybrid Model for Spatio-Temporal Traffic Flow Prediction in Intelligent Transportation Systems

TETRA is proposed, a hybrid spatio-temporal traffic forecasting model that integrates Graph Convolutional Networks (GCNs) with Extended Long Short-Term Memory (xLSTM) to capture complex multi-timescale temporal patterns, including congestion propagation and delayed recovery dynamics, which are not well represented by c...

Norman Bereczki, Vilmos Simon · 0 citations
Open access Aug 2026

An Input-Conditioned Dynamic Hierarchical Spatiotemporal Graph Convolutional Network for Traffic Flow Prediction

Overall, DH-STGCN provides a flexible input-conditioned hierarchical representation for multistep traffic flow prediction, and Controlled hierarchy comparisons favor the window-conditioned assignment over fixed-uniform, static-hard, globally shared, and alternative differentiable assignments.

Jinghao Hu, Yan He, Run-Kui Li et al. · 0 citations
Open access Aug 2026

Traffic Flow Prediction Based on Hypergraph Transformer: A Case Study in Huangmaohai Cross-Sea Corridor

Reliable traffic flow forecasting is a core component of intelligent transportation systems; however, many current approaches are still unable to simultaneously model spatial interdependencies and long-term temporal correlations, particularly in cross-sea corridors that exhibit directional heterogeneity and pronounced...

Fan Jiang, Zhiyong Ma, Pumulo Mukozomba et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.