
Speed Transition Matrix (STM) [1] is a novel traffic data technique used for traffic-related analysis. This article will show a novel method for estimating the anomaly level on the road network using the STM. The full paper can be found here [2].
Before we continue, give me a second of your time. If you want to support me in my work, you can do it using this secure PayPal link. Thank you 🙂
1. Intro
Road traffic Anomaly Detection is an essential research topic within the Intelligent Transport System (ITS) context. Urban road anomaly detection systems are a crucial part of the ITS regarding trip planning, road security, and congestion estimation applications. In this article, the method for traffic anomaly detection using STM is presented. A novel distance metric is proposed because standard distance measures are inapplicable for the anomaly detection and road traffic analysis interpretation when using the STM.
For more information about the computing the STM using the GPS datasets, visit the following link:
Speed Transition Matrix: Novel road traffic data modeling technique
2. Methodology
In this section, the method for anomaly detection using the STMs is presented.
2.1. Center of mass estimation
The method is based on the computation of the Center Of Mass (COM) for every observed STM. The COM parameter is of crucial importance for traffic state estimation because the position of the traffic pattern represented with the STM represents the traffic state. This can be seen in the following images:

The image on the left shows normal traffic behavior because vehicles had a high origin and destination speed. In contrast, we can see the opposite example on the right image, where vehicles had very low speeds. Details for COM estimation and its importance for traffic state estimation can be found in this article.
2.2. Anomaly detection
The common first step in anomaly detection is defining the normal observation and then a comparison between normal and all other observations. We defined a median STM of all observed road segments as the normal observation, as it presents the most common traffic state. To estimate the anomaly level, we proposed a simple Distance Metric based on Euclidean distance to measure the distance between normal STM and all others. We measured the distance between COM of the observed STM and the COM of the normal STM. To conclude, if the distance is large, the anomaly will be large. The image below shows the normal STM (left), one of the observed STMs that is classified as anomalous (center), and one of the observed STMs that is classified as normal (right).

Comparison to other distance metrics
In this section, we compare the proposed distance metric with other mostly used metrics. It is worth mentioning that this is a specific case where we want to measure the distance between two STMs. That is why commonly used distance metrics did not give good results, and the novel metric needed to be proposed. The image below shows the distribution of measured distances between every available STM and the normal one.

It can be observed that other distance metrics are not suitable for this task because they either found too many anomalies (Manhattan distance) or not at all (Cosine distance).
Conclusion
In this article, the method for anomaly detection based on the STMs is presented. The proposed metric based on the distance between the COMs of the observed STM and the median STM, which represents the normal traffic conditions, is presented. The results show that the metric is better suited for the anomaly detection problem based on the STMs because it can use the valuable traffic information, which depends on the position of the grouped data.
There are some additional papers that show the potential usages of the STMs; if you are interested, you can found them at [1] and [3].
If you have any questions or suggestions, feel free to comment or contact me! https://www.linkedin.com/in/leo-tisljaric-28a56b123/
Acknowledgement
Authors of the original paper are: Leo Tišljarić, Željko Majstorović, Tomislav Erdelić, and Tonči Carić.
References
[1] L. Tišljarić, T. Carić, B. Abramović, and T. Fratrović, Traffic State Estimation and Classification on Citywide Scale Using Speed Transition Matrices (2020), Sustainability, 12,18:7278–7294
[2] L. Tišljarić, Ž. Majstorović, T. Erdelić and T. Carić, "Measure for Traffic Anomaly Detection on the Urban Roads Using Speed Transition Matrices," 2020 43rd International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia, 2020, pp. 252–259, doi: 10.23919/MIPRO48935.2020.9245327.
[3] 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. https://doi.org/10.1007/978-3-030-61527-7_44