Skip to content

yellowshippo/isogcn-iclr2021

Repository files navigation

IsoGCN

The official implementation of IsoGCN, presented in the ICLR2021 paper Isometric Transformation Invariant and Equivariant Graph Convolutional Networks [arXiv].

isogcn

Please cite us as:

@inproceedings{
horie2021isometric,
title={Isometric Transformation Invariant and Equivariant Graph Convolutional Networks},
author={Masanobu Horie and Naoki Morita and Toshiaki Hishinuma and Yu Ihara and Naoto Mitsume},
booktitle={International Conference on Learning Representations},
year={2021},
url={https://openreview.net/forum?id=FX0vR39SJ5q}
}

General notice

If some of the following steps not working, please modify User settings section in the Makefile to fit with your environment.

Installation

You can either locally install locally or use Docker image. However, to generate an anisotropic nonlinear heat equation dataset, we recommend using Docker.

Local install

We are using poetry, thus first install it following the instruction on https://python-poetry.org/docs/ . Then, update the Makefile to PYTHON ?= 'poetry run python3' or explicitly specify the PYTHON environment variable on the execution of the make command.

For GPU environment,

PYTHON='poetry run python3' make poetry
poetry install
PYTHON='poetry run python3' make install_pyg_gpu

For CPU environment,

PYTHON='poetry run python3' make poetry
poetry install
PYTHON='poetry run python3' make install_pyg_cpu

, and set GPU_ID = -1 in the Makefile.

Also, optionally, please install FrontISTR and gmsh to generate an anisotropic nonlinear heat equation dataset (which are installed in the Docker image).

Docker image

Please download the docker image via https://savanna.ritc.jp/~horiem/isogcn_iclr2021/images/isogcn.tar, then place the image in the images directory. After that, plsease make in to login the docker befor perfroming all the following processes.

Differential operator dataset

Data generation

make differential_data

Training IsoGCN

make scalar2grad  # Scalar to gradient task
make scalar2grad  ADJ=5  # Scalar to gradient task with # hops = 5
make scalar2hessian  # Scalar to Hessian task
make grad2laplacian  # Gradient to Laplacian task
make grad2hessian  # Gradient to Hessian task

Training baseline models

make scalar2grad_baseline BASELINE_NAME=gcn  # BASELINE_NAME=[cluster_gcn, gcn, gcnii, gin, sgcn]

Similarly, one can perform baseline model trainings for other tasks.

Anisotropic nonlinear heat equation dataset

Run whole process with small data to check the process (Optional)

It generates a small dataset to simulate the whole process of data generation, preprocessing, training, and inference. This process requires either FrontISTR installed locally or Docker image.

make small_heat_nl_tensor_pipeline

Dataset download

The dataset containing finite element analysis results is generated from the ABC dataset using gmsh for meshing and FrontISTR for analysis.

Please download the dataset you need. (Note: To perform only training, you need only 'preprocessed' data.) The dataset can be downloaded via:

After download finished, please merge the split archives with:

cat train_50.tar.gz.parta* > train.tar.gz

, extract them with tar xvf *.tar.gz, then place them in the corresponding data/heat_nl_tensor/(raw|interim|preprocessed) directory.

Training IsoGCN

make heat_nl_tensor

Training baseline models

make heat_nl_tensor_baseline BASELINE_NAME=gcn  # BASELINE_NAME=[cluster_gcn, gcn, gcnii, gin, sgcn]

IsoGCN core implementation

The core implementation of the IsoGCN layer is separated in the library SiML and can be found here. Also, the code to generate IsoAMs is separated in the library Femio and can be found here.

License

Apache License 2.0.