Maximizing Cohesion and Separation in Graph Representation Learning: A Distance-aware Negative Sampling Approach
This repository is the official PyTorch implementation of Maximizing Cohesion and Separation in Graph Representation Learning: A Distance-aware Negative Sampling Approach
All our experiments use PyTorch 1.1.0 and PyTorch geometric library. Follow PyTorch geometric Installation to install PyTorch geometric in your environment. You need to install the following packages to run all the codes in this repository.
numpy
matplotlib
pandas
scikit-learn
scipy
networkx
seaborn
pylab
To train the DeepWalk-DNS model, run the DeepWalk-DNS notebook. Specify the parameters of the model in the notebook. Be careful in writing the exact data path and saved model path. All other models are in separate notebook and require similar attention like the the DeepWalk-DNS model.
Run each notebook to train each model.
To evaluate the performance of all the models, run the F1-Evaluation notebook. Specify the parameters and the path correctly in the notebook.
Run the notebook to evaluate the models.
You can download pretrained models here: All the datasets have specific folders for specific models
Download the models and put it into the saved_models folder.