Giter Club home page Giter Club logo

tlc-gnn's Introduction

TLC-GNN & PDGNN

Implementation for paper Link Prediction with Persistent Homology: An Interactive View (ICML 2021, TLC-GNN) and for paper Neural Approximation of Graph Topological Features (NeurIPS 2022, PDGNN)

Requirements

Python version is 3.7, and the versions of needed packages are listed in requirements.txt

We also provide a packed environment, which is available at:

curvGN.tar.gz

you can activate the environment with:

tar -xzf curvGN.tar.gz -C curvGN
source curvGN/bin/activate

Run experiments for TLC-GNN

python pipelines.py

to run the experiments for PubMed, Photo and Computers datasets, the results will be stored in ./scores.

If you want to run experiments for PPI datasets, you can comment out line 56 in pipelines.py.

For Cora and Citeseer, you can set the dropout in ./baselines/TLC-GNN to 0.8, the results can be a little higher

Setup Cython

cd ./sg2dgm
python setup_PI.py build_ext --inplace

to setup ./sg2dgm/persistenceImager.pyx

If the command does not work, a substitute solution is to copy the code in ./sg2dgm/persistenceImager.pyx to a new file named ./sg2dgm/persistenceImager.py, this might also work.

Run experiments for PDGNN

A small note: PDGNN has nothing to do with knowledge distillation, actually.

First generate the training data for node-centered vicinity graphs:

python ./Knowledge_Distillation/data_utils_NC.py

You can also generate edge-centered vicinity graphs / total graphs using

python ./Knowledge_Distillation/data_utils_LP.py 
python ./Knowledge_Distillation/data_utils_GC.py

Then train PDGNN, notice that the saved data dir need to be revised in lines15-26 in ./Knowledge_Distillation/train_Teacher_Model.py.

Notice that in the code, PDGNN is actually in ./Knowledge_Distillation/gat_conv.py rather than ./Knowledge_Distillation/PD_conv.py

python ./Knowledge_Distillation/train_Teacher_Model.py

You can also train PDGNN on TUdatasets, ZINC, and OGBG-HIV

python ./Knowledge_Distillation/train_Teacher_Model_GC.py

Afther training PDGNN, your can run downstream node classification/link prediction tasks with

python pipelines_GIN.py
python pipelines_LP_GIN.py

Poster

TLC-GNN

poster

PDGNN

poster_PD

tlc-gnn's People

Contributors

pkuyzy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.