Crime Forecasting: A Spatio-temporal Analysis with Deep Learning Models

Li Mao, Wei Du, Shuo Wen, Qi Li, Tong Zhang, Wei Zhong

TL;DR

This paper introduces a novel Convolutional LSTM (CNN-LSTM) model for predicting urban crime counts at a granular, spatiotemporal level. They demonstrate that preprocessing crime data through "binning" significantly improves prediction accuracy compared to using raw data, with 10 bins striking an optimal balance between performance and data granularity.

What Problem Does This Paper Address?

Predicting crime is a complex challenge with significant societal implications, aiming to enhance police surveillance, intelligence gathering, and proactive crime prevention. Traditional methods struggle with the inherent spatiotemporal nature of crime, making it difficult to pinpoint where and when crimes are most likely to occur. The concept of "near-repeat victimization" highlights that a crime in a specific location increases the likelihood of subsequent crimes in the vicinity, underscoring the need for models that capture both spatial and temporal dependencies. This paper tackles the problem of accurately forecasting crime counts by treating it as a spatiotemporal sequence prediction task, aiming to improve upon existing deep learning approaches.

Methods

The core of this research lies in a novel Convolutional LSTM (CNN-LSTM) architecture designed for spatiotemporal crime forecasting. The model combines:

  • 1D Convolutional Neural Networks (CNNs): Used to extract spatial features from crime data within defined grid cells. This helps in identifying localized patterns and dangerous features.
  • Long Short-Term Memory (LSTM) Networks: Employed to learn temporal dependencies and patterns from sequences of crime data. LSTMs are well-suited for time-series data and can mitigate issues like vanishing gradients in traditional Recurrent Neural Networks (RNNs).

The paper also explores the impact of data binning as a preprocessing step. This involves categorizing raw crime counts into a fixed number of intervals (bins). They investigate "Equal Width Binning," where the data range is divided into equal intervals. This process aims to simplify data and potentially improve model performance by reducing noise and highlighting broader trends.

Datasets

The study utilizes a dataset of over 730,000 crime records from Philadelphia, Pennsylvania, spanning from January 2017 to December 2021. This dataset includes crime timestamps and precise location information (longitude and latitude). The data is aggregated into a grid system (5000m x 5000m cells) to create spatiotemporal crime count vectors for input into the models.

Key Insights and Ideas

  • Raw crime data is problematic for deep learning models: Directly feeding raw crime counts into forecasting models leads to prohibitively high prediction errors, rendering them unsuitable for practical, real-world applications.
  • Data binning is crucial for performance: Preprocessing crime data by categorizing it into bins significantly enhances the accuracy of deep learning forecasting models.
  • 10 bins offer an optimal balance: While binning generally improves performance, dividing the data into 10 intervals strikes the best balance. It retains sufficient data characteristics for accurate prediction while avoiding the loss of granularity that occurs with fewer bins (e.g., 5 bins), which can lead to overly heterogeneous data within each bin.
  • CNN-LSTM outperforms other models: The proposed CNN-LSTM architecture demonstrates superior performance compared to standard RNN, GRU, and LSTM models, particularly when applied to binned data.

Key Results

  • Raw Data Performance: For raw data, LSTM performed best among the tested models, but with high error metrics (MSE: 15.52, RMSE: 3.94, MAE: 2.35).
  • Binned Data (10 Bins): The Convolutional LSTM model achieved the lowest error metrics with binning into 10 intervals (MSE: 0.62, RMSE: 0.78, MAE: 0.46). Other models also showed significant improvements with binning.
  • Binned Data (5 Bins): The Convolutional LSTM model again showed the lowest error values when data was binned into 5 intervals (MSE: 0.17, RMSE: 0.41, MAE: 0.23).
  • Qualitative Findings: Figure 6 visually demonstrates how binning improves the spatial prediction maps, making them more coherent and less noisy than predictions from raw data. However, it also highlights that binning into 5 groups leads to overly coarse maps.

Limitations and Future Work

  • Data Granularity vs. Performance Trade-off: While binning improves performance, it inherently reduces the granularity of the spatial representation. The paper notes that 5 bins result in overly heterogeneous data, while 10 bins offer an optimal compromise.
  • Model Choice Dependency: The optimal model choice (LSTM vs. CNN-LSTM) depends on the data preprocessing method (raw vs. binned).
  • Future Work: The paper implicitly suggests further exploration into optimal binning strategies and potentially more advanced spatiotemporal modeling techniques to further refine crime prediction accuracy and maintain spatial detail.

Summary updated

Abstract

This study uses deep-learning models to predict city partition crime counts on specific days. It helps police enhance surveillance, gather intelligence, and proactively prevent crimes. We formulate crime count prediction as a spatiotemporal sequence challenge, where both input data and prediction targets are spatiotemporal sequences. In order to improve the accuracy of crime forecasting, we introduce a new model that combines Convolutional Neural Networks (CNN) and Long Short-Term Memory (LSTM) networks. We conducted a comparative analysis to access the effects of various data sequences, including raw and binned data, on the prediction errors of four deep learning forecasting models. Directly inputting raw crime data into the forecasting model causes high prediction errors, making the model unsuitable for real - world use. The findings indicate that the proposed CNN-LSTM model achieves optimal performance when crime data is categorized into 10 or 5 groups. Data binning can enhance forecasting model performance, but poorly defined intervals may reduce map granularity. Compared to dividing into 5 bins, binning into 10 intervals strikes an optimal balance, preserving data characteristics and surpassing raw data in predictive modelling efficacy.
BibTeX
@misc{mao2025crime,
  author = {Li Mao and Wei Du and Shuo Wen and Qi Li and Tong Zhang and Wei Zhong},
  title = {{Crime Forecasting: A Spatio-temporal Analysis with Deep Learning Models}},
  year = {2025},
  eprint = {2502.07465},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.07465},
}
Figure