This repository holds the code used in our IJCAI-21 paper Unsupervised Path Representation Learning with Curriculum Negative Sampling.
Here we give a PyTorch implementation of PIM. The repository is organized as follows:
data/
includes training data sample, when use your own data you can follow this format;models/
contains the implementation of the PIM pipeline (pim.py
);layers/
contains the implementation of the bilinear discriminator (discriminator.py
);utils/
contains the necessary processing tool (process.py
).
To better understand the code, we recommend that you could read the code of DGI/Petar (https://arxiv.org/abs/1809.10341) in advance. Besides, you could further optimize the code based on your own needs.
We use two datasets in our paper: Aalborg and Harbin and you can download the Harbin dataset to train the PIM, where the pre-processing is needed.
- Ubuntu OS (18.04)
- PyTorch =1.7.1
- Numpy >= 1.16.2
- Pickle
Please refer to the source code to install the required packages in Python.
python train.py
Please cite our paper if you make advantage of PIM in your research:
@inproceedings{
IJCAI21,
title="{Unsupervised Path Representation Learning with Curriculum Negative Sampling}",
author={Sean Bin Yang, Jilin Hu, Chenjuan Guo, Jian Tang and Bin Yang},
booktitle={Proceedings of The 30th International Joint Conference on Artificial Intelligence},
year={2021},
}