Skip to main content

TSTNet: A Sequence to Sequence Transformer Network for Spatial-Temporal Traffic Prediction

  • Conference paper
  • First Online:
Artificial Neural Networks and Machine Learning – ICANN 2021 (ICANN 2021)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12891))

Included in the following conference series:

Abstract

Making accurate traffic forecasting is of great importance in smart city-related researches. However, as the traffic features like traffic speed have a complex spatial-temporal characteristics, how to build an accurate traffic prediction model is still an open challenge. In this work, we propose TSTNet, a Sequence to Sequence (Seq2Seq) spatial-temporal traffic prediction model. TSTNet adopts Graph Attention Network (GAT), which can learn the spatial feature aggregation, to build spatial dependency. For temporal dependency, TSTNet applies a Seq2Seq Transformer structure to establish temporal dependency. As a GAT layer’s operation only aggregate the attribute information for neighbor nodes, it does not involve any spatial positional information. Similarly, if we apply the Transformer model on sequence learning tasks, the Transformer model also does not involve any temporal positional information as it does not know the exact time slot of different inputs. To solve the above problems, TSTNet implements a spatial-temporal embedding method to obtain the spatial-temporal positional representation for each input data. We evaluate TSTNet on traffic speed prediction tasks with other baselines upon two real-world datasets, the results show that TSTNet outperforms all the baseline models.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The number of encoder modules and decoder modules are chosen according to the best experimental results.

  2. 2.

    The use of these two datasets needs a permission request. All two datasets can be found at https://outreach.didichuxing.com/app-vue/personal?id=1.

References

  1. Avila, A., Mezić, I.: Data-driven analysis and forecasting of highway traffic dynamics. Nat. Commun. 11(1), 1–16 (2020)

    Article  Google Scholar 

  2. Chung, J., Gulcehre, C., Cho, K., Bengio, Y.: Empirical evaluation of gated recurrent neural networks on sequence modeling. In: Advances in Neural Information Processing Systems 2014 Workshop on Deep Learning (2014)

    Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

  5. Li, Y., Yu, R., Shahabi, C., Liu, Y.: Diffusion convolutional recurrent neural network: data-driven traffic forecasting. In: International Conference on Learning Representations (2018)

    Google Scholar 

  6. Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781 (2013)

  7. Perozzi, B., Al-Rfou, R., Skiena, S.: DeepWalk: online learning of social representations. In: Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 701–710 (2014)

    Google Scholar 

  8. Silva, B.N., Khan, M., Han, K.: Towards sustainable smart cities: a review of trends, architectures, components, and open challenges in smart cities. Sustain. Urban Areas 38, 697–713 (2018)

    Google Scholar 

  9. Smith, B.L., Demetsky, M.J.: Traffic flow forecasting: comparison of modeling approaches. J. Transp. Eng. 123(4), 261–266 (1997)

    Article  Google Scholar 

  10. Sutskever, I., Vinyals, O., Le, Q.V.: Sequence to sequence learning with neural networks. Adv. Neural. Inf. Process. Syst. 27, 3104–3112 (2014)

    Google Scholar 

  11. Vaswani, A., et al.: Attention is all you need. In: Advances in Neural Information Processing Systems, vol. 30 (2017)

    Google Scholar 

  12. Veličković, P., Cucurull, G., Casanova, A., Romero, A., Liò, P., Bengio, Y.: Graph attention networks. In: International Conference on Learning Representations (2018)

    Google Scholar 

  13. Vincenty, T.: Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Surv. Rev. 23(176), 88–93 (1975)

    Article  Google Scholar 

  14. Wu, Z., Pan, S., Long, G., Jiang, J., Zhang, C.: Graph WaveNet for deep spatial-temporal graph modeling. In: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, pp. 1907–1913, July 2019

    Google Scholar 

  15. Xu, M., et al.: Spatial-temporal transformer networks for traffic flow forecasting. arXiv preprint arXiv:2001.02908 (2020)

  16. Yang, C., Gidofalvi, G.: Fast map matching, an algorithm integrating hidden Markov model with precomputation. Int. J. Geogr. Inf. Sci. 32(3), 547–570 (2018)

    Article  Google Scholar 

  17. Yu, B., Yin, H., Zhu, Z.: Spatio-temporal graph convolutional networks: a deep learning framework for traffic forecasting. In: Proceedings of the 27th International Joint Conference on Artificial Intelligence, pp. 3634–3640 (2018)

    Google Scholar 

  18. Yu, B., Lee, Y., Sohn, K.: Forecasting road traffic speeds by considering area-wide spatio-temporal dependencies based on a graph convolutional neural network (GCN). Transp. Res. Part C Emerg. Technol. 114, 189–204 (2020)

    Article  Google Scholar 

  19. Yu, J.J.: Citywide traffic speed prediction: a geometric deep learning approach. Knowl.-Based Syst. 212, 106592 (2021)

    Google Scholar 

  20. Zhao, L., et al.: T-GCN: a temporal graph convolutional network for traffic prediction. IEEE Trans. Intell. Transp. Syst. (2019)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiaozhuang Song .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Song, X., Wu, Y., Zhang, C. (2021). TSTNet: A Sequence to Sequence Transformer Network for Spatial-Temporal Traffic Prediction. In: Farkaš, I., Masulli, P., Otte, S., Wermter, S. (eds) Artificial Neural Networks and Machine Learning – ICANN 2021. ICANN 2021. Lecture Notes in Computer Science(), vol 12891. Springer, Cham. https://doi.org/10.1007/978-3-030-86362-3_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-86362-3_28

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-86361-6

  • Online ISBN: 978-3-030-86362-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics