A PyTorch implementation of "Graph Wavelet Neural Network" (ICLR 2019)
GPL-3.0 License
A PyTorch implementation of Graph Wavelet Neural Network (ICLR 2019).
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]
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
{ 0: [0, 1, 38, 1968, 2000, 52727],
1: [10000, 20, 3],
2: [],
...
n: [2018, 10000]}
NODE ID | Target |
---|---|
0 | 3 |
1 | 1 |
2 | 0 |
3 | 1 |
... | ... |
n | 3 |
Training the model is handled by the src/main.py
script which provides the following command line arguments.
--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`.
--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.
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