Home

Awesome

GraphSim

This is the repo for Learning-based Efficient Graph Similarity Computation via Multi-Scale Convolutional Set Matching (AAAI 2020), and Convolutional Set Matching for Graph Similarity. (NeurIPS 2018 Relational Representation Learning Workshop).

Data and Files

Get the data files <dataset>_result.zip and extract under data.

Get the pickle files <dataset>_<ged_or_mcs>_<algo>_gidpair_dist_map.pickle and put under save.

Get the (ground-truth and baseline) result files <dataset>_result.tar.gz and extract under result.

This repo only contains code and please download the above files from https://drive.google.com/drive/folders/1JcAgWKYC41687UeiLaFg-QlPmIpZvWhT?usp=sharing

Dependencies

Install the following the tools and packages:

Reference commands: sudo pip3 install numpy pandas scipy scikit-learn tensorflow networkx==1.10 beautifulsoup4 lxml matplotlib seaborn colour pytz requests klepto

Tips for PyCharm Users

Run

Modify the configuration file model/Siamese/config.py, then run the model.

Example commands to run our model:

cd model/Siamese
python3.5 run.py 

The model's results are saved under model/Siamese/logs. To check prec@k, etc., use model/Siamese/extract_prec.py.

How to create your own datasets?

Define your data object in src/data.py and src/utils.py.

Run the GED/MCS solver(s) on your datasets using src/exp.py (exp1). Notice that you need to set up the GED/MCS solver(s) according to the Dependencies above. The results are saved under result/.

Load your dataset into the model by modifying model/Siamese/config.py and run the model as described above.