Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (19): 354-362.DOI: 10.3778/j.issn.1002-8331.2306-0130

• Engineering and Applications • Previous Articles     Next Articles

Short-Time Traffic Flow Prediction Based on Graph Attention Networks

HE Jiajia, HUANG Deqi, WANG Dongwei, ZHANG Yangting   

  1. School of Electrical Engineering, Xinjiang University, Urumqi 830047, China
  • Online:2024-10-01 Published:2024-09-30

基于图注意力网络的短时交通流量预测

贺佳佳,黄德启,王东伟,张阳婷   

  1. 新疆大学  电气工程学院,乌鲁木齐  830047

Abstract: Traffic flow prediction is an important problem in time series analysis, and it is challenging to achieve high-accuracy traffic flow prediction due to the complex dynamic spatio-temporal dependencies in road networks. To accurately capture the spatio-temporal dynamic properties of traffic flows, a spatio-temporal attention model called STBiPGAT is proposed. The model feeds the adjacency matrix, the global correlation matrix extracted by using the node traffic flow, and the traffic flow feature matrix into the graph attention network, respectively, to extract the spatial local dynamic features and the spatial hidden relations in a parallel manner, and to perform feature fusion. Subsequently, considering the contextual information and periodicity characteristics of the node spatial feature vectors in the time dimension, a bidirectional GRU component is constructed to extract the before-and-after time features of the traffic flow. Finally, a self-attention mechanism is introduced to resolve the differences in the influence of input features at different moments, and the prediction results are generated through a full connectivity layer. The evaluation of the experimental results on two real traffic datasets shows that the prediction error of STBiPGAT is lower than the prediction error of the comparison model, which significantly improves the prediction accuracy and confirms its effectiveness.

Key words: traffic flow prediction, graph attention network, attention mechanism, spatio-temporal correlation

摘要: 交通流量预测是时间序列分析中的一个重要问题,由于道路网络中存在复杂的动态时空依赖性,实现高精度交通流量预测具有挑战性。为了准确捕捉交通流量的时空动态特性,提出了一种时空注意力模型STBiPGAT。该模型将邻接矩阵和利用节点交通流提取的相关系数矩阵,分别与交通流量特征矩阵送入图注意力网络中,以并行方式提取空间局部动态特征与空间隐藏关系,且进行特征融合。考虑到节点空间特征向量在时间维度的上下文信息和周期性特性,构造双向GRU组件以提取交通流量的前后时间特征。引入自注意力机制解决不同时刻输入特征影响的差异,通过全连接层生成预测结果。在两个真实交通数据集上的实验评估结果表明,STBiPGAT预测误差低于对比模型预测误差,显著提升了预测精度,证明了其有效性。

关键词: 交通流量预测, 图注意力网络, 注意力机制, 时空相关性