首页|基于时空多头图注意力网络的交通流预测

基于时空多头图注意力网络的交通流预测

扫码查看
针对当前路网交通流量预测方法中存在的挖掘复杂的动态时空特性和长距离的空间依赖性能力不足等问题,基于多头自注意力网络构建一种新型的交通流预测模型.考虑到交通流在不同周期尺度下呈现出的高度相似性,以及静态时空特征,引入日和周这2种周期尺度下的数据张量作为模型输入,来表达交通流数据的时间相似性,并通过输入数据的时空位置编码获取其静态时空特征.考虑到交通流的动态时空特性和长距离的空间依赖性,主体模型基于多头自注意力机制分别设计时间多头注意力模块和空间多头注意力模块.时间多头注意力模块利用一个图掩码矩阵获得局部注意力,并将其融合到一个多头自注意力中,以提取交通流的动态时间特征.空间多头注意力模块利用两个图掩码矩阵获得局部注意力和全局注意力,并将其融合到一个多头自注意力中,以提取路网节点的动态空间特征和长距离的空间依赖性.最后,设计一个门控融合模块自适应地融合交通流数据的时空相关性特征.在三个真实交通流基准数据集PEMS04,PEMS07和PEMS08上进行模型的有效性验证,结果表明,所建模型在3个数据集上的3个预测精度指标与其他精度最高模型相比,平均提高了4.437%,2.930%,4.275%.
Traffic Flow Prediction Based on Spatio-Temporal Multi-head Graph Attention Network
To overcome the drawbacks of current traffic network flow prediction methods,such as the low capability of capturing highly dynamic spatio-temporal correlation and long-term spatial dependence,this paper constructs a novel traf-fic flow prediction model based on multi-head self-attention network.The model takes the data tensor at daily period and weekly period scales as model inputs to express the temporal similarity of traffic flow data,and obtains its static spatio-tem-poral characteristics by encoding the spatio-temporal position embedding of the input data.The main model designs tempo-ral multi-head attention module and spatial multi-head attention module respectively based on multi-head self-attention mechanism for considering the dynamic spatio-temporal characteristics of traffic flow and the long-range spatial depen-dences.The temporal multi-head attention module obtains the local attention using a graph masking matrix and fuses it in-to a multi-head self-attention to extract the dynamic temporal characteristics of traffic flow.The spatial multi-head atten-tion module obtains the local attention and global attention using two graph masking matrices and fuses them into a multi-head self-attention to extract the dynamic spatial characteristics and long-range spatial dependences of road network nodes.Finally,a gated fusion module is designed to adaptively fuse the spatio-temporal correlation characteristics of traf-fic flow data.The effectiveness of the proposed model is verified on three real traffic flow benchmark datasets PEMS04,PEMS07 and PEMS08,and the results show that the three prediction accuracy metrics of the proposed model on the three data sets improved by 4.437%,2.930%,and 4.275%on average compared with the other models with the highest accuracy.

intelligent transportationmulti-head graph attention networkgraph masking mechanismfeature fu-sionspatio-temporal data position embedding

梁秀霞、夏曼曼、何月阳、梁涛

展开 >

河北工业大学人工智能与数据科学学院,天津 300132

智能交通 多头图注意力网络 图掩码机制 特征融合 时空数据位置嵌入

河北省自然科学基金

F2021202022

2024

电子学报
中国电子学会

电子学报

CSTPCD北大核心
影响因子:1.237
ISSN:0372-2112
年,卷(期):2024.52(2)
  • 18