Skip to main content
Log in

Urban traffic forecasting using attention based model with GCN and GRU

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

Now-a-days since number of vehicles are growing day by day on the roads in urban and metropolitan area, hence traffic jam is becoming very common problem which everyone is facing time to time. So it becomes very crucial to forecast traffic to avoid the regular traffic congestion situation in daily life. In today’s intelligent traffic system, reliable and precise traffic forecasting in metropolitan road networks is critical. Many models based on classical methods have been presented to address this; however, they lag in certain circumstances, failing to incorporate spatial and temporal dependency in the environment. As a result, this research aims to solve the geographical and temporal dependency problem that plagues most traffic forecasting models. Graph Convolution Network (GCN) and Gated Recurrent Unit (GRU) are employed in conjunction with an attention-based model for more accurate traffic forecasts in cities. A combined model called Spatio-Temporal Attention-based Model with GCN and GRU (ST AGG) is employed to anticipate traffic. ST-AGG model mainly focuses on extracting the relevant information from all the input given to the attention-based model. The spatial dependency is determined by using GCN and the temporal dependency is determined by using GRU, used in the ST-AGG model. It assists in short-term traffic forecasting as well as long-term traffic forecasting. The results demonstrate that the suggested ST AGG has properly predicted the volume of traffic on city roadways in real time with greater accuracy. The model depicts how traffic is influenced by geography and time. The Shen Zhen (SZ) car dataset from China and the Los Angeles (LAS) dataset from California are used to test the suggested model. And the result shows that Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE) have reduced by up to 2.7% less, and accuracy has increased by 2.7% more compared to the previous model ST GCN for the SZ vehicle dataset. Similarly, although the accuracy has not changed significantly for the Loss Angeles data set, RMSE and MAE have reduced by 3.71% less as compared to the previous ST GCN model. The proposed model is more effective than the prior models like GCN, GRU, and ST GCN.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17

Similar content being viewed by others

Data availability

-https://github.com/Ring367/A-Deep-Reinforcement-Learning-Network-for-Traffic-Light-Cycle-Control

References

  1. Nagy AM, Simon V (2018) Survey on traffic prediction in smart cities. Pervasive Mob Comput 50:148–163

    Article  Google Scholar 

  2. Gharaibeh A, Salahuddin MA, Hussini SJ, Khreishah A, Khalil I, Guizani M, Al-Fuqaha A (2017) Smart cities: a survey on data management, security, and enabling technologies. IEEE Commun Surveys Tuts 19(4):2456–2501

    Article  Google Scholar 

  3. Lana I, Del Ser J, Velez M, Vlahogianni EI (2018) Road traffic forecasting: recent advances and new challenges. IEEE Intell Transport Syst Mag 10(2):93–109

    Article  Google Scholar 

  4. Barros J, Araujo M, Rossetti RJ (2015) Short-term real-time traffic prediction methods: a survey. In: 2015 international conference on models and technologies for intelligent transportation systems (MT-ITS), pp 132–139

  5. Patre SS, Kumar R, Singh S, Chaurasiya VK (2021) Traffic forecasting using graph convolution network. In: 2021 IEEE international conference on mobile networks and wireless communications (ICMNWC), pp 1–8. https://doi.org/10.1109/ICMNWC52512.2021.9688532

  6. Jian Y, Bingquan F (2012) Synthesis of short term traffic flow forecasting research progress. Urban Transport China 6

  7. Jing L, Wei G (2004) A summary of traffic flow forecasting methods. J Highway Transport Res Develop 21:82–85

    Google Scholar 

  8. Yu H, Wu Z, Wang S, Wang Y, Ma X (2017) Spatiotemporal recurrent convolutional networks for traffic prediction in transportation networks. Sensors 17(7):1501

    Article  Google Scholar 

  9. Yu B, Yin H, Zhu Z (2017) Spatio-temporal graph convolutional networks: a deep learning framework for traffic forecasting. arXiv:1709.04875

  10. Wei P, Cao Y, Sun D (2013) Total unimodularity and decomposition method for large-scale air traffic cell transmission model. Transport Res Part B: Methodol 53:1–16

    Article  Google Scholar 

  11. Xu X-y, Liu J, Li H-y, Hu J-Q (2014) Analysis of subway station capacity with the use of queueing theory. Transport Res Part C: Emerg Technol 38:28–43

    Article  Google Scholar 

  12. Xu F-F, He Z-C, Sha Z (2013) Impacts of traffic management measures on urban network microscopic fundamental diagram. J Transport Syst Eng Inf Technol 13(2):185–190

    Google Scholar 

  13. Sun S, Zhang C, Yu G (2006) A Bayesian network approach to traffic flow forecasting. IEEE Trans Intell Transport Syst 7(1):124–132

    Article  Google Scholar 

  14. Okutani I, Stephanedes YJ (1984) Dynamic prediction of traffic volume through Kalman filtering theory. Transport Res Part B: Methodol 18(1):1–11

    Article  Google Scholar 

  15. Vijayalakshmi B, Ramar K, Jhanjhi N, Verma S, Kaliappan M, Vijayalakshmi K, Vimal S, Ghosh U (2021) An attention-based deep learning model for traffic flow prediction using spatiotemporal features towards sustainable smart city. Int J Commun Syst 34(3):e4609

    Article  Google Scholar 

  16. Lu Y, Kamranfar P, Lattanzi D, Shehu A (2021) Traffic flow forecasting with maintenance downtime via multi-channel attention-based spatio-temporal graph convolutional networks. arXiv:2110.01535

  17. Ali A, Zhu Y, Zakarya M (2021) Exploiting dynamic spatio-temporal correlations for citywide traffic flow prediction using attention based neural networks. Inf Sci 577:852–870

    Article  MathSciNet  Google Scholar 

  18. Liu D, Tang L, Shen G, Han X (2019) Traffic speed prediction: an attention-based method. Sensors 19(18):3836

    Article  Google Scholar 

  19. Do LN, Vu HL, Vo BQ, Liu Z, Phung D (2019) An effective spatial-temporal attention based neural network for traffic flow prediction. Transport Res Part C: Emerg Technol 108:12–28

    Article  Google Scholar 

  20. Li D, Lasenby J (2021) Spatiotemporal attention-based graph convolution network for segment-level traffic prediction. IEEE Trans Intell Transport Syst

  21. de Medrano R, Aznarte JL (2020) A spatio-temporal attention-based spot-forecasting framework for urban traffic prediction. Appl Soft Comput 96:106615

    Article  Google Scholar 

  22. Zhang Z, Li Y, Song H, Dong H (2021) Multiple dynamic graph based traffic speed prediction method. Neurocomputing 461:109–117

    Article  Google Scholar 

  23. Zhang Z, Liu M, Xu W (2021) Spatial-temporal multi-head attention networks for traffic flow forecasting. In: The 5th international conference on computer science and application engineering, pp 1–7

  24. Yang L, Zhang Y, Zuo J (2021) An attention-based spatial-temporal traffic flow prediction method with pattern similarity analysis. In: 2021 IEEE international intelligent transportation systems conference (ITSC), pp 3710–3717

  25. Zhao L, Song Y, Zhang C, Liu Y, Wang P, Lin T, Deng M, Li H (2019) T-GCN: a temporal graph convolutional network for traffic prediction. IEEE Trans Intell Transport Syst

  26. Srinivasu PN, Bhoi AK, Jhaveri RH, Reddy GT, Bilal M (2021) Probabilistic deep Q network for real-time path planning in censorious robotic procedures using force sensors. J Real-Time Image Process 18(5):1773–1785

    Article  Google Scholar 

  27. Culita J, Caramihai SI, Dumitrache I, Moisescu MA, Sacala IS (2020) An hybrid approach for urban traffic prediction and control in smart cities. Sensors 20(24):7209

    Article  Google Scholar 

  28. Williams BM, Durvasula PK, Brown DE (1998) Urban freeway traffic flow prediction: application of seasonal autoregressive integrated moving average and exponential smoothing models. Transport Res Record 1644(1):132–141

    Article  Google Scholar 

  29. Ding QY, Wang XF, Zhang XY, Sun ZQ (2011) Forecasting traffic volume with space-time ARIMA model. Advanced materials research, vol 156. Trans Tech Publications, Stafa-Zurich, pp 979–983

    Google Scholar 

  30. Chandra SR, Al-Deek H (2009) Predictions of freeway traffic speeds and volumes using vector autoregressive models. J Intell Transport Syst 13(2):53–72

    Article  Google Scholar 

  31. Chan KY, Dillon TS, Singh J, Chang E (2012) Neural-network-based models for short-term traffic flow forecasting using a hybrid exponential smoothing and Levenberg-Marquardt algorithm. IEEE Trans Intell Transport Syst 13(2):644–654

    Article  Google Scholar 

  32. Zaremba W, Sutskever I, Vinyals O (2014) Recurrent neural network regularization. arXiv:1409.2329

  33. Evgeniou T, Pontil M, Poggio T (2000) Regularization networks and support vector machines. Adv Computat Math 13(1):1

    Article  MathSciNet  Google Scholar 

  34. Wang JC, Shi Q (2013) Short-term traffic speed forecasting hybrid model based on chaos–wavelet analysis-support vector machine theory

  35. Cong XLY, Wang J (2016) Traffic flow forecasting by a least squares support vector machine with a fruit fly optimization algorithm. Procedia Eng 137:59–68

    Article  Google Scholar 

  36. Yue-Sheng G, Ding W, Ming-Fu Z (2012) A new intelligent model for short time traffic flow prediction via EMD and PSO–SVM. In: Green communications and networks, Springer, pp 59–66

  37. Yang Z, Mei D, Yang Q, Zhou H, Li X (2014) Traffic flow prediction model for large-scale road network based on cloud computing. Math Problems Eng 2014

  38. Huang SH (2003) An application of neural network on traffic speed prediction under adverse weather conditions. The University of Wisconsin-Madison

  39. Khotanzad A, Sadek N (2003) Multi-scale high-speed network traffic prediction using combination of neural networks. Proc Int Joint Conf Neural Netw 2:1071–1075

    Google Scholar 

  40. Zhang X-l, HE G-g, LU H-p (2009) Short-term traffic flow forecasting based on K-nearest neighbors non-parametric regression. J Syst Eng 24(2):178–183

  41. Yin H, Wong S, Xu J, Wong C (2002) Urban traffic flow prediction using a fuzzy-neural approach. Trans Res Part C: Emerg Technol 10(2):85–98

    Article  Google Scholar 

  42. Tan H, Xuan X, Wu Y, Zhong Z, Ran B (2016) A comparison of traffic flow prediction methods based on DBN. CICTP 2016:273–283

    Google Scholar 

  43. Yao Z-s, Shao C-f, Gao Y-l (2006) Research on methods of short-term traffic forecasting based on support vector regression. J Beijing Jiaotong Univ 30(3):19–22

    Google Scholar 

  44. Huang W, Song G, Hong H, Xie K (2014) Deep architecture for traffic flow prediction: deep belief networks with multitask learning. IEEE Trans Intell Transport Syst 15(5):2191–2201

    Article  Google Scholar 

  45. Wu Y, Tan H (2016) Short-term traffic flow forecasting with spatial-temporal correlation in a hybrid deep learning framework. arXiv:1612.01022

  46. Fu R, Zhang Z, Li L (2016) Using LSTM and GRU neural network methods for traffic flow prediction. In: 2016 31st youth academic annual conference of Chinese association of automation (YAC), pp 324–328

  47. Cao Y, Li W, Zhang J (2011) Real-time traffic information collecting and monitoring system based on the Internet of Things. In: 2011 6th international conference on pervasive computing and applications, pp 45–49

  48. Nellore K, Hancke GP (2016) A survey on urban traffic management system using wireless sensor networks. Sensors 16(2):157

    Article  Google Scholar 

  49. Leduc G (2008) Road traffic data: collection methods and applications

  50. He Z, Cao B, Liu Y (2015) Accurate real-time traffic speed estimation using infrastructure-free vehicular networks. Int J Distrib Sensor Netw 11(10):530194

    Google Scholar 

  51. Zhang Q, Chang J, Meng G, Xiang S, Pan C (2020) Spatio-temporal graph structure learning for traffic forecasting. Proc the AAAI Conf Artif Intell 34:1177–1185

    Google Scholar 

  52. Jain A, Zamir AR, Savarese S, Saxena A (2016) Structural-RNN: deep learning on spatio-temporal graphs. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 5308–5317

  53. Bruna J, Zaremba W, Szlam A, LeCun Y (2013) Spectral networks and locally connected networks on graphs. arXiv:1312.6203

  54. Defferrard M, Bresson X, Vandergheynst P (2016) Convolutional neural networks on graphs with fast localized spectral filtering. In: Advances in neural information processing systems, pp 3844–3852

  55. Kipf TN, Welling M (2016) Semi-supervised classification with graph convolutional networks. arXiv:1609.02907

  56. Oluwasanmi A, Aftab MU, Qin Z, Sarfraz MS, Yu Y, Rauf HT (2023) Multi-head spatiotemporal attention graph convolutional network for traffic prediction. Sensors 23(8):3836

    Article  Google Scholar 

  57. Bengio Y, Simard P, Frasconi P (1994) Learning long-term dependencies with gradient descent is difficult. IEEE Trans Neural Netw 5(2):157–166

    Article  Google Scholar 

  58. Ghosh S, Vinyals O, Strope B, Roy S, Dean T, Heck L (2016) Contextual lstm (CLSTM) models for large scale NLP tasks. arXiv:1602.06291

  59. Cho K, Van Merriënboer B, Bahdanau D, Bengio Y (2014) On the properties of neural machine translation: encoder-decoder approaches. arXiv:1409.1259

  60. Zhang M, Zhang Y, Vo DT (2016) Gated neural networks for targeted sentiment analysis. In: Thirtieth AAAI conference on artificial intelligence

  61. Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780

    Article  Google Scholar 

  62. Srivastava P (2023) Essentials of deep learning: introduction to long short term memory. https://www.analyticsvidhya.com/blog/2017/12/fundamentals-of-deep-learning-introduction-to-lstm/

  63. Lu Y, Salem FM (2017) Simplified gating in long short-term memory (LSTM) recurrent neural networks. In: 2017 IEEE 60th international midwest symposium on circuits and Systems (MWSCAS), pp 1601–1604

  64. Commons W (2020) File: gated recurrent unit.svg—wikimedia commons, the free media repository. https://commons.wikimedia.org/w/index.php?title=File:Gated_Recurrent_Unit.svg &oldid=472324516/

  65. Willmott CJ, Ackleson SG, Davis RE, Feddema JJ, Klink KM, Legates DR, O’donnell J, Rowe CM (1985) Statistics for the evaluation and comparison of models. J Geophys Res: Oceans 90(C5):8995–9005

  66. Liang X, Du X, Wang G, Han Z (2019) A deep reinforcement learning network for traffic light cycle control. IEEE Trans Veh Technol 68(2):1243–1253

    Article  Google Scholar 

  67. Pavlyuk D (2017) Short-term traffic forecasting using multivariate autoregressive models. Procedia Eng 178:57–66

    Article  Google Scholar 

  68. Treboux J, Jara AJ, Dufour L, Genoud D (2015) A predictive data-driven model for traffic-JAMS forecasting in smart santader city-scale testbed, pp 64–68

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ritesh Kumar.

Ethics declarations

Conflict of Interest

No Conflicts.

Attention Based model is used. My co-authors and I declare that we have not submitted this manuscript anywhere in any other journal, and all the information we provided is genuine.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Below is the link to the electronic supplementary material.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kumar, R., Panwar, R. & Chaurasiya, V.K. Urban traffic forecasting using attention based model with GCN and GRU. Multimed Tools Appl 83, 47751–47774 (2024). https://doi.org/10.1007/s11042-023-17248-y

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-023-17248-y

Keywords

Navigation