Prediction of Treewidth using Graph Neural Network, developed as part of PFN summer internship 2019.
This code predicts the treewidth by using graph neural network.
If you want more information about this code, please read my article “Graph Neural Network を用いたグラフの木幅予測” (sorry, written in Japanese) on Preferred Networks Research Blog.
This code also implements a general framework of GNN described in [1].
In detail, this code implements max, average and sum aggregations and readouts described the paper and is compatible with GPU.
We also provide the trained model and random graph datasets.
This software is developed as part of PFN summer internship 2019 and the main developer is Yuta Nakano.
This code follows the prediction flow described below.
Details are written in above-mentioned article.
This code has been tested over Chainer 6.3.0 and python 3.7.4.
If you haven’t installed chainer, please install chainer following the instructions on the official website.
If you want to run on GPU, please install CuPy following the instructions on the official website.
Here is other dependencies.
You can install these dependencies by requirements.txt. Please run the below script.
pip install -r requirements.txt
Note: We provide pretrained model, so you can use this model and skip this step.
First, unzip the dataset file by running the below script.
./unpack.sh
Run the below script.
python GNN.py --task_type Task1
Default parameters are not the best performing hyper-parameters.
So you may want to tune hyper-parameters.
To check hyper-parameters to be specified, please type below.
python GNN.py --help
Run the below script.
python GNN.py --task_type Regression
Run the below script.
python main.py --task_type approach1
Run the below script.
python main.py --task_type approach2
MIT License. We provide no warranty or support for this implementation. Use it at your own risk.
Please see the LICENSE file for details.