Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (7): 250-260.DOI: 10.3778/j.issn.1002-8331.2203-0290

• Big Data and Cloud Computing • Previous Articles     Next Articles

Traffic Flow Forecasting Model for Improved Spatio-Temporal Transformer

GAO Rong, WAN Yiliang, SHAO Xiongkai, Wu Xinyun   

  1. 1.School of Computer Science, Hubei University of Technology, Wuhan 430068, China
    2.State Key Laboratory of New Computer Software Technology, Nanjing University, Nanjing 210093, China
  • Online:2023-04-01 Published:2023-04-01

面向改进的时空Transformer的交通流量预测模型

高榕,万以亮,邵雄凯,吴歆韵   

  1. 1.湖北工业大学 计算机学院,武汉 430068
    2.南京大学 计算机软件新技术国家重点实验室,南京 210093

Abstract: To address the low performance problem of traffic flow prediction model based on spatio-temporal Transformer model, an improved spatio-temporal Transformer model(ISTTM) based on encoder-decoder is proposed. The encoder encodes the historical traffic features and the decoder predicts the future sequences. Firstly, the encoder combines spatial sparse self-attentiveness and temporal hierarchical diffusion convolution to capture the dynamic spatial correlation and local spatial features of traffic flows, and then uses temporal self-attentiveness to model the nonlinear temporal correlation. Then, the decoder mines the spatio-temporal features of the input sequences similarly to the encoder. Finally, based on the spatio-temporal features extracted by the encoder-decoder, the impact of historical traffic observations on future forecasts is simulated using double cross-attention, modeling the direct relationship between each historical time step and each future time step and the impact on the whole future time period, and the final representation of the future traffic flow is output. To confirm the effectiveness of ISTTM, experiments are executed on two real-world large-scale datasets, METR-LA and NE-BJ, and the ISTTM results outperform the six state-of-the-art baselines.

Key words: traffic forecasting, spatio-temporal feature, sparse self-attention, diffusion convolution

摘要: 针对基于时空Transformer模型的交通流量预测模型性能不高的问题,提出了一种基于编解码器的改进的时空Transformer模型(improved spatio-temporal Transformer model,ISTTM)。编码器对历史流量特征进行编码,解码器预测未来序列。编码器将空间稀疏自注意力和时间层次扩散卷积相结合,捕捉交通流量的动态空间相关性和局部空间特征,再利用时间自注意力建模非线性时间相关性;解码器与编码器类似地挖掘出输入序列的时空特征。基于编解码器提取的时空特征,采用双重交叉注意力模拟历史交通观测对未来预测的影响,建模每个历史时间步和每个未来时间步的直接关系以及对整个未来时间段的影响,并输出未来交通流量的最终表示。为了证实ISTTM的有效性,在METR-LA和NE-BJ两个真实世界的大规模数据集上进行实验,ISTTM结果优于6个先进的基线。

关键词: 交通流量预测, 时空特征, 稀疏自注意力, 扩散卷积