Next Article in Journal
WC-CP: A Bluetooth Low Energy Indoor Positioning Method Based on the Weighted Centroid of the Convex Polygon
Previous Article in Journal
Spatially Varying Effect Mechanism of Intermodal Connection on Metro Ridership: Evidence from a Polycentric Megacity with Multilevel Ring Roads
Previous Article in Special Issue
Improved Road Extraction Models through Semi-Supervised Learning with ACCT
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detecting Urban Traffic Anomalies Using Traffic-Monitoring Data

1
School of Remote Sensing and Information Engineering, Wuhan University, Wuhan 430072, China
2
School of Computer Science, Wuhan University, Wuhan 430072, China
*
Author to whom correspondence should be addressed.
ISPRS Int. J. Geo-Inf. 2024, 13(10), 351; https://doi.org/10.3390/ijgi13100351
Submission received: 25 July 2024 / Revised: 2 October 2024 / Accepted: 2 October 2024 / Published: 4 October 2024
(This article belongs to the Special Issue Advances in AI-Driven Geospatial Analysis and Data Generation)

Abstract

:
Traffic anomaly detection is crucial for urban management, yet current research is often confined to small-scale endeavors. This study collected 9 months of real-time Wuhan traffic-monitoring data from Amap. We propose Traffic-ConvLSTM, a multi-scale spatial-temporal technique based on long short-term memory (LSTM) networks and convolutional neural networks (CNNs) to effectively achieve long-term anomaly detection at the city level. First, we converted traffic track points into an image representation, which enables spatial correlation between traffic flow and roads and correlations between traffic flow and roads, as well as the surrounding environment, to be captured. Second, the model utilizes convolution kernels of different sizes to extract spatial features at road-, regional-, and city-level scales while incorporating the temporal features of different time steps to capture hourly, daily, and weekly dynamics. Additionally, varying weights are assigned to the convolution kernels and temporal features of varying spatio-temporal scales to capture the heterogeneous strengths of spatio-temporal correlations within patterns of traffic anomalies. The proposed Traffic-ConvLSTM model exhibits improved performance over existing techniques in the task of identifying long-term and large-scale traffic anomaly occurrences. Furthermore, the analysis reveals significant traffic anomalies during holidays and urban sporting events. The diverse travel patterns observed in response to various activities offer insights for large-scale urban traffic anomaly management, providing recommendations for city-level traffic-control strategies.

1. Introduction

Traffic congestion has become an increasingly serious problem with continuously increasing global urbanization. Previous studies have shown that abnormal traffic congestion is the leading cause of large-scale traffic congestion [1,2,3]. However, for a long time, the transportation field has focused more on prediction and optimization under normal conditions. Anomalous traffic events receive comparatively little attention. Thus, the timely identification of abnormal traffic congestion is necessary, as it helps to prevent the escalation of traffic issues into large-scale problems, thereby mitigating urban congestion and improving overall traffic conditions in a city.
Traffic anomalies currently lack a clear and unified definition. For large cities with stably developed urban forms, urban activities tend to show regular spatial patterns and time cycles. Consequently, the traffic flows generated by these activities inherit similar spatial and temporal patterns, resulting in traffic events with predictable periodic characteristics [4]. In this paper, we define periodic and predictable traffic patterns as the normal traffic events of a city. These events may be the congestion of a certain popular road during the peak commuting hours, the steady flow of traffic on a city ring road, or the long-lasting smoothness of a certain section of a highway. Based on the patterns of traffic incidents in terms of occurrence time and location, researchers can predict future similar events with considerable accuracy. For instance, if it is known that a one-hour congestion occurs at a specific intersection every workday at 6:00 PM, we can forecast that on the next workday, a congestion lasting approximately one hour will likely occur at this intersection at 6:00 PM, affecting the road segments in the vicinity of the intersection. Conversely, traffic anomalies deviate from these normal patterns in daily urban flows. These anomalous events are influenced by various factors such as spatial location, environment, time, and participants’ subjective perceptions. They exhibit significant variations in occurrence patterns, duration, and spatial extent, lacking the spatial and temporal periodicity characteristic of normal traffic patterns. Consequently, these anomalies are particularly challenging to predict accurately.
According to the impact scope of abnormal traffic events on urban traffic, we divide abnormal traffic events into three levels: city level, regional level, and road level. At present, China’s major cities can be divided into some sub-administrative regions, which have their own administrative divisions, urban functions, and population structure and, so, the characteristics of traffic flow in each region are often different. On this basis, we define the following: When an abnormal traffic event creates abnormal traffic flow in multiple areas of the city at the same time, it can be considered a city-level abnormal traffic event. Accordingly, if the abnormal traffic flow caused by the traffic event can only affect a certain area, the traffic event is a regional-level abnormal traffic event. If the abnormal traffic flow caused by the traffic event can only affect the adjacent road section, the traffic event is a road-level abnormal traffic event.
Previous approaches for detecting anomalies in traffic flow can be broadly categorized into three groups: time series, tensor decomposition, and deep learning-based methods. The time series approach mainly utilizes the autoregressive integrated moving average (ARIMA) model and its variants [5,6,7]. These methods focus on the temporal aspects of traffic flow but often overlook spatial characteristics, leading to suboptimal results. The tensor decomposition methods [8,9,10] can effectively capture spatio-temporal abnormalities, but their performance is susceptible to complex parameter settings, with improper configurations easily compromising analysis accuracy. In recent years, researchers have increasingly turned to deep learning-based methods for traffic anomaly detection, inspired by the remarkable success of deep learning in computer vision and other domains. Unlike traditional parameter-based methods, deep learning models extract intrinsic features from vast amounts of raw data using a multi-layer network architecture. Several studies [11,12,13] aimed to directly extract normal traffic patterns from the key features of the original data to predict traffic flow. In some other works, they combined convolutional neural networks and long short-term memory networks with an attention mechanism to build hybrid deep learning models [14,15,16,17,18,19] that allow for a comprehensive analysis of the spatio-temporal characteristics in the data. Overall, these models strive to improve the understanding and interpretation of spatio-temporal relationships in traffic flow data, addressing the fundamental challenges in traffic anomaly detection.
However, current research on traffic anomaly detection is predominantly limited to specific road segments or small areas, focusing on short-term fluctuations rather than addressing urban-scale patterns over longer periods. It would potentially compromise the ability of models to capture the full complexity of diverse traffic patterns and anomalies across different urban contexts. In order to address this gap, we collected 9 months of real-time Wuhan traffic-monitoring data from Amap. In order to effectively achieve long-term anomaly detection at the city level, we proposed Traffic-ConvLSTM, a multi-scale spatial-temporal technique based on long short-term memory (LSTM) networks and convolutional neural networks (CNNs). In this study, the main contributions can be summarized as follows:
  • We developed a data-processing algorithm that converts low-frequency trajectory data into an image-like data structure for further analysis.
  • In order to effectively identify traffic anomaly patterns at multiple temporal and spatial scales, we propose an improved ConvLSTM [20], and the results show that the model can effectively identify traffic anomalies by using a case study in Wuhan.
This study is organized as follows: Section 2 reviews the related work in terms of this topic. Section 3 introduces the traffic-monitoring data and the Traffic-ConvLSTM method proposed here. Section 4 demonstrates the study results. Section 5 concludes this study.

2. Related Work

The primary methods include the time series approach, tensor decomposition technique, and deep learning strategy.
The time series method, which is the most commonly used, is grounded in the autoregressive integral moving average model. As a classic time series prediction model, the ARIMA model is applied to the anomaly identification of highways and urban arterial roads [21,22]. Various improvements to the ARIMA model have been proposed to enhance the performance and scope of the application. For instance, the KARIMA model, which combines the Kohonen network with the ARIMA model [5], and the ARIMAX model, which integrates the ARIMA model with explanatory variables [7], are examples of such improvements. Additionally, a unified spatio-temporal model based on the spatio-temporal autoregressive integrated moving average (STARIMA) has been proposed to capture the intricate spatio-temporal correlation structures of road traffic [6]. These advancements aim to address the ARIMA model’s inherent limitations, such as its inability to handle nonlinear data and disregard for spatial information.
The tensor decomposition methodology aims to develop an effective time series model that captures the inherent spatio-temporal pattern, transforms traffic data into high-dimensional vectors, and identifies anomalies by calculating good feature numbers. Presently, tensor decomposition-based traffic anomaly pattern recognition approaches are categorized into two groups: methods based on feature factors [8,9] and methods based on reconstruction errors [10]. The method based on feature factors decomposes the original data, compares these with historical data, and identifies any values exceeding a predetermined threshold as anomalies [8]. On the other hand, the method based on reconstruction errors asserts that traffic data can be separated into typical urban activities and disturbances caused by anomalies. By extracting the abnormal tensor from the traffic data, the time and location of the anomalous events can be determined, and the events can be further analyzed [23].
Deep learning techniques can be broadly applied to traffic anomaly detection and are divided into two stages. Early researchers aimed to extract features from traffic flow data in order to identify anomalous patterns directly. Various methods, such as stacked autoencoders (SAEs) [11], long short-term memory (LSTM) networks [12], and convolutional neural networks (CNNs), have been proposed to analyze traffic flow data [13]. However, these methods utilize a relatively simple network structure, making it challenging to effectively leverage the intricate space-time relationships present in traffic flow data. As a result, their ability to detect anomalous traffic patterns is limited. Subsequent work has sought to integrate the characteristics of convolutional methods and recurrent neural networks. These models capture the spatial characteristics of traffic flow in a region using convolutional neural networks and then transfer the extracted features to LSTM networks to extract temporal characteristics. This allows for creating a hybrid deep learning model with an attention mechanism [14,15,16] that comprehensively analyzes the spatio-temporal features in the data. Other work has attempted to capture the spatial features in the data using generative adversarial networks (GANs) [17,18,19], which has greatly improved the model’s practicality and detection accuracy. However, abnormal traffic pattern recognition is a complex task that differs from ordinary classification tasks. It is influenced by various factors, including spatial location, environment, time, and participants’ subjective feelings, making it challenging for researchers to define abnormal traffic events accurately. By drawing inspiration from previous work on anomaly detection and video frame prediction in surveillance videos [20,24,25,26,27,28,29,30], we developed the Traffic-ConvLSTM model. This unsupervised ConvLSTM model learns normal traffic patterns from daily traffic flow and identifies abnormal traffic patterns based on this information. Figure 1 illustrates the model’s spatio-temporal matching of traffic events from the original dataset. Events with extensive spatial impact exhibit longer temporal occurrence cycles, resulting in a lower frequency of such events in the dataset. This design aligns with the characteristic lower frequency of high-impact geographical events observed in the real world. Unlike existing work, the model employs a variable convolution kernel to extract the features of traffic events at different spatial scales and matches the temporal scale of the events with the spatial scale to analyze the spatio-temporal features of the events in an integrated manner. This enables the model to capture multi-scale spatial features and time cycle characteristics while maintaining the robustness of the model at each time and space scale. Finally, the model fuses the multi-scale spatio-temporal information to better obtain the general characteristics of traffic events.

3. Data and Methods

Traditional traffic flow data has many deficiencies in terms of expressing the spatial and temporal characteristics of traffic events. In order to better extract the features of traffic events, we transform traffic flow data into a traffic condition image according to certain rules. Based on the traffic condition image model, we learn the features of a normal traffic pattern and then realize the detection of abnormal traffic events.

3.1. Data Description and Preprocessing

Real-time traffic data for the main roads in Wuhan were acquired through the Amap API over a period spanning from 20 September 2021 to 17 June 2022. The collected multi-source trajectory point data mainly comes from the crowdsourcing data provided by users and Amap’s own collected data. The coverage of the data is shown in Figure 2. A four-tier indicator system was developed to assess road traffic fluency. The system categorizes traffic conditions as Unimpeded, where vehicles can travel at the maximum feasible speed for the given road section; Basically unimpeded, indicating the road remains passable but with noticeably reduced vehicle speeds; Mild congestion, describing a barely passable road section with average vehicle speeds falling below one-fifth of the maximum speed; and Severe congestion, denoting an impassable road section at the given time, with most vehicles at a standstill. The spatial range of the sampling points is 30–32° N and 113–116° E. The dataset is uniformly sampled every half an hour in Wuhan, and about 60,000 real-time traffic data are obtained each time, amounting to approximately 60 million records over the study period. As shown in Table 1, the dataset details include sampling time and road section, as well as vehicle speed, longitude, and latitude.
In order to address the scarcity of trajectory point data needed to convey the spatio-temporal characteristics of traffic flow, it is crucial to preprocess the raw data to accommodate subsequent analytical methods. The input of a deep learning model is often image or sequence data, which requires the preprocessing of the obtained vehicle trajectory point data. Some studies [14,16] hope to use a graph network to organize traffic trajectory data, but a graph network is more suitable for the vehicle trajectory data obtained by sensors, and trajectory point data based on positioning has poor performance in accuracy and data-processing efficiency. A considerable number of studies [13,17,18,31] have demonstrated the effectiveness of converting trajectory points into images to capture the spatial characteristics of traffic flow using deep learning techniques. Based on existing research, this paper proposes a method to convert the traffic trajectory point data into images.
When utilizing traffic trajectory point data for road traffic condition assessment, instantaneous vehicle velocity serves as the most direct and effective evaluation metric. Several analytical methods [13,17,18] are also based on the instantaneous velocity derived from trajectory points. Our method is also based on the instantaneous speed of trajectory points. The average value of the speed of each trajectory point was normalized, and then the range was reduced to [0, 255] to construct the traffic image. We divide the study area into I × J square grid cells; the side length of the grid cells is l s , which is marked as S = { s i , j } , where 1 i I , 1 j J , and roads in the study area are denoted as R = { r k } . The pixel values of the traffic condition images (TCIs) are calculated as follows:
v r = k = 1 n v k n
v n , k = v r v k v m a x v m i n
p i , j = ( v r v k ) v m a x v m i n × 255 if   v n < v r , n s i , j 0 otherwise
where v k is the speed of the track point, and v r is the road speed, which represents the average of the speeds of all track points on the road r k at a given time. v n , k is the relative road speed, which is used to characterize the level of congestion in the area in which the track point is located at that moment in time, and p i , j is the pixel value of the traffic condition images at i,j. It can be seen from the formula that when the speed of the track point is less than the average speed of the road section, the track point will be displayed on the image. The greater the difference between the two, the higher the brightness of the pixel. When multiple high-brightness points gather, the road section may have abnormal traffic events. After obtaining the traffic condition images, standard image-processing techniques can be employed to resize the images to the desired dimensions.
In order to better learn the temporal characteristics of traffic events, we constructed three time-series with different time steps to represent the hourly, daily, and weekly temporal characteristics of traffic patterns, respectively. Generally, the impact between two events with shorter event intervals should be stronger. Therefore, we combine the three time-series in a certain ratio to construct a training set of the model to simulate the impact of different time-scale features on events in actual traffic events. Anomalous traffic events occurring in Wuhan over a one-year period were quantified through statistical analysis of data obtained from various sources, including internet platforms, news outlets, and publicly available information from the Wuhan Traffic Management Bureau. This analysis yielded the frequency of occurrence for anomalous traffic events across three distinct spatio-temporal scales. In the new dataset, the hourly, daily, and weekly time series data ratio is 16:3:1.

3.2. Traffic-ConvLSTM

A number of studies have demonstrated the significant relationship between the intensity of natural events and the probability of their occurrence. Generally, when the intensity is higher, the likelihood of occurrence or the probability is lower. Therefore, we propose a hypothesis for the relationship between the size of a traffic anomaly event and the frequency of events to better accomplish the task of anomalous traffic pattern recognition. Specifically, we postulate that when there is no external influence, the probability of an event decreases as its scale increases. In other words, as an event’s temporal and spatial impact expands, the likelihood of its occurrence decreases, and the time interval between events will increase. Therefore, if a traffic event extends beyond normal spatial boundaries, it is considered an anomalous traffic event. In layman’s terms, if many people in a large neighborhood change their travel from their daily habits, then the event that causes this change to occur has a high probability of being an anomalous traffic event.
With the above assumptions, we propose the Trafic-ConvLSTM model. The model is an unsupervised generative neural network, which is used to spontaneously learn the temporal and spatial characteristics of Wuhan traffic flow from the vehicle trajectory point data, in which the abnormal traffic events are regarded as gross errors in normal traffic events. The result is a normal traffic flow model of Wuhan. Comparing the normal traffic flow model with the real traffic flow of Wuhan, the model can identify abnormal traffic events. The model uses the encoder-forecasting structure. In the encoder layer, we use three convolution kernels of different sizes to extract the spatial features at the city level, regional level, and road level from the large to the small scale. The extracted spatial features will be copied to the prediction layer respectively, and the time series prediction will be carried out based on the selected time interval. Finally, an output image with the same size as the input image will be output. Unlike the separate output of the seq2seq structure, the forecasting layer will combine the three spatio-temporal feature inputs with different scales to make the final prediction and output a picture with the same size as the input. The generated result will contain information on multi-scale spatio-temporal features. In the forecasting layer, the spatial features extracted by the largest convolution kernel are located at the beginning of the decoder RNN sequence, which will make the features with the largest spatial scale have the smallest impact on the predicted results [23]. This makes the model learn more about the small-scale spatial characteristics and emphasizes the influence of the future state of the adjacent block. The convolutional filtering process can be represented as follows:
Y t = σ ( W s × X t + b s )
where σ is the weight of the filter, W s is the input traffic image at time t, b s is the bias, and Y t is the output of the convolution layer. The following passage describes a method for extracting spatial features from traffic flow data.
The structure of the Traffic-ConvLSTM model proposed in this article is shown in Figure 3, and the calculation formula in the ConvLSTM layer is as follows:
i t = σ ( W x i × x t + W h i × h t 1 + b i ) f t = σ ( W x f × x t + W h f × h t 1 + b f ) o t = σ ( W x o × x t + W h o × h t 1 + b o ) g t = tan h ( W x g × x t + W h g × h t 1 + b g ) c t = f t c t 1 + i t g t h t = o t tan h ( c t )
The primary objective of the model is to decrease the influence of the spatial features obtained from large convolution kernels on predictions, as well as the share of large-scale features in time series data. This procedure serves two purposes. First, as per the refined first law of geography [32], the larger the spatial distance and time gap between two geographical occurrences in the same city, the weaker the association between the two occurrences. Hence, when the spatio-temporal proximity of two traffic events is limited, the weight of using the state of event A to predict event B should be less. Second, as per this assumption, the feature values extracted at a larger spatio-temporal scale are vulnerable to interference from traffic anomalies, and the spatio-temporal correlation between roads is easily disregarded at a larger scale, which hinders the accuracy of model learning. In terms of model performance, this reduces the impact of significant traffic anomaly events on model learning, allowing the model to accurately identify traffic anomaly events at multiple temporal and spatial scales.
The model utilizes the structural similarity index (SSIM) as its loss function for training purposes. Specifically, it uses SSIM to determine if an intersection occurs at time t. The SSIM algorithm evaluates the similarity between two images by assessing their brightness, contrast, and structure. It considers factors such as the flow, structure, and patency of the regional traffic flow. In order to account for the distortion caused by image sampling during training, the relative traffic flow model calculated the SSIM index at 48 time points for all dates and used the average of these indices at each time point as the standard SSIM index for that time point. In total, 7 × 48 standard SSIM indices were obtained. In order to detect traffic anomalies, the model calculates the difference between the SSIM index of a particular area at time t and the standard SSIM index. If the difference exceeds the threshold, it indicates the occurrence of a traffic anomaly in that area.

3.3. Index of Performance

In order to evaluate the performance of our proposed model in identifying unusual traffic events, we employed two commonly used classification evaluation metrics: accuracy and precision [33]. The specific formulas for these evaluation metrics are as follows:
A c c u r a c y = F p F t × 100 %
P r e c i s i o n = F p F r × 100 %
where F p denotes the number of traffic anomalies correctly identified by the model, F t denotes the total number of traffic anomalies output by the model, and F r denotes the total number of traffic anomalies included in the selected examples.

4. Experiment

We utilized the Keras [34] deep learning library for model construction in our experiments, and we chose Tensorflow [35] as the tensor manipulation library. The model processes traffic condition images sampled at 30 min intervals, generating 48 daily detection results. We conducted quantitative performance evaluations based on these outputs relative to the baseline methods. Moreover, the detected long-term anomalies were analyzed comprehensively at both the city and road levels.

4.1. Evaluation Results

We compared our proposed Traffic-ConvLSTM model with three common baseline models for anomalous traffic detection to validate the performance of the models.
Stacked autoencoder (SAE) [11]: this model learns the implicit information in the original data by using multiple stacked encoders, and we used a greedy hierarchical unsupervised learning algorithm to train the deep SAE network.
CNN-LSTM model [12]: this model combines a convolutional neural network (CNN) with a long short-term memory (LSTM) network. The spatial features of the traffic flow are extracted by a convolutional neural network, and the features are fed into the LSTM layer. The spatial and temporal features of the data are processed by two independent neural networks, respectively.
Bidirectional long short-term memory (bi-LSTM) network [15]: this model combines the outputs of both forward and backward LSTM networks to capture bidirectional dependencies in sequences and utilizes more periodic features to improve the predictive performance of the model through forward and backward passes of the Bi-LSTM module.
Table 2 compares the detection results of different traffic anomaly-detection algorithms at city-level and road-level scales. The experimental results show that the CNN-LSTM model has the worst detection precision and accuracy at both spatial scales, which is due to the fact that the model uses two independent neural network modules to process the spatio-temporal features of the data, failing to learn the spatio-temporal correlation in the traffic anomaly events well. The bi-LSTM model extracts the temporal features of the traffic flow with its unique neuron unit and neural network structure, which improves detection accuracy but still performs poorly in terms of detection accuracy. The stacked autoencoder (SAE) model shows a large improvement in both detection precision and accuracy, and this improved performance may be because SAE is able to extract more nonlinear features from the traffic data. The generative adversarial network (GAN) model achieved good results in the accuracy of detection, but the accuracy of the model is relatively poor because it fails to integrate the temporal and spatial characteristics of geographical events. The transformer model uses the attention mechanism to achieve matching between temporal and spatial characteristics, and its performance is relatively poor at the urban-level spatial scale; this may be because the model fails to integrate the temporal and spatial characteristics of events at different scales. However, simultaneously, we can also find that the GAN model and transformer model have higher times and storage costs when achieving good results. Therefore, the lightweight improvement based on these two models and the integration of spatio-temporal feature-processing methods may become important research directions in the future. In these six models, the Traffic-ConvLSTM we proposed meets the requirements of good performance and low computational cost in multi-temporal and multi-spatial scales. Table 2 shows the evaluation results of the model’s detection abilities; the model has high accuracy and good accuracy in identifying abnormal traffic events while maintaining a small calculation cost and has practical value.
We conducted an ablation experiment on the effect of ConvLSTM layers on the performance of the model. Table 3 compares the changes in performance of the models with different ConvLSTM layers. It can be found that when the encoder layer and forecasting layer of the model constitute a three-layer ConvLSTM layer, the model achieves the best benefits in terms of performance and time cost. With the increase in the number of layers, the time cost of model training rises rapidly, and the model itself has a certain over-fitting phenomenon, which reduces the accuracy of model prediction. When the number of layers is reduced, the performance of the model decreases significantly. Another ablation experiment was used to determine whether the spatial features in the encoder layer were extracted in order and input into the forecasting layer for prediction. In the encoder RNN sequence of the forecasting layer of the model, the extracted spatial features are arranged in the sequence from large scale to small scale so that the prediction object can learn more information from the adjacent spatial range. Table 4 reflects the impact of this order on the performance of the model. When the input weight of features is more in line with the spatial proximity law in the first law of geography, the model will have better performance.

4.2. Result Description and Analysis

At the city-level scale, we calculated the daily count of these anomaly points. Figure 4 presents a scatter plot illustrating the number of daily traffic anomaly points in Wuhan over the study period, with different colors highlighting the causes of the most significant anomalies. Four primary triggers for large-scale traffic anomalies were recognized: major holidays and one public event with a large number of participants. As shown in Figure 4, the PRC National Day holiday represented the highest number of traffic anomalies, exceeding other days by more than two-fold. Similarly, International Labor Day and Dragon Boat Festival showed slightly elevated anomaly counts, albeit significantly lower than National Day. Interestingly, the number of anomalies correlated positively with the duration of these holidays. This is evidenced by the National Day, Labor Day, and Dragon Boat Festival holidays, lasting 7, 5, and 3 days, respectively, corresponding to 20, 7, and 6 anomalous events. This finding suggests the need for heightened traffic management during holidays, with more stringent measures implemented for longer holidays. The 11th Wuhan Municipal Games also resulted in four anomalous events, indicating that large-scale sporting events can significantly alter urban traffic patterns.
Figure 5 shows the impact of these four urban-level traffic anomalies on Wuhan’s urban traffic flow. Each figure in Figure 5 corresponds to a city-level abnormal traffic event. The legend AI of each figure indicates the cause and occurrence of the abnormal traffic event. In addition, Figure 5 also shows the congestion events caused by each urban-level traffic anomaly event in important sections of Wuhan and uses the event stamp to mark the location of these events. In the window chart of Figure 5, we compared the road traffic conditions of some node sections in the event of abnormal traffic events to those from normal days. It can be found that these traffic anomalies are abnormal traffic jams caused by a large number of abnormal travel traffic flows. The spatial pattern, impact scope, and timing of these congestion events are significantly different from the conventional traffic congestion observed under the normal traffic pattern. This difference highlights the obvious temporal and spatial characteristics of abnormal traffic events. Further, we can compare the similarities and differences between the four urban traffic anomalies.
In addition, it can be found that the anomalous traffic events in Figure 5a,d show obvious spatio-temporal similarities. In the images collected at the same moment, the anomalous traffic events occurred at the toll gates and turnoffs of the Daihuang Expressway (Wuhan section) in northern Wuhan and the Shanghai–Yuzhou Expressway’s city entry in southeastern Wuhan. These similarities likely stem from common underlying causes. National Day and Dragon Boat Festival, 1 October 2021 and 3 June 2022, respectively, are traditional Chinese holidays and are characterized by significant intercity travel as people return to their hometowns for family reunions. The Daihuang and Shanghai–Yuzhou Expressways, connecting Wuhan to two densely populated areas in north and southeast China, respectively, serve as main corridors for intercity travel in Wuhan city. Therefore, when the inter-city traffic flow in Wuhan increased significantly due to the homecoming, traffic anomalies occurred at the entrance areas of these two expressways.
In contrast, the anomalous traffic events presented in Figure 5c exhibit similarities and differences compared to those in Figure 5a,d. Although the anomalous traffic events similarly occurred in the entry section of the Huyu Expressway in southeast Wuhan, the two other anomalous events differ significantly in their spatial distribution. This distinction also arises from the nature of the holiday involved. International Labor Day (1 May 2022) is a relatively short holiday, not a traditional Chinese holiday. Consequently, many people opt for intra-city leisure activities rather than intercity travel, resulting in increased traffic flow both within and between cities. Crowd travel is reflected in the traffic flow by a significant increase in intra-city and intercity traffic flow, which triggers traffic anomalies in the original region with poor traffic conditions. In contrast, Figure 5b illustrates a fundamentally different type of traffic anomaly associated with the 11th Wuhan Municipal Games. In this anomaly distribution, there is a clear point source of traffic disruption, i.e., the spatial location marked by the event stamp, with congestion spreading from the source point to all adjacent roads. This traffic anomaly was caused by the 11th Wuhan City Games held in the east and west of the Lake District of Wuhan City, where a large number of people converged, leading to large-scale traffic congestion in the area.

5. Conclusions

This study proposed a deep learning model for the identification and analysis of anomalous traffic events. The main contributions encompass proposing a data-processing technique that transforms multi-source trajectory data into traffic condition visualizations. Traffic-ConvLSTM, a deep learning model, was introduced to identify anomalous traffic patterns across multiple spatial and temporal dimensions. A traffic pattern evaluation method based on the structural similarity index (SSlM) was also introduced. The experimental assessment on real-world datasets achieved satisfactory recognition outcomes at both urban and road levels. Developing these precise traffic anomaly-detection algorithms can significantly improve urban safety, optimize resources, enhance user experience, and help emergency response planning. Additionally, our analysis of large-scale traffic anomalies revealed distinct patterns closely associated with major holidays and significant public events. These findings underscore the importance of context-specific approaches in urban traffic management and planning.

Author Contributions

Conceptualization, Binbin Lu and Yunkun Mao; methodology, Yunkun Mao; software, Yunkun Mao; validation, Yunkun Mao; formal analysis, Yunkun Mao; investigation, Binbin Lu; resources, Binbin Lu; data curation, Yunkun Mao; writing—original draft preparation, Yunkun Mao and Yilin Shi; writing—review and editing, Yunkun Mao; visualization, Yunkun Mao, Yilin Shi and Binbin Lu; supervision, Binbin Lu; project administration, Binbin Lu; funding acquisition, Binbin Lu All authors have read and agreed to the published version of the manuscript.

Funding

This research was jointly funded by National Natural Science Foundation of China (grant number: U2033216; 42071368); the Fundamental Research Funds for the Central Universities (grant number: 2042022dx0001; 2042024kf0005).

Data Availability Statement

Data can be provided upon request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Central Committee of the Communist Party of China, State Council of the People’s Republic of China. Outline of the Construction of a Strong Transportation State; People’s Publishing House: Beijing, China, 2019. [Google Scholar]
  2. Zhang, M.; Li, T.; Yu, Y.; Li, Y.; Hui, P.; Zheng, Y. Urban anomaly analytics: Description, detection, and prediction. IEEE Trans. Big Data 2022, 8, 809–826. [Google Scholar] [CrossRef]
  3. Parkany, E.; Xie, C. A Complete Review of Incident Detection Algorithms Their Deployment: What Works and What Doesn’t; Report No: NETCR37; The New England Transportation Consortium: Mansfield, CT, USA, 2005. [Google Scholar]
  4. Jiang, Z.; Liu, Y.; Fan, X.; Wang, C.; Li, J.; Chen, L. Understanding urban structures and crowd dynamics leveraging large-scale vehicle mobility data. Front. Comput. Sci. 2020, 14, 145310. [Google Scholar] [CrossRef]
  5. Voort, M.V.D.; Dougherty, M.; Watson, S. Combining kohonen maps with arima time series models to forecast traffic flow. Transp. Res. Part C Emerg. Technol. 1996, 4, 307–318. [Google Scholar] [CrossRef]
  6. Duan, P.; Mao, G.; Liang, W.; Zhang, D. A unified spatio-temporal model for short-term traffic flow prediction. IEEE Trans. Intell. Transp. Syst. 2019, 20, 3212–3223. [Google Scholar] [CrossRef]
  7. Williams, B.M.; Hoel, L.A. Modeling and forecasting vehicular traffic flow as a seasonal arima process: Theoretical basis and empirical results. J. Transp. Eng. 2003, 129, 664–672. [Google Scholar] [CrossRef]
  8. Lin, C.; Zhu, Q.; Guo, S.; Jin, Z.; Lin, Y.; Cao, N. Anomaly detection in spatiotemporal data via regularized non-negative tensor analysis. Data Min. Knowl. Discov. 2018, 32, 1056–1073. [Google Scholar] [CrossRef]
  9. Xu, M.; Wu, J.; Wang, H.; Cao, M. Anomaly detection in road networks using sliding-window tensor factorization. IEEE Trans. Intell. Transp. Syst. 2019, 20, 4704–4713. [Google Scholar] [CrossRef]
  10. Wang, Y.; Zhang, Y.; Piao, X.; Liu, H.; Zhang, K. Traffic data reconstruction via adaptive spatial-temporal correlations. IEEE Trans. Intell. Transp. Syst. 2019, 20, 1531–1543. [Google Scholar] [CrossRef]
  11. Lv, Y.; Duan, Y.; Kang, W.; Li, Z.; Wang, F.Y. Traffic flow prediction with big data: A deep learning approach. IEEE Trans. Intell. Transp. Syst. 2014, 6, 865–873. [Google Scholar] [CrossRef]
  12. Chen, X.; Chen, H.; Yang, Y.; Wu, H.; Zhang, W.; Zhao, J.; Xiong, Y. Traffic flow prediction by an ensemble framework with data denoising and deep learning model. Phys. A Stat. Mech. Its Appl. 2021, 565, 125574. [Google Scholar] [CrossRef]
  13. Sun, F.; Dubey, A.; White, J. Dxnat—Deep neural networks for explaining non-recurring traffic congestion. In Proceedings of the 2017 IEEE International Conference on Big Data (Big Data), Boston, MA, USA, 11–14 December 2017. [Google Scholar]
  14. Fang, Z.; Long, Q.; Song, G.; Xie, K. Spatial-temporal graph ode networks for traffic flow forecasting. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Singapore, 14–18 August 2021. [Google Scholar]
  15. Zheng, H.; Lin, F.; Feng, X.; Chen, Y. A hybrid deep learning model with attention-based conv-lstm networks for short-term traffic flow prediction. IEEE Trans. Intell. Transp. Syst. 2021, 22, 6910–6920. [Google Scholar]
  16. Guo, S.; Lin, Y.; Feng, N.; Song, C.; Wan, H. Attention based spatial- temporal graph convolutional networks for traffic flow forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; pp. 922–929. [Google Scholar]
  17. Zhang, Y.; Li, Y.; Zhou, X.; Kong, X.; Luo, J. Curb-gan: Conditional urban traffic estimation through spatio-temporal generative adversarial networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Virtual Event, 6–10 July 2020. [Google Scholar]
  18. Zhang, Y.; Li, Y.; Zhou, X.; Kong, X.; Luo, J. Trafficgan: Off- deployment traffic estimation with traffic generative adversarial networks. In Proceedings of the 2019 IEEE International Conference on Data Mining (ICDM), Beijing, China, 8–11 November 2019. [Google Scholar]
  19. Zhang, Y.; Wang, S.; Chen, B.; Cao, J.; Huang, Z. TrafficGAN: Network-Scale Deep Traffic Prediction With Generative Adversarial Nets. IEEE Trans. Intell. Transp. Syst. 2021, 22, 219–230. [Google Scholar] [CrossRef]
  20. Essien, A.; Giannetti, C. A deep learning model for smart manufacturing using convolutional lstm neural network autoencoders. IEEE Trans. Ind. Inform. 2020, 16, 6069–6078. [Google Scholar]
  21. Levin, M.; Tsao, Y.-D. On forecasting freeway occupancies and volumes (abridgment). In Transportation Research Record; Transportation Research Board: Washington, DC, USA, 1980; pp. 47–49. [Google Scholar]
  22. Hamed, M.M.; Al-Masaeid, H.R.; Said, Z.M.B. Short-term prediction of traffic volume in urban arterials. J. Transp. Eng. 1995, 121, 249–254. [Google Scholar] [CrossRef]
  23. Zhao, Z.; Tang, L.; Ren, C.; Yang, X.; Kan, Z.; Li, Q. Diagnosing urban traffic anomalies by integrating geographic knowledge and tensor theory. GISci. Remote Sens. 2024, 61, 2290347. [Google Scholar]
  24. Medel, J.; Savakis, A. Anomaly detection in video using predictive con- volutional long short-term memory networks. arXiv 2016, arXiv:1612.00390. [Google Scholar]
  25. Shi, X.; Chen, Z.; Wang, H.; Yeung, D.; Wong, W.C.; Woo, W.-C. Convolutional lstm network: A machine learning approach for precipitation nowcasting. arXiv 2015, arXiv:1506.04214. [Google Scholar]
  26. Song, H.; Wang, W.; Zhao, S.; Shen, J.; Lam, K.-M. Pyramid Dilated Deeper ConvLSTM for Video Salient Object Detection. In Proceedings of the Computer Vision—ECCV 2018,Lecture Notes in Computer Science, Munich, Germany, 8–14 September 2018; pp. 744–760. [Google Scholar]
  27. Zhao, M.; Luo, T.; Zhou, B.; Pan, J.S. A Novel Algorithm for Video Frame Prediction Based on Convolutional Neural Network. In Proceedings of the Advances in Intelligent Information Hiding and Multimedia Signal Processing, Smart Innovation, Systems and Technologies, Daegu, Republic of Korea, 5–7 December 2023; pp. 187–193. [Google Scholar]
  28. Robertson, C.; Wilmoth, J.; Retterer, S.; Fuentes-Cabrera, M. Performing video frame prediction of microbial growth with a recurrent neural network. arXiv 2022, arXiv:2205.05810. [Google Scholar]
  29. Zhang, Z.; Lv, Z.; Gan, C.; Zhu, Q. Human action recognition using convolutional lstm and fully-connected lstm with different attentions. Neurocomputing 2020, 410, 304–316. [Google Scholar]
  30. Elsworth, S.; Güttel, S. Time series forecasting using lstm networks: A symbolic approach. arXiv 2020, arXiv:2003.05672. [Google Scholar]
  31. Ma, X.; Dai, Z.; He, Z.; Na, J.; Wang, Y.; Wang, Y. Learning traffic as images: A deep convolutional neural network for large-scale transportation network speed prediction. Sensors 2017, 17, 818. [Google Scholar] [CrossRef] [PubMed]
  32. Li, X.-W. The First Law of Geography and Spatial-Temporal Proximity. Chin. J. Nat. 2007, 29, 69–71. [Google Scholar]
  33. Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. 2004, 13, 600–612. [Google Scholar] [PubMed]
  34. Chollet, F. Keras: The Python Deep Learning Library; record ascl:1806.022; Astrophysics Source Code Library: Houghton, MI, USA, 2018. [Google Scholar]
  35. Abadi, M.; Agarwal, A.; Barham, P.; Brevdo, E.; Chen, Z.; Citro, C.; Corrado, G.S.; Davis, A.; Dean, J.; Devin, M.; et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv 2016, arXiv:1603.04467. [Google Scholar]
Figure 1. Framework of urban traffic anomaly detection and analysis.
Figure 1. Framework of urban traffic anomaly detection and analysis.
Ijgi 13 00351 g001
Figure 2. Real-time traffic data-collection area.
Figure 2. Real-time traffic data-collection area.
Ijgi 13 00351 g002
Figure 3. Traffic-ConvLSTM modeling structural framework.
Figure 3. Traffic-ConvLSTM modeling structural framework.
Ijgi 13 00351 g003
Figure 4. City-level traffic anomaly event statistics for September 2021 to June 2021, with the typical event causes that triggered city-level traffic anomalies during the period labeled in the figure.
Figure 4. City-level traffic anomaly event statistics for September 2021 to June 2021, with the typical event causes that triggered city-level traffic anomalies during the period labeled in the figure.
Ijgi 13 00351 g004
Figure 5. Typical city-level traffic anomaly cases from September 2021 to June 2022; (left) an overview of the traffic conditions in Wuhan at that moment in time; (right) the details of a traffic anomaly area corresponding to (left), which is marked with an event stamp.
Figure 5. Typical city-level traffic anomaly cases from September 2021 to June 2022; (left) an overview of the traffic conditions in Wuhan at that moment in time; (right) the details of a traffic anomaly area corresponding to (left), which is marked with an event stamp.
Ijgi 13 00351 g005
Table 1. Wuhan real-time traffic dataset.
Table 1. Wuhan real-time traffic dataset.
DateVelocityVehicle LocationSpeed 1LongitudeLatitude
2021-9-210:00Third Ring Road70114.44230.467
2021-9-210:30Zhushan Lake Avenue35114.13330.462
2021-9-228:30Shenlong Avenue25114.17230.491
1 The unit of speed is km/h.
Table 2. Accuracy and precision of four models for unusual traffic event detection at city-level and road-level scales.
Table 2. Accuracy and precision of four models for unusual traffic event detection at city-level and road-level scales.
Traffic-ConvLSTMSAECNN+LSTMBi-LSTMGANTransformer
City-precision92.875%85.714%67.857%71.428%90.124%87.143%
City-accuracy83.871%75.000%51.351%52.778%69.430%80.154%
Road-precision88.889%83.761%78.632%84.615%92.236%94.582%
Road-accuracy92.035%80.991%63.889%70.714%81.119%91.715%
time4.886.213.555.189.9311.78
Table 3. Ablation experiment based on ConvLSTM layer number setting.
Table 3. Ablation experiment based on ConvLSTM layer number setting.
Layers-5Layers-4Layers-3Layers-2
City-precision93.007%93.115%92.875%89.294%
City-accuracy81.106%83.712%83.871%82.125%
Road-precision91.113%90.003%88.889%85.127%
Road-accuracy89.758%93.035%92.035%83.885%
Time9.146.024.884.18
Table 4. Ablation experiments based on the temporal and spatial characteristics of different scales in the encoder RNN sequence of the forecasting layer.
Table 4. Ablation experiments based on the temporal and spatial characteristics of different scales in the encoder RNN sequence of the forecasting layer.
In OrderOut of Order
City-precision92.875%91.992%
City-accuracy83.871%83.108%
Road-precision88.889%85.019%
Road-accuracy92.035%85.892%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Mao, Y.; Shi, Y.; Lu, B. Detecting Urban Traffic Anomalies Using Traffic-Monitoring Data. ISPRS Int. J. Geo-Inf. 2024, 13, 351. https://doi.org/10.3390/ijgi13100351

AMA Style

Mao Y, Shi Y, Lu B. Detecting Urban Traffic Anomalies Using Traffic-Monitoring Data. ISPRS International Journal of Geo-Information. 2024; 13(10):351. https://doi.org/10.3390/ijgi13100351

Chicago/Turabian Style

Mao, Yunkun, Yilin Shi, and Binbin Lu. 2024. "Detecting Urban Traffic Anomalies Using Traffic-Monitoring Data" ISPRS International Journal of Geo-Information 13, no. 10: 351. https://doi.org/10.3390/ijgi13100351

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop