中国安全科学学报 ›› 2025, Vol. 35 ›› Issue (11): 149-156.doi: 10.16265/j.cnki.issn1003-3033.2025.11.0469

• 公共安全 • 上一篇    下一篇

基于自适应时空多头图注意力网络的交通流量预测模型

周新民1,2(), 徐天3, 李达3, 王隆鑫4, 胡江华3, 王伟4   

  1. 1 湖南工商大学 人工智能与先进计算学院,湖南 长沙 410205
    2 湘江实验室,湖南 长沙 410205
    3 湖南工商大学 前沿交叉学院,湖南 长沙 410205
    4 湖南工商大学 计算机学院,湖南 长沙 410205
  • 收稿日期:2025-07-12 修回日期:2025-09-16 出版日期:2025-11-28
  • 作者简介:

    周新民 教授 (1977—),男,湖南新邵人,博士,教授,博士生导师,主要从事新型智慧城市、商务智能与大数据、人工智能大模型等方面的研究。E-mail:

  • 基金资助:
    国家社会科学基金资助(21BGL231); 湘江实验室重大项目(23XJ01001)

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 Published:2025-11-28

摘要: 为改善城市交通安全并解决交通拥堵问题,提出自适应时空多头图注意力网络的交通流预测模型,该模型通过三阶段架构实现精细化交通流预测,首先,采用时空编码模块对交通流数据的时空信息编码,构建交通流图;其次,对交通流图的流量属性和图结构层面进行自适应增强;然后,利用双分支多头空间自注意力模块挖掘全局与局部空间的内在关联,解耦复杂空间依赖关系,结合时间异质性与时间多头注意力机制,多角度捕捉时间序列中的复杂动态关系,同时,引入多层感知器(MLP)挖掘现有流量与未来流量的深层联系;最后,以真实世界数据集为例验证模型的有效性。结果表明:该模型在交通流预测中的关键指标平均绝对误差(MAE)和平均绝对百分比误差(MAPE)结果优于现有方法,分别最高降低5.12%和19.11%,同时,模型的预测值与真实值高度吻合,尤其在突发车流波动场景下,预测结果能较好地反映实际交通流量的变化。通过优化时空特征提取能力,模型能够有效降低预测误差,从而提升交通流量预测的性能,这证明了模型的有效性。

关键词: 时空多头图注意力网络, 自适应, 多头空间自注意力, 异质性, 时空数据

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

中图分类号: