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