An Attention based Spatial Temporal Graph Convolutional Networks for Traffic Flow Prediction


  • Sreenath Marimakalapalli Venkatarama Reddy PESIT Bangalore South Campus, Bangalore 560100, India
  • Annapurna Dammur PESIT Bangalore South Campus, Bangalore 560100, India
  • Anand Narasimhamurthy INSOFE, Bengaluru 560102, India


Graph convolutional network, Graph neural network, Spatial dimension, Temporal dimension, Traffic flow prediction


The accurate and timely prediction of traffic flow is crucial for a safe and stable Intelligent Transportation System (ITS). Because of the complexity and nonlinearity of traffic flow, the conventional techniques fail to capture global and local correlations. To overcome this issue, an Attention-based Spatial Temporal-Graph Convolutional Network (AST-GCN) is proposed for predicting traffic flows. This research utilized PEMS04 and PEMS08 datasets which are publicly available transport network datasets. In the spatial dimension, the various locations' traffic conditions are influenced by each other, and mutual influence is extremely dynamic. In the temporal dimension, the exists a correlation among traffic conditions and the correlations differ under various situations. The GCN is used for extracting spatial and temporal features that are applied to graph-structured data directly and it builds a graph between two neural network layers that is a graph edge weight. The obtained result shows that the proposed AST-GCN model achieves a better MAPE of 8% on the PEMS04 dataset and 5.67% on PEMS08 dataset which ensures accurate prediction compared with other existing methods like Spatial-Temporal Correlation Graph Convolutional Networks (STCGCN), Long-term Spatial-Temporal Graph Convolutional Fusion Network (LSTFGCN) and Attention-based Spatial-Temporal Graph Transformer (ASTGT).


Download data is not yet available.


X. Huang, Y. Ye, C. Wang, X. Yang, and L. Xiong, “A multi-mode traffic flow prediction method with clustering based attention convolution LSTM,” Appl. Intell., vol. 52, no. 13, pp. 14773–14786, Oct. 2022.

S. Wang, C. Shao, J. Zhang, Y. Zheng, and M. Meng, “Traffic flow prediction using bi-directional gated recurrent unit method,” Urban Inf., vol. 1, p. 16, Dec. 2022.

B. Wang and J. Wang, “ST-MGAT: Spatio-temporal multi-head graph attention network for Traffic prediction,” Physica A, vol. 603, p. 127762, Oct. 2022.

R. Kumar, J. M. Moreira, and J. Chandra, “DyGCN-LSTM: A dynamic GCN-LSTM based encoder-decoder framework for multistep traffic prediction,” Appl. Intell., vol. 53, no. 21, pp. 25388–25411, Nov. 2023.

J. Dai, J. Huang, Q. Shen, Q. Shi, S. Feng, and Z. Shi, “SDSCNN: A Hybrid Model Integrating Static and Dynamic Spatial Correlation Neural Network for Traffic Prediction,” IEEE Access, vol. 10, pp. 121159–121172, Nov. 2022. doi: 10.1109/ACCESS.2022.3222561

J. Lu, “An efficient and intelligent traffic flow prediction method based on LSTM and variational modal decomposition,” Meas.: Sens., vol. 28, p. 100843, Aug. 2023.

A. R. Sattarzadeh, R. J. Kutadinata, P. N. Pathirana, and V. T. Huynh, “A novel hybrid deep learning model with ARIMA Conv-LSTM networks and shuffle attention layer for short-term traffic flow prediction,” Transportmetrica A: Transport Sci., Jul. 2023.

D. Xia, Y. Chen, W. Zhang, Y. Hu, Y. Li, and H. Li, “RSAB-ConvGRU: A hybrid deep-learning method for traffic flow prediction,” Multimedia Tools Appl., Aug. 2023.

M. Xia, D. Jin, and J. Chen, “Short-Term Traffic Flow Prediction Based on Graph Convolutional Networks and Federated Learning,” IEEE Trans. Intell. Transp. Syst., vol. 24, no. 1, pp. 1191–1203, Jan. 2023. doi: 10.1109/TITS.2022.3179391

Q. Zhang, M. Tan, C. Li, H. Xia, W. Chang, and M. Li, “Spatio-Temporal Residual Graph Convolutional Network for Short-Term Traffic Flow Prediction,” IEEE Access, vol. 11, pp. 84187–84199, Jul. 2023. doi: 10.1109/ACCESS.2023.3300232.

Z. Su, T. Liu, X. Hao, and X. Hu, “Spatial-temporal graph convolutional networks for traffic flow prediction considering multiple traffic parameters,” J. Supercomput., vol. 79, no. 16, pp. 18293–18312, Nov. 2023.

J. Wang, J. Ji, Z. Jiang, and L. Sun, “Traffic Flow Prediction Based on Spatiotemporal Potential Energy Fields,” IEEE Trans. Knowl. Data Eng., vol. 35, no. 9, pp. 9073–9087, Sep. 2023. doi: 10.1109/TKDE.2022.3221183

V. B. Getanda, P. K. Kihato, P. K. Hinga, and H. Oya, “Data grouping and modified initial condition in grey model improvement for short-term traffic flow forecasting,” Automatika, vol. 64, no. 1, pp. 178–188, 2023.

M. A. Mondal and Z. Rehena, “Stacked LSTM for Short-Term Traffic Flow Prediction using Multivariate Time Series Dataset,” Arabian J. Sci. Eng., vol. 47, no. 8, pp. 10515–10529, Aug. 2022.

X. Yu, Y. -X. Bao, and Q. Shi, “STHSGCN: Spatial-Temporal Heterogeneous and Synchronous Graph Convolution Network for Traffic Flow Prediction,” Heliyon, vol. 9, no. 9, p. E19927, Sep. 2023. DOI:

H. Zeng, C. Jiang, Y. Lan, X. Huang, J. Wang, and X. Yuan, “Long Short-Term Fusion Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting,” Electronics, vol. 12, no. 1, p. 238, Jan. 2023. doi: 10.3390/electronics12010238.

R. Huang, Z. Chen, G. Zhai, J. He, and X. Chu, “Spatial‐temporal correlation graph convolutional networks for traffic forecasting,” IET Intel. Transport Syst., vol. 17, no. 7, pp. 1380–1394, Jul. 2023.

Q. Zhang, W. Chang, C. Li, C. Yin, Y. Su, and P. Xiao, “Attention-based spatial-temporal graph transformer for traffic flow forecasting,” Neural Comput. Appl., vol. 35, no. 29, pp. 21827–21839, Oct. 2023.

Q. Ma, W. Sun, J. Gao, P. Ma, and M. Shi, “Spatio‐temporal adaptive graph convolutional networks for traffic flow forecasting,” IET Intel. Transport Syst., vol. 17, no. 4, pp. 691–703, Apr. 2023.

Y. Zhao, Y. Lin, H. Wen, T. Wei, X. Jin, and H. Wan, “Spatial-Temporal Position-Aware Graph Convolution Networks for Traffic Flow Forecasting,” IEEE Trans. Intell. Transp. Syst., vol. 24, no. 8, pp. 8650–8666, Aug. 2023. doi: 10.1109/TITS.2022.3220089

S. Fang, C. Zhang, S. Xiang, and C. Pan, “AutoMSNet: Multi-Source Spatio-Temporal Network via Automatic Neural Architecture Search for Traffic Flow Prediction,” IEEE Trans. Intell. Transp. Syst., vol. 24, no. 3, pp. 2827–2841, Mar. 2023. doi: 10.1109/TITS.2022.3225553

X. Xu, C. Yang, M. Bilal, W. Li, and H. Wang, “Computation Offloading for Energy and Delay Trade-Offs With Traffic Flow Prediction in Edge Computing-Enabled IoV,” IEEE Trans. Intell. Transp. Syst., Nov. 2022. doi: 10.1109/TITS.2022.3221975

J. Tang and J. Zeng, “Spatiotemporal gated graph attention network for urban traffic flow prediction based on license plate recognition data,” Computer‐Aided Civil and Infrastructure Engineering, vol. 37, no. 1, pp. 3–23, Jan. 2022.

Dataset Link: (accessed on 16 October 2023).

L. Liao, Z. Hu, Y. Zheng, S. Bi, F. Zou, H. Qiu, and M. Zhang, “An improved dynamic Chebyshev graph convolution network for traffic flow prediction with spatial-temporal attention,” Appl. Intell., vol. 52, no. 14, pp. 16104–16116, Nov. 2022.




How to Cite

Venkatarama Reddy, S. M. ., Dammur, A. ., & Narasimhamurthy, A. . (2024). An Attention based Spatial Temporal Graph Convolutional Networks for Traffic Flow Prediction. International Journal of Intelligent Systems and Applications in Engineering, 12(15s), 481–488. Retrieved from



Research Article