China Safety Science Journal ›› 2025, Vol. 35 ›› Issue (11): 149-156.doi: 10.16265/j.cnki.issn1003-3033.2025.11.0469

• Public safety • Previous Articles     Next Articles

Traffic flow prediction model based on adaptive spatio-temporal multi-head graph attention network

ZHOU Xinmin1,2(), XU Tian3, LI Da3, WANG Longxin4, HU Jianghua3, WANG Wei4   

  1. 1 School of Artificial Intelligence and Advanced Computing, Hunan University of Technology and Business, Changsha Hunan 410205, China
    2 Xiangjiang Laboratory, Changsha Hunan 410205, China
    3 School of Frontier Crossover Studies, Hunan University of Technology and Business, Changsha Hunan 410205, China
    4 School of Computer Science, Hunan University of Technology and Business, Changsha Hunan 410205, China
  • Received:2025-07-12 Revised:2025-09-16 Online:2025-11-28 Published:2026-05-28

Abstract:

An adaptive spatio-temporal multi-head graph attention network was proposed for traffic-flow prediction to improve urban traffic safety and alleviate congestion. A three-stage architecture was designed to achieve refined prediction. Firstly, a spatio-temporal information from traffic flow data was encoded by a spatio-temporal encoding and a traffic-flow graph was constructed. Subsequently, the traffic-flow graph is adaptively enhanced at both the flow attribute and graph structure levels. Then, a two-branch multi-head spatial self-attention mechanism was employed to mine intrinsic associations at global and local spatial scales, thereby decoupling complex spatial dependencies. By temporal heterogeneity and a multi-head temporal attention mechanism, the complex dynamic relationships in time-series data were capture from multiple perspectives. A multilayer perceptron (MLP) was incorporated to explore deep connections between present and future traffic flows. The model's effectiveness was validated using real-world datasets. The results demonstrate that the proposed model outperforms existing methods in key metrics for traffic flow prediction, with reductions in Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE) of up to 5.12% and 19.11%, respectively. Furthermore, a high degree of agreement was observed between the predicted and true values, particularly in scenarios with sudden traffic fluctuations. The predictions reflect the actual changes effectively. By optimizing spatio-temporal feature extraction capabilities, prediction errors are effectively reduced and the performance of traffic flow prediction is improved, which demonstrates the effectiveness of the model.

Key words: spatio temporal multi head graph attention network, adaptive, multi-head spatial self-attention, heterogeneity, spatio-temporal data

CLC Number: