GithubHelp home page GithubHelp logo

yzfxmu / spectral-inspired-gnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nhuang37/spectral-inspired-gnn

0.0 0.0 0.0 301 KB

Code for Paper "From Local to Global: Spectral-Inspired Graph Neural Networks"

Python 54.13% Jupyter Notebook 45.87%

spectral-inspired-gnn's Introduction

Spectral-Inspired Graph Neural Networks

This repo contains implementations of spectral-inspired GNNs, a simple layer-wise normalization technique to inject global information in message-passing GNNs, motivated from spectral graph embedding.

Dependencies

You can follow the code below to install pytorch-geometric

import os
import torch
os.environ['TORCH'] = torch.__version__
pip install -q torch-scatter -f https://data.pyg.org/whl/torch-${TORCH}.html
pip install -q torch-sparse -f https://data.pyg.org/whl/torch-${TORCH}.html
pip install -q torch-cluster -f https://data.pyg.org/whl/torch-${TORCH}.html
pip install -q git+https://github.com/pyg-team/pytorch_geometric.git

Follow the code below to install dgl

pip install dgl-cu111 -f https://data.dgl.ai/wheels/repo.html

PowerEmbed

Run PowerEmbed on the 10 benchmark graphs with the default implementation:

python power.py --datasets wiki --loop --data_path YOUR_DATA_PATH --result_path YOUR_RESULT_PATH

datasets include options with: wiki / planetoid / webkb / amazon / coauthor

Baseline

Run GCNII and GPR-GNN on the 10 benchmark graphs with the default implementation:

python /baseline/gcn_variants_real_graph.py --datasets wiki --loop --model GCNII --data_path YOUR_DATA_PATH --result_path YOUR_RESULT_PATH

datasets include options with: wiki / planetoid / webkb / amazon / coauthor

models include options with: GCNII / GPRGNN

Simulations and visualizations

  • Convergence of PowerEmbed
    • Fig 2: power_convergence.ipynb
  • SBM simulations
    • Fig 3, 5: /ablation study/sbm_boxplot.py
    • Fig 6: /ablation study/sbm_varying_density.py

spectral-inspired-gnn's People

Contributors

chengyuehuang511 avatar nhuang37 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.