RPConvformer: A novel Transformer-based deep neural networks for traffic flow prediction

被引:21
|
作者
Wen, Yanjie [1 ]
Xu, Ping [1 ]
Li, Zhihong [2 ]
Xu, Wangtu [3 ]
Wang, Xiaoyu [2 ]
机构
[1] Cent South Univ, Changsha 410083, Hunan, Peoples R China
[2] Beijing Univ Civil Engn & Architecture, Beijing 102627, Peoples R China
[3] Xiamen Univ, Xiamen 361005, Fujian, Peoples R China
关键词
Intelligent transportation system; Traffic prediction; Transformer; Positional embedding; 1D causal convolutional; Multi-head attention;
D O I
10.1016/j.eswa.2023.119587
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Traffic prediction problem is one of the essential tasks of intelligent transportation system (ITS), alleviating traffic congestion effectively and promoting the intelligent development of urban traffic. To accommodate long-range dependencies, Transformer-based methods have been used in traffic prediction tasks due to the parallelizable processing of sequences and explanation of attention matrices compared with recurrent neural units (RNNs). However, the Transformer-based model has two limitations, on the one hand, it ignores the local correlation in the traffic state in its parallel processing of the sequence, on the other hand, the absolute positional embedding is adopted to represent the positional relationship of time nodes is destroyed when it comes to calculate attention score. To address two embarrassing shortcomings, a novel framework called RPConvformer is proposed, where the improved parts are 1D causal convolutional sequence embedding and relative position encoding. In sequence embedding, we develop a sequence embedding layer composed of convolutional units, which consist of origin 1D convolutional and 1D causal convolutional. The size of the receptive field of the convolution can focus on the local region correlation of the sequence. In relative position encoding, we introduce a bias vector to automatically learn the relative position information of time nodes when linearly mapping the feature tensor. We respect the encoding and decoding framework of the Transformer, the encoder is responsible for extracting historical traffic state information, and the decoder autoregressively predicts the future traffic state. The multi-head attention mechanism is adopted by both encoder and decoder aims to focus on rich temporal feature patterns. Moreover, key mask technique is used after computing attention matrix to mask the traffic state at missing moments improving the resilience of the model. Extensive experiments on two real-world traffic flow datasets. The results show that RPConvformer achieves the best performance compared to state-of-the-art time series models. Ablation experiments show that considering the local correlation of time series has a higher gain on prediction performance. Random mask experiments show that the model is robust when the historical data is less than 10% missing. In addition, multi-head attention matrix provides further explanation for the dependence between time nodes. RPConvformer as an improved Transformer-based model can provide new ideas for molding temporal dimension in traffic prediction tasks. Our code has been open-sourced at (https://github.com/YanJieWen/RPConvformer).
引用
收藏
页数:15
相关论文
共 50 条
  • [1] Deep Neural Networks for Traffic Flow Prediction
    Yi, Hongsuk
    Jung, HeeJin
    Bae, Sanghoon
    [J]. 2017 IEEE INTERNATIONAL CONFERENCE ON BIG DATA AND SMART COMPUTING (BIGCOMP), 2017, : 328 - 331
  • [2] Traffic Transformer: Transformer-based framework for temporal traffic accident prediction
    Al-Thani, Mansoor G.
    Sheng, Ziyu
    Cao, Yuting
    Yang, Yin
    [J]. AIMS MATHEMATICS, 2024, 9 (05): : 12610 - 12629
  • [3] Prediction of Road Traffic Flow Based on Deep Recurrent Neural Networks
    Bartlett, Zoe
    Han, Liangxiu
    Trung Thanh Nguyen
    Johnson, Princy
    [J]. 2019 IEEE SMARTWORLD, UBIQUITOUS INTELLIGENCE & COMPUTING, ADVANCED & TRUSTED COMPUTING, SCALABLE COMPUTING & COMMUNICATIONS, CLOUD & BIG DATA COMPUTING, INTERNET OF PEOPLE AND SMART CITY INNOVATION (SMARTWORLD/SCALCOM/UIC/ATC/CBDCOM/IOP/SCI 2019), 2019, : 102 - 109
  • [4] Transformer-Based Spatio-Temporal Traffic Prediction for Access and Metro Networks
    Wang, Fu
    Xin, Xiangjun
    Lei, Zhewei
    Zhang, Qi
    Yao, Haipeng
    Wang, Xiaolong
    Tian, Qinghua
    Tian, Feng
    [J]. JOURNAL OF LIGHTWAVE TECHNOLOGY, 2024, 42 (15) : 5204 - 5213
  • [5] A transformer-based neural ODE for dense prediction
    Khoshsirat, Seyedalireza
    Kambhamettu, Chandra
    [J]. MACHINE VISION AND APPLICATIONS, 2023, 34 (06)
  • [6] A transformer-based neural ODE for dense prediction
    Seyedalireza Khoshsirat
    Chandra Kambhamettu
    [J]. Machine Vision and Applications, 2023, 34
  • [7] Scalable Deep Traffic Flow Neural Networks for Urban Traffic Congestion Prediction
    Fouladgar, Mohammadhani
    Parchami, Mostafa
    Elmasri, Ramez
    Ghaderi, Amir
    [J]. 2017 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN), 2017, : 2251 - 2258
  • [8] A transformer-based method for vessel traffic flow forecasting
    Mandalis, Petros
    Chondrodima, Eva
    Kontoulis, Yannis
    Pelekis, Nikos
    Theodoridis, Yannis
    [J]. GEOINFORMATICA, 2024,
  • [9] Novel Transformer-based deep neural network for the prediction of post-refracturing production from oil wells
    Jia, Jing
    Li, Diquan
    Wang, Lichang
    Fan, Qinghu
    [J]. ADVANCES IN GEO-ENERGY RESEARCH, 2024, 13 (02): : 119 - 131
  • [10] Deep Transformer-Based Asset Price and Direction Prediction
    Gezici, Abdul Haluk Batur
    Sefer, Emre
    [J]. IEEE ACCESS, 2024, 12 : 24164 - 24178