Skip to main content

Spatiotemporal Traffic Anomaly Detection on Urban Road Network Using Tensor Decomposition Method

Part of the Lecture Notes in Computer Science book series (LNAI,volume 12323)


Tensor-based models emerged only recently in modeling and analysis of the spatiotemporal road traffic data. They outperform other data models regarding the property of simultaneously capturing both spatial and temporal components of the observed traffic dataset. In this paper, the nonnegative tensor decomposition method is used to extract traffic patterns in the form of Speed Transition Matrix (STM). The STM is presented as the approach for modeling the large sparse Floating Car Data (FCD). The anomaly of the traffic pattern is estimated using Kullback–Leibler divergence between the observed traffic pattern and the average traffic pattern. Experiments were conducted on the large sparse FCD dataset for the most relevant road segments in the City of Zagreb, which is the capital and largest city in Croatia. Results show that the method was able to detect the most anomalous traffic road segments, and with analysis of the extracted spatial and temporal components, conclusions could be drawn about the causes of the anomalies. Results are validated by using the domain knowledge from the Highway Capacity Manual and achieved a precision score value of more than 90%. Therefore, such valuable traffic information can be used in routing applications and urban traffic planning.


  • Road traffic anomaly detection
  • Tensor decomposition methods
  • Speed probability distribution
  • Intelligent transport systems
  • Traffic state estimation

This is a preview of subscription content, access via your institution.

Buying options

USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-030-61527-7_44
  • Chapter length: 15 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
USD   84.99
Price excludes VAT (USA)
  • ISBN: 978-3-030-61527-7
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   109.99
Price excludes VAT (USA)
Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.


  1. Bader, B.W., et al.: Matlab tensor toolbox version 3.1 (2019).

  2. Bro, R., Kiers, H.A.L.: A new efficient method for determining the number of components in parafac models. J. Chemometr. 17(5), 274–286 (2003).

    CrossRef  Google Scholar 

  3. Carić, T., Fosin, J.: Using congestion zones for solving the time dependent vehicle routing problem. Promet-Traffic Transp. 32(1), 25–38 (2020).

    CrossRef  Google Scholar 

  4. Chen, X., He, Z., Chen, Y., Lu, Y., Wang, J.: Missing traffic data imputation and pattern discovery with a Bayesian augmented tensor factorization model. Transp. Res. Part C: Emerg. Technol. 104(2018), 66–77 (2019).

    CrossRef  Google Scholar 

  5. Chow, A.H., Santacreu, A., Tsapakis, I., Tanasaranond, G., Cheng, T.: Empirical assessment of urban traffic congestion. J. Adv. Transp. 48(8), 1000–1016 (2014).

    CrossRef  Google Scholar 

  6. Djenouri, Y., Belhadi, A., Lin, J.C., Djenouri, D., Cano, A.: A survey on urban traffic anomalies detection algorithms. IEEE Access 7, 12192–12205 (2019).

    CrossRef  Google Scholar 

  7. Erdelić, T., Ravlić, M., Carić, T.: Travel time prediction using speed profiles for road network of Croatia. In: 2016 International Symposium ELMAR, pp. 97–100 (2016).

  8. Fanaee Tork, H., Gama, J.: Event detection from traffic tensors: a hybrid model. Neurocomputing 203, 22–33 (2016).

    CrossRef  Google Scholar 

  9. HCM2010: Highway capacity manual, transportation Research Board, National Research Council (2010)

    Google Scholar 

  10. Kolda, T.G., Bader, B.W.: Tensor decompositions and applications. SIAM Rev. 51(3), 455–500 (2009).

    MathSciNet  CrossRef  MATH  Google Scholar 

  11. Liu, X., Liu, X., Wang, Y., Pu, J., Zhang, X.: Detecting anomaly in traffic flow from road similarity analysis. In: Cui, B., Zhang, N., Xu, J., Lian, X., Liu, D. (eds.) WAIM 2016. LNCS, vol. 9659, pp. 92–104. Springer, Cham (2016).

    CrossRef  Google Scholar 

  12. Ma, X., Dai, Z., He, Z., Ma, J., Wang, Y., Wang, Y.: Learning traffic as images: a deep convolutional neural network for large-scale transportation network speed prediction. Sensors (Switz.) 17(4), 1–16 (2017).

    CrossRef  Google Scholar 

  13. Nguyen, H., Liu, W., Chen, F.: Discovering congestion propagation patterns in spatio-temporal traffic data. IEEE Trans. Big Data 3(2), 169–180 (2017)

    CrossRef  Google Scholar 

  14. Pan, P., Wang, H., Li, L., Wang, Y., Jin, Y.: Peak-hour subway passenger flow forecasting: a tensor based approach. In: 21st International Conference on Intelligent Transportation Systems, pp. 3730–3735 (2018).

  15. Papalexakis, E.E.: Automatic unsupervised tensor mining with quality assessment. In: Proceedings of the International Conference on Data Mining, pp. 711–719 (2016).

  16. Qi, G., Huang, A., Guan, W., Fan, L.: Analysis and prediction of regional mobility patterns of bus travellers using smart card data and points of interest data. IEEE Trans. Intell. Transp. Syst. 20(4), 1197–1214 (2019)

    CrossRef  Google Scholar 

  17. Qi, N., Shi, Y., Sun, X., Wang, J., Yin, B., Gao, J.: Multi-dimensional sparse models. IEEE Trans. Pattern Anal. Mach. Intell. 40(1), 163–178 (2018)

    CrossRef  Google Scholar 

  18. Shi, Y., Deng, M., Yang, X., Gong, J.: Detecting anomalies in spatio-temporal flow data by constructing dynamic neighbourhoods. Comput. Environ. Urban Syst. 67, 80–96 (2018).

    CrossRef  Google Scholar 

  19. Tan, H., Wu, Y., Shen, B., Jin, P.J., Ran, B.: Short-term traffic prediction based on dynamic tensor completion. IEEE Trans. Intell. Transp. Syst. 17(8), 2123–2133 (2016).

    CrossRef  Google Scholar 

  20. Tan, H., Yang, Z., Feng, G., Wang, W., Ran, B.: Correlation analysis for tensor-based traffic data imputation method. Procedia - Soc. Behav. Sci. 96, 2611–2620 (2013).

    CrossRef  Google Scholar 

  21. Tang, K., Chen, S., Liu, Z.: Citywide spatial-temporal travel time estimation using big and sparse trajectories. IEEE Trans. Intell. Transp. Syst. 19(12), 4023–4034 (2018).

    CrossRef  Google Scholar 

  22. Walt, S., Colbert, C., Varoquaux, G.: The numpy array: a structure for efficient numerical computation. Comput. Sci. Eng. 13(2), 22–30 (2011)

    CrossRef  Google Scholar 

  23. Wang, J., Gao, F., Cui, P., Li, C., Xiong, Z.: Discovering urban spatio-temporal structure from time-evolving traffic networks. In: Chen, L., Jia, Y., Sellis, T., Liu, G. (eds.) Web Technologies and Applications, pp. 93–104. Springer International Publishing, Cham (2014)

    CrossRef  Google Scholar 

  24. Wang, X., Fagette, A., Sartelet, P., Sun, L.: A probabilistic tensor factorization approach to detect anomalies in spatiotemporal traffic activities. In: IEEE Intelligent Transportation Systems Conference, pp. 1658–1663 (2019).

  25. Wang, Z., Hu, K., Xu, K., Yin, B., Dong, X.: Structural analysis of network traffic matrix via relaxed principal component pursuit. Comput. Networks 56(7), 2049–2067 (2012)

    CrossRef  Google Scholar 

  26. Xie, Q., Zhao, Q., Meng, D., Xu, Z.: Kronecker-basis-representation based tensor sparsity and its applications to tensor recovery. IEEE Trans. Pattern Anal. Mach. Intell. 40(8), 1888–1902 (2018).

    CrossRef  Google Scholar 

  27. Yu, L., Huang, J., Zhou, G., Liu, C., Zhang, Z.: Tiirec: a tensor approach for tag-driven item recommendation with sparse user generated content. Inf. Sci. 411, 122–135 (2017).

    MathSciNet  CrossRef  Google Scholar 

  28. Żochowska, R., Karoń, G.: ITS Services Packages as a Tool for Managing Traffic Congestion in Cities, pp. 81–103. Springer International Publishing, Cham (2016).

Download references


This research has been supported by the European Regional Development Fund under the grant KK. (DATACROSS). Data used for this research is collected during the SORDITO project (RC.2.2.08-0022). Authors are also very grateful to industrial partner MIREO Inc. Sofia Fernandes acknowledges the support of FCT (Fundação para a Ciência e a Tecnologia) via the PhD scholarship PD/BD/114189/2016.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Leo Tišljarić .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Verify currency and authenticity via CrossMark

Cite this paper

Tišljarić, L., Fernandes, S., Carić, T., Gama, J. (2020). Spatiotemporal Traffic Anomaly Detection on Urban Road Network Using Tensor Decomposition Method. In: Appice, A., Tsoumakas, G., Manolopoulos, Y., Matwin, S. (eds) Discovery Science. DS 2020. Lecture Notes in Computer Science(), vol 12323. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-61526-0

  • Online ISBN: 978-3-030-61527-7

  • eBook Packages: Computer ScienceComputer Science (R0)