Skip to content

Yifang-Qin/Diff-POI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Diff-POI

This is the pytorch implementation for our TOIS 2023 paper:

Yifang Qin, Hongjun Wu, Wei Ju, Xiao Luo, Ming Zhang (2023). A Diffusion model for POI recommendation

@article{10.1145/3624475,
author = {Qin, Yifang and Wu, Hongjun and Ju, Wei and Luo, Xiao and Zhang, Ming},
title = {A Diffusion Model for POI Recommendation},
year = {2023},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
issn = {1046-8188},
url = {https://doi.org/10.1145/3624475},
doi = {10.1145/3624475},
journal = {ACM Trans. Inf. Syst.},
month = {sep},
}

In this paper, we propose Diff-POI: a Diffusion-based model that samples the user’s spatial preference for the next POI recommendation. Diff-POI encodes the user’s visiting sequence and spatial character with two tailor-designed graph encoding modules, followed by a diffusion-based sampling strategy to explore the user’s spatial visiting trends.

Environment Requirement

The code has been tested running under Python 3.9.13. The required packages are as follows:

  • pytorch == 1.11.0
  • torchsde == 0.2.4
  • torch_geometric (PyG) == 2.0.4
  • pandas == 1.5.3

Please cite our paper if you use the code.

Running Example

For example, to generate Foursquare-Tokyo data for Diff-POI, first change the working directory into ~/.data and run:

python process_data_tky-and-nyc.py

which will generate processed data files under the directory ~/processed/tky/.

To conduct experiment on Foursquare-Tokyo, run:

cd ./code
python main.py --dataset tky --batch 1024 --patience 10 --dropout 

For more execution arguments of Diff-POI, please refer to ~/code/main.py or run

python main.py -h

About

The official PyTorch implementation of Diff-POI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages