HUAD: Hierarchical Urban Anomaly Detection Based on Spatio-Temporal Data

Xiangjie Kong, Haoran Gao, Osama Alfarraj, Qichao Ni, Chaofan Zheng, Guojiang ShenIEEE Access 2020 · OpenReview

Abstract

Due to the rapid development of communication and sensing technology, a large amount of mobile data is collected so that we can infer the complex movement laws of humans. For cities, some unusual events may endanger public safety. If the early warning of an abnormal event can be issued, it is of great application value to urban construction services. To detect urban anomalies, this paper proposes the Hierarchical Urban Anomaly Detection (HUAD) framework. The first step in this framework is to build rough anomaly characteristics that need to be calculated by some traffic flow consisted of subway and taxi data. In the second step, the alternative abnormal regions were obtained. Then, the long short-term memory (LSTM) network is used to predict the traffic to get the historical anomaly scores. Following that, the refined anomaly characteristics are generated from adjacent regions, adjacent periods and historical anomalies. The final abnormal regions were detected by One-Class Support Vector Machine (OC-SVM). At last, based on real data sets, we analyzes the traffic flow of the target region and adjacent regions from multiple perspectives in view of the large crowd gathering activities, and the effectiveness of the method is verified.

Introduction

Urban anomalies—ranging from planned concerts and sports matches to unplanned protests or disasters—can lead to dangerous crowd stampedes and massive traffic congestion. While "big picture" urban trends are relatively easy to track, local anomalies (events occurring in a small space over a short time) are notoriously difficult to predict because they are influenced by complex, localized factors.

Most existing detection systems rely on a single data source, such as taxi GPS traces. However, taxis only represent a fraction of urban mobility. To get a clear picture of how a city "breathes," researchers need to integrate multi-source data (like subways and taxis) and account for both spatial relationships (neighboring regions) and temporal trends (historical patterns). The HUAD framework addresses these challenges by fusing multi-source spatio-temporal data into a hierarchical detection pipeline.

The HUAD Framework

The authors propose a two-stage hierarchical framework called HUAD (Hierarchical Urban Anomaly Detection). This approach balances computational efficiency with high-precision detection by filtering the search space before applying deep learning models.

The Hierarchical Urban Anomaly Detection (HUAD) framework pipeline, illustrating the flow from data sources to final classification.

1. Rough Detection (Filtering)

The city is first divided into 541 distinct regions. The system calculates basic traffic flow characteristics (ACI) and uses an unsupervised One-Class Support Vector Machine (OC-SVM) to filter out "normal" areas. This stage identifies a set of candidate abnormal regions that warrant more intensive analysis.

2. Refined Detection (Deep Learning + Context)

For the candidate regions, the framework employs a more sophisticated analysis:

  • LSTM Prediction: A Long Short-Term Memory (LSTM) network is trained on historical data to predict what "normal" traffic should look like for the candidate regions at a given time.
  • Historical Anomaly Score (HAS): The system calculates the difference between the predicted "normal" flow and the actual observed flow. A high deviation suggests a potential anomaly.
  • Spatio-Temporal Fusion: The model does not look at a region in isolation. It pulls in data from adjacent regions and preceding time periods, creating a rich feature set (ACII) that captures the "leakage" of anomalies into neighboring areas.
  • Final Classification: A second OC-SVM processes these refined features to make the final anomaly determination.
Internal structure of the LSTM cell used for multi-step traffic prediction within the HUAD framework.

Experimental Evaluation

The study utilized massive real-world datasets from Shanghai in April 2015 to validate the framework:

  • Taxi GPS Data: 34 billion records from over 13,000 taxis.
  • Subway Data: 445 million transaction records (24GB) covering the city's extensive metro network.
  • Ground Truth: To evaluate accuracy, the researchers compiled a list of 14 major events that occurred that month, including concerts at the Mercedes-Benz Arena and football matches at Shanghai Stadium.

Key Results and Insights

The HUAD framework was tested against several baseline models, yielding several critical insights:

  • The Subway Advantage: Researchers found that subway data is far more indicative of large crowd gatherings than taxi data. In downtown areas, subway capacity can be ten times higher than taxi capacity. Relying solely on taxis for anomaly detection is insufficient for capturing major urban events.
  • Prediction as a Proxy for Normality: Instead of just looking for "high" traffic, the model looks for "unexpected" traffic. By using an LSTM to define what is "normal" for a specific time and day, the system can identify anomalies even if the total volume isn't record-breaking.
  • Performance Metrics: The full HUAD model achieved a recall rate of 0.71, successfully identifying the majority of the 14 target events. In contrast, using taxi data alone resulted in a recall of only 0.29, while subway data alone reached 0.50. Fusing the two sources was essential for high performance.
  • Algorithm Superiority: Replacing the LSTM with a traditional ARIMA (Auto-Regressive Integrated Moving Average) model dropped the recall to 0.57, highlighting the power of deep learning in handling non-linear traffic patterns.

Conclusion

HUAD represents a significant step forward in urban safety and planning. By combining the predictive power of LSTM networks with the robust classification of OC-SVMs, the framework can identify local anomalies that traditional single-source methods miss. Future work may incorporate social media "check-in" data or weather information to provide even more context and improve real-time early warning capabilities.

Summary updated

Abstract

Due to the rapid development of communication and sensing technology, a large amount of mobile data is collected so that we can infer the complex movement laws of humans. For cities, some unusual events may endanger public safety. If the early warning of an abnormal event can be issued, it is of great application value to urban construction services. To detect urban anomalies, this paper proposes the Hierarchical Urban Anomaly Detection (HUAD) framework. The first step in this framework is to build rough anomaly characteristics that need to be calculated by some traffic flow consisted of subway and taxi data. In the second step, the alternative abnormal regions were obtained. Then, the long short-term memory (LSTM) network is used to predict the traffic to get the historical anomaly scores. Following that, the refined anomaly characteristics are generated from adjacent regions, adjacent periods and historical anomalies. The final abnormal regions were detected by One-Class Support Vector Machine (OC-SVM). At last, based on real data sets, we analyzes the traffic flow of the target region and adjacent regions from multiple perspectives in view of the large crowd gathering activities, and the effectiveness of the method is verified.
BibTeX
@inproceedings{kong2020huad,
  author = {Xiangjie Kong and Haoran Gao and Osama Alfarraj and Qichao Ni and Chaofan Zheng and Guojiang Shen},
  title = {{HUAD: Hierarchical Urban Anomaly Detection Based on Spatio-Temporal Data}},
  booktitle = {IEEE Access},
  year = {2020},
  url = {https://openreview.net/forum?id=8xpNi2BTlns},
}
Figure