ST-HHOL: Spatio-Temporal Hierarchical Hypergraph Online Learning for Crime Prediction
February 10, 2026 ยท View on GitHub
This repo provides the implementation code corresponding to our paper (ICLR 2026) entitled "ST-HHOL: Spatio-Temporal Hierarchical Hypergraph Online Learning for Crime Prediction". The code is implemented on Pytorch 2.0.0 server with an NVIDIA RTX 3090.

Requirements
- torch == 2.0.0
- cuda version == 12.4
- pandas==1.2.4
- numpy == 1.19.1
- torchvision==0.8.2
- torchaudio==0.7.2
- scipy==1.6.2
- scikit-learn==0.24.1
- torch-geometric==2.0.2
- torch-scatter==2.0.5
- torch-sparse==0.6.8
Datasets
We conduct experiments on three real-world urban crime datasets from Chicago (CHI), New York City (NYC), and Philadelphia (PHI), each recording four crime types along with occurrence times and areas. In addition, we collect multi-source data including 311 service requests, weather, POI distribution, and socioeconomic indicators.
The original data sets are obtained from: Chicago data portal, NYC open data, Philadelphia open data.
For proper execution, please ensure that the datasets are placed within the .\data[dataset_name]\dataset.npy
Arguments
We introduce some major arguments of our main function here.
Training settings:
- device: using which GPU to train our model
- seed: the random seed for experiments
- dataset: which dataset to run
- bs: the batch size of the training and testing phase
- seq_len: the input length of the history
- horizon: the output length of the future
- begin_month: the beginning month of online learning
- end_month: the ending month of online learning
- areaNum: the number of spatial regions
- cateNum: the number of crime types
- multi_num: the number of input multi-source factors' types
- lr_decay_ratio: the ratio of learning rate decay
- input_dim: the dimension of inputs
- output_dim: the dimension of inputs
- max_epochs: the maximum number of training epochs
- patience: the patience of early stopping
- train_ratio: the training ratio
- val_ratio: the evaluation ratio
Model hyperparameters:
- latdim: the hidden dimensions in ST-HHOL
- hyperNum: the number of homogeneous hyperedges
- U: the layers of PF-LLM
- rec_loss_weight: the weight of the regression loss
- dropRateL: dropout rate
Train
python main.py
Code Reference
We would like to thank these authors for their excellent work and codebase: