Spatial-Temporal Hypergraph Self-Supervised Learning for Crime Prediction

Zhonghang Li, Chao Huang, Lianghao Xia, Yong Xu, Jian PeiICDE 2022 · DOI

Abstract

Urban crime prediction is critical for public safety and resource allocation. However, crime data is characterized by extreme sparsity and skewed spatial distributions, which limit the effectiveness of traditional supervised learning models. This paper presents ST-HSL, a novel framework that integrates spatial-temporal hypergraphs with self-supervised learning (SSL). By modeling high-order global dependencies and employing a dual-stage SSL paradigm, ST-HSL effectively captures complex crime patterns even in data-scarce regions. Experimental results on NYC and Chicago datasets demonstrate that ST-HSL significantly outperforms state-of-the-art baselines.

1. Introduction

Timely and accurate crime prediction is a cornerstone of modern urban management. While deep learning has advanced spatial-temporal forecasting in fields like traffic and weather, crime prediction remains uniquely challenging due to two primary factors:

  1. Sparse Supervision: In fine-grained urban grids, the majority of spatial-temporal cells record zero crime events, making it difficult for models to learn meaningful representations from standard supervised signals.
  2. Skewed Distribution: Crime activity often follows a power-law distribution, where a few "hotspots" account for most incidents. This leads to models that are biased toward high-activity areas while failing to generalize to the rest of the city.

Existing methods often focus on local spatial dependencies (e.g., neighboring regions) but overlook global correlations—such as similar crime patterns in distant commercial districts. ST-HSL addresses these gaps by leveraging hypergraphs for global modeling and self-supervision to mitigate label scarcity.

2. The ST-HSL Framework

The ST-HSL architecture is built upon three core components designed to handle the nuances of urban crime data.

2.1 Multi-View Convolutional Encoder

To capture local context, the model employs a hierarchical convolutional encoder. This component processes three distinct views:

  • Spatial Proximity: Encoding relationships between immediate neighboring blocks.
  • Temporal Trends: Capturing recent historical patterns and periodicities.
  • Categorical Correlations: Analyzing how different crime types (e.g., burglary vs. robbery) interact within the same area.

2.2 Hypergraph Global Dependency Modeling

Traditional graphs connect nodes in pairs, which is insufficient for capturing complex, multi-region relationships. ST-HSL utilizes a hypergraph structure where hyperedges connect groups of regions sharing similar characteristics. This allows the model to bridge distant regions and facilitate "knowledge transfer"—for instance, applying patterns learned from one high-activity shopping mall to a similar but lower-activity district across the city.

2.3 Dual-Stage Self-Supervised Learning (SSL)

The core innovation of the framework is its dual-stage SSL paradigm, which provides auxiliary signals to overcome data sparsity:

  • Hypergraph Infomax: This stage encourages the model to understand the global urban structure by distinguishing between real spatial-temporal data and "corrupted" (shuffled) versions.
  • Cross-View Contrastive Learning: The model aligns the "local" representation (from the CNN encoder) with the "global" representation (from the hypergraph). By enforcing consistency between these two views, the model becomes more robust against noise and gaps in the crime data. Additionally, the use of adaptive hard negative mining helps the model focus on regions that are difficult to distinguish, improving learning efficiency.

3. Experimental Evaluation

The authors evaluated ST-HSL using two comprehensive real-world datasets:

  • NYC-Crimes (2014–2015): Covering Burglary, Robbery, Assault, and Larceny across 256 regions.
  • Chicago-Crimes (2016–2017): Covering Theft, Battery, Damage, and Assault across 168 regions.

3.1 Performance and Baselines

ST-HSL was compared against 15 baselines, ranging from traditional statistical methods (ARIMA) to advanced deep learning architectures (DCRNN, GMAN). ST-HSL consistently achieved the lowest Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) across all crime categories. For example, in NYC Burglary prediction, ST-HSL achieved an MAE of 0.7329, a significant improvement over the next best baseline, Graph WaveNet (0.7993).

3.2 Robustness in Sparse Regions

A critical finding was the model's stability in low-density regions. While baseline models often saw a sharp decline in accuracy in areas with few crimes, ST-HSL maintained high performance. This confirms that the SSL components successfully extract useful features even when explicit labels are scarce.

4. Discussion and Future Work

ST-HSL demonstrates that self-supervision and hypergraph modeling are powerful tools for sparse spatial-temporal data. However, the study identifies several areas for improvement:

  • Spatial Partitioning: The current grid-based approach (3km x 3km) may not align with irregular urban boundaries like parks or rivers. Future iterations could explore more flexible spatial partitioning.
  • Model Complexity: Increasing embedding dimensions beyond a certain threshold (e.g., 32) can lead to overfitting, indicating a limit to the information density of sparse crime data.
  • Dynamic External Factors: Future research could integrate real-time data such as weather, social media activity, or traffic flow to further sharpen predictive accuracy.

5. Conclusion

The ST-HSL framework represents a significant step forward in urban crime forecasting. By combining local convolutional encoding with global hypergraph dependencies and a dual-stage self-supervised learning strategy, it effectively addresses the long-standing challenges of data sparsity and skewed distributions. The implementation is available as an open-source project to support further research in public safety analytics.

Summary updated

BibTeX
@inproceedings{li2022spatial,
  author = {Zhonghang Li and Chao Huang and Lianghao Xia and Yong Xu and Jian Pei},
  title = {{Spatial-Temporal Hypergraph Self-Supervised Learning for Crime Prediction}},
  booktitle = {ICDE},
  year = {2022},
  doi = {10.1109/icde53745.2022.00269},
}
Figure