All Projects → benedekrozemberczki → Graphwaveletneuralnetwork

benedekrozemberczki / Graphwaveletneuralnetwork

Licence: gpl-3.0
A PyTorch implementation of "Graph Wavelet Neural Network" (ICLR 2019)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Graphwaveletneuralnetwork

Role2vec
A scalable Gensim implementation of "Learning Role-based Graph Embeddings" (IJCAI 2018).
Stars: ✭ 134 (-66.83%)
Mutual labels:  research, representation-learning, sklearn
Sigver wiwd
Learned representation for Offline Handwritten Signature Verification. Models and code to extract features from signature images.
Stars: ✭ 112 (-72.28%)
Mutual labels:  convolutional-neural-networks, representation-learning
Graph 2d cnn
Code and data for the paper 'Classifying Graphs as Images with Convolutional Neural Networks' (new title: 'Graph Classification with 2D Convolutional Neural Networks')
Stars: ✭ 67 (-83.42%)
Mutual labels:  convolutional-neural-networks, representation-learning
Capsgnn
A PyTorch implementation of "Capsule Graph Neural Network" (ICLR 2019).
Stars: ✭ 1,008 (+149.5%)
Mutual labels:  research, sklearn
Attribute Aware Attention
[ACM MM 2018] Attribute-Aware Attention Model for Fine-grained Representation Learning
Stars: ✭ 143 (-64.6%)
Mutual labels:  convolutional-neural-networks, representation-learning
ethereum-privacy
Profiling and Deanonymizing Ethereum Users
Stars: ✭ 37 (-90.84%)
Mutual labels:  research, representation-learning
Dcm2niix
dcm2nii DICOM to NIfTI converter: compiled versions available from NITRC
Stars: ✭ 364 (-9.9%)
Mutual labels:  research
Raasnet
Open-Source Ransomware As A Service for Linux, MacOS and Windows
Stars: ✭ 371 (-8.17%)
Mutual labels:  research
Carnd Vehicle Detection
Vehicle detection using YOLO in Keras runs at 21FPS
Stars: ✭ 367 (-9.16%)
Mutual labels:  convolutional-neural-networks
Deep Koalarization
Keras/Tensorflow implementation of our paper Grayscale Image Colorization using deep CNN and Inception-ResNet-v2 (https://arxiv.org/abs/1712.03400)
Stars: ✭ 364 (-9.9%)
Mutual labels:  convolutional-neural-networks
Dialogue
Stars: ✭ 398 (-1.49%)
Mutual labels:  research
Warezz
It's illegal cuz they can't tax you!
Stars: ✭ 386 (-4.46%)
Mutual labels:  research
First Steps Towards Deep Learning
This is an open sourced book on deep learning.
Stars: ✭ 376 (-6.93%)
Mutual labels:  convolutional-neural-networks
Starwars.ios
This component implements transition animation to crumble view-controller into tiny pieces.
Stars: ✭ 3,685 (+812.13%)
Mutual labels:  research
Text Classification Models Pytorch
Implementation of State-of-the-art Text Classification Models in Pytorch
Stars: ✭ 379 (-6.19%)
Mutual labels:  convolutional-neural-networks
Opentendo
An Open-Source HardWare (OSHW) recreation of the original 1985 front-loading NES Motherboard
Stars: ✭ 362 (-10.4%)
Mutual labels:  research
Convnetdraw
Draw multi-layer neural network in your browser
Stars: ✭ 391 (-3.22%)
Mutual labels:  convolutional-neural-networks
Easy Deep Learning With Keras
Keras tutorial for beginners (using TF backend)
Stars: ✭ 367 (-9.16%)
Mutual labels:  convolutional-neural-networks
Rmdl
RMDL: Random Multimodel Deep Learning for Classification
Stars: ✭ 375 (-7.18%)
Mutual labels:  convolutional-neural-networks
Deeplogo
A brand logo detection system using tensorflow object detection API.
Stars: ✭ 388 (-3.96%)
Mutual labels:  convolutional-neural-networks

Graph Wavelet Neural Network

Arxiv codebeat badge repo sizebenedekrozemberczki

A PyTorch implementation of Graph Wavelet Neural Network (ICLR 2019).

Abstract

We present graph wavelet neural network (GWNN), a novel graph convolutional neural network (CNN), leveraging graph wavelet transform to address the shortcomings of previous spectral graph CNN methods that depend on graph Fourier transform. Different from graph Fourier transform, graph wavelet transform can be obtained via a fast algorithm without requiring matrix eigendecomposition with high computational cost. Moreover, graph wavelets are sparse and localized in vertex domain, offering high efficiency and good interpretability for graph convolution. The proposed GWNN significantly outperforms previous spectral graph CNNs in the task of graph-based semi-supervised classification on three benchmark datasets: Cora, Citeseer and Pubmed.

A reference Tensorflow implementation is accessible [here].

This repository provides an implementation of Graph Wavelet Neural Network as described in the paper:

Graph Wavelet Neural Network. Bingbing Xu, Huawei Shen, Qi Cao, Yunqi Qiu, Xueqi Cheng. ICLR, 2019. [Paper]

Requirements

The codebase is implemented in Python 3.5.2. package versions used for development are just below.

networkx          2.4
tqdm              4.28.1
numpy             1.15.4
pandas            0.23.4
texttable         1.5.0
scipy             1.1.0
argparse          1.1.0
torch             1.1.0
torch-scatter     1.4.0
torch-sparse      0.4.3
torch-cluster     1.4.5
torch-geometric   1.3.2
torchvision       0.3.0
scikit-learn      0.20.0
PyGSP             0.5.1

Datasets

The code takes the **edge list** of the graph in a csv file. Every row indicates an edge between two nodes separated by a comma. The first row is a header. Nodes should be indexed starting with 0. A sample graph for `Cora` is included in the `input/` directory. In addition to the edgelist there is a JSON file with the sparse features and a csv with the target variable.

The **feature matrix** is a sparse binary one it is stored as a json. Nodes are keys of the json and feature indices are the values. For each node feature column ids are stored as elements of a list. The feature matrix is structured as:

{ 0: [0, 1, 38, 1968, 2000, 52727],
  1: [10000, 20, 3],
  2: [],
  ...
  n: [2018, 10000]}

The **target vector** is a csv with two columns and headers, the first contains the node identifiers the second the targets. This csv is sorted by node identifiers and the target column contains the class meberships indexed from zero.

NODE ID Target
0 3
1 1
2 0
3 1
... ...
n 3

Options

Training the model is handled by the src/main.py script which provides the following command line arguments.

Input and output options

  --edge-path        STR   Input graph path.   Default is `input/cora_edges.csv`.
  --features-path    STR   Features path.      Default is `input/cora_features.json`.
  --target-path      STR   Target path.        Default is `input/cora_target.csv`.
  --log-path         STR   Log path.           Default is `logs/cora_logs.json`.

Model options

  --epochs                INT       Number of Adam epochs.         Default is 200.
  --learning-rate         FLOAT     Number of training epochs.     Default is 0.01.
  --weight-decay          FLOAT     Weight decay.                  Default is 5*10**-4.
  --filters               INT       Number of filters.             Default is 16.
  --dropout               FLOAT     Dropout probability.           Default is 0.5.
  --test-size             FLOAT     Test set ratio.                Default is 0.2.
  --seed                  INT       Random seeds.                  Default is 42.
  --approximation-order   INT       Chebyshev polynomial order.    Default is 3.
  --tolerance             FLOAT     Wavelet coefficient limit.     Default is 10**-4.
  --scale                 FLOAT     Heat kernel scale.             Default is 1.0.

Examples

The following commands learn the weights of a graph wavelet neural network and saves the logs. The first example trains a graph wavelet neural network on the default dataset with standard hyperparameter settings. Saving the logs at the default path.

python src/main.py

Training a model with more filters in the first layer.

python src/main.py --filters 32

Approximationg the wavelets with polynomials that have an order of 5.

python src/main.py --approximation-order 5

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].