This is the code for our paper 《Heterogeneous Hyperbolic Hypergraph Neural Network for Friend Recommendation in Location-based Social Networks》, which has been published in TKDD.
We provide the processed datasets for six cities in the data
folder.
The Gowalla dataset comes from Yong Liu. We noticed that this page is no longer accessible due to the expiration of his homepage domain sometimes. Therefore, we have made the downloaded dataset available in our Google Drive.
!!! Importantly, in this work, we have open-sourced the data preprocessing code, using the Gowalla dataset as an example.
This includes instructions on how to construct the heterogeneous hypergraph and the heterogeneous multigraph in HMGCL. Please refer to the data_preprocess
folder.
-
Download Raw Data
Download the raw data into thedata/yongliu_gowalla_data
folder. -
Split Data by City
Rundata_preprocess/split_data_into_city.ipynb
to divide the global dataset into individual cities. -
Build Hypergraph Data Format
Rundata_preprocess/build_hypergraph.ipynb
to generate the hypergraph data format for each city. -
Build Multigraph Data Format
Rundata_preprocess/build_multigraph.ipynb
to generate the multigraph data format for each city.
Note:
The hypergraph and multigraph data formats obtained here can be directly used in my previous HMGCL and HHGNN work, serving as baselines.
- Python 3.10, Pytorch, DGL, PyG, pytorch-scatter,torch_sparse, etc.
- GPU is recommended with 48GB memory or more.
To run the code, you can use the following command
python train_hyperbolic.py \
--city CHI \
--manifold_name poincare
You can check all the configurable parameters in the config.py file.
If you find this work helpful, please consider citing our paper:
@article{li2025heterogeneous,
author = {Li, Yongkang and Fan, Zipei and Song, Xuan},
title = {Heterogeneous Hyperbolic Hypergraph Neural Network for Friend Recommendation in Location-based Social Networks},
year = {2025},
issue_date = {April 2025},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {19},
number = {3},
issn = {1556-4681},
url = {https://doi.org/10.1145/3708999},
doi = {10.1145/3708999},
journal={ACM Transactions on Knowledge Discovery from Data},
month = feb,
articleno = {57},
numpages = {29},
}