NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Spatiotemporal and Semantic Zero-inflated Urban Anomaly Prediction

Yao Lu, Pengyuan Zhou, Yong Liao, Haiyong XiearXiv 2023

TL;DR

This paper introduces STS, a novel deep learning framework for predicting urban anomalies like crime and traffic accidents. STS effectively tackles the challenge of sparse, "zero-inflated" data by jointly modeling spatial, temporal, and semantic dependencies and employing a multi-task learning approach to improve prediction accuracy.

What Problem Does This Paper Address?

Urban anomalies, such as crimes and traffic accidents, are critical indicators of city safety and require accurate prediction for effective management. Existing deep learning methods often struggle with these tasks due to two main challenges:

  1. Zero-inflated data: Urban anomalies are rare events, leading to datasets with a vast majority of "zero" observations. Standard models trained on such data tend to predict zero for most instances, significantly degrading performance.
  2. Complex dependencies: Predicting these anomalies requires understanding intricate relationships across spatial (geographic locations), temporal (time), and semantic (types of anomalies) dimensions. Existing methods often focus on only one or two of these dimensions, failing to capture their combined influence.

The paper aims to develop a unified framework that can accurately predict various urban anomalies by addressing both the data sparsity and the multi-dimensional dependency issues.

Methods

The proposed framework, STS (Spatiotemporal and Semantic Zero-inflated Urban Anomaly Prediction), is built around three core modules:

  1. Data Preprocessing: This module prepares the input data by generating region networks (based on administrative or grid-based zoning) and creating "category-aware embeddings." These embeddings capture information about the anomaly type and its temporal evolution.
  2. Spatiotemporal and Semantic Dependency (STC) Module: This is the heart of STS, designed to capture the complex interdependencies. It consists of multiple stacked STC layers, each containing:
  3. Multi-Head Semantic Self-Attention (MSA): Models arbitrary correlations between different types of anomalies (e.g., how a robbery might influence the likelihood of other crimes). It leverages the Transformer's attention mechanism.
  4. Time-Aware Recurrent Module (TRR): Captures short-term temporal dependencies using a Gated Recurrent Unit (GRU).
  5. Dynamic Spatiotemporal Attention (DSA): Extracts dependencies between different regions and long-term time frames, incorporating graph attention for spatial relationships and positional encoding for temporal sequences.
  6. Multi-Task Prediction Module: This module specifically addresses the zero-inflated data problem. It employs a two-pronged approach:
  7. Auxiliary Task (Exposure Process): A binary classification task to predict whether an anomaly is likely to occur in a region at a given time.
  8. Main Task (Count Process): A regression task to predict the actual number of anomalies, conditioned on the output of the auxiliary task.
  9. Customized Loss Function: A weighted loss function is used, giving less weight to zero samples to mitigate their disproportionate influence on model training.

Datasets

The paper evaluates STS on two types of urban anomaly prediction tasks using real-world datasets:

  • Crime Prediction:
    • New York City (NYC) crime data (Jan 2014 - Dec 2015)
    • Chicago (CHI) crime data (Jan 2014 - Dec 2015)
  • Traffic Accident Risk Prediction:
    • New York City (NYC) traffic accident data (Jan 2013 - Dec 2013)
    • Chicago (CHI) traffic accident data (Feb 2016 - Sept 2016)

The datasets are characterized by significant zero-inflation, with sparsity rates ranging from 67.4% to 88.7%.

Key Insights and Ideas

  • The critical role of zero-inflation handling: The paper strongly emphasizes that traditional models, even advanced deep learning ones, suffer significantly when faced with sparse, zero-inflated data. STS's multi-task learning approach and custom loss function are crucial for overcoming this.
  • Joint modeling is key: Simply combining spatial, temporal, or semantic features independently is insufficient. STS's strength lies in its ability to jointly capture these interdependencies, leading to more accurate predictions.
  • Semantic dependencies matter for crime: The MSA component, which models relationships between different crime types, proved particularly important for crime prediction, highlighting that the nature of the anomaly itself influences future occurrences.
  • Robustness across anomaly types: STS demonstrates generalizability by performing well on both crime and traffic accident prediction, suggesting its architecture is adaptable to different urban anomaly scenarios.
  • Hyperparameter sensitivity and optimal configurations: The study reveals that while STS is generally robust, optimal performance is achieved with specific configurations of STC layers, attention heads, and hidden state dimensions, indicating a balance between model complexity and data representation.

Key Results

  • Superior Performance: STS significantly outperforms state-of-the-art (SOTA) methods on both crime prediction and traffic accident risk prediction tasks.
  • Crime Prediction: STS improves MAE by 37.88% and RMSE by 18.10% on zero-inflated datasets, and by 60.32% and 37.28% on non-zero datasets, respectively.
  • Traffic Accident Risk Prediction: STS improves MAE by 47.28% and RMSE by 18.34% in NYC, and by 52.19% and 16.15% in CHI, respectively.
  • Component Importance: Ablation studies show that all components of STS contribute to its performance. The multi-task prediction module provides the biggest boost, underscoring the importance of handling zero-inflation. The TRR (short-term temporal) component is found to be particularly crucial for traffic accident prediction.
  • Interpretability: The paper provides visualizations demonstrating that STS can capture and represent spatial, temporal, and semantic dependencies, offering insights into how the model makes its predictions.

Limitations and Future Work

  • Dataset Specificity: While STS shows generalizability, its performance is evaluated on specific crime and traffic accident datasets. Future work could explore its applicability to a wider range of urban anomalies.
  • Hyperparameter Tuning: Although STS is shown to be robust, finding the optimal hyperparameters for new datasets might require further tuning.
  • Computational Cost: Deep learning models, especially those with attention mechanisms and multiple layers, can be computationally intensive. While not explicitly detailed as a limitation, this is an inherent consideration.
  • Future Work: The authors suggest exploring STS for other urban anomaly prediction tasks and potentially incorporating more diverse data sources to further enhance prediction accuracy. They also highlight the potential for STS to be adapted for real-time anomaly detection.

Summary updated

BibTeX
@misc{lu2023spatiotemporal,
  author = {Yao Lu and Pengyuan Zhou and Yong Liao and Haiyong Xie},
  title = {{Spatiotemporal and Semantic Zero-inflated Urban Anomaly Prediction}},
  year = {2023},
  eprint = {2304.01569},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.01569},
}
Figure