A PyTorch implementation of the Relational Graph Convolutional Network (RGCN).

Overview

Torch-RGCN

Torch-RGCN is a PyTorch implementation of the RGCN, originally proposed by Schlichtkrull et al. in
Modeling Relational Data with Graph Convolutional Networks.

In our paper, we reproduce the link prediction and node classification experiments from the original paper and using our reproduction we explain the RGCN. Furthermore, we present two new configurations of the RGCN.

Getting started

Requirements:

  • Conda >= 4.8
  • Python >= 3.7

Do the following:

  1. Download all datasets: bash get_data.sh

  2. Install the dependencies inside a new virtual environment: bash setup_dependencies.sh

  3. Activate the virtual environment: conda activate torch_rgcn_venv

  4. Install the torch-RGCN module: pip install -e .

Usage

Configuration files

The hyper-parameters for the different experiments can be found in YAML files under configs. The naming convention of the files is as follows: configs/{MODEL}/{EXPERIMENT}-{DATASET}.yaml

Models

  • rgcn - Standard RGCN Model
  • c-rgcn - Compression RGCN Model
  • e-rgcn - Embedding RGCN Model

Experiments

  • lp - Link Prediction
  • nc - Node Classification

Datasets

Link Prediction

  • WN18
  • FB-Toy

Node Classification

  • AIFB
  • MUTAG
  • BGS
  • AM

Part 1: Reproduction

Link Prediction

Link Prediction Model

Original Link Prediction Implementation: https://github.com/MichSchli/RelationPrediction

To run the link prediction experiment using the RGCN model using:

python experiments/predict_links.py with configs/rgcn/lp-{DATASET}.yaml

Make sure to replace {DATASET} with one of the following dataset names: FB-toy or WN18.

Node Classification

Node Classification Model

Original Node Classification Implementation: https://github.com/tkipf/relational-gcn

To run the node classification experiment using the RGCN model using:

python experiments/classify_nodes.py with configs/rgcn/nc-{DATASET}.yaml

Make sure to replace {DATASET} with one of the following dataset names: AIFB, MUTAG, BGS or AM.

Part 2: New RGCN Configurations

Node Classification with Node Embeddings

To run the node classification experiment use:

python experiments/classify_nodes.py with configs/e-rgcn/nc-{DATASET}.yaml

Make sure to replace {DATASET} with one of the following dataset names: AIFB, MUTAG, BGS or AM.

Link Prediction Compressed Node Embeddings

c-RGCN Link Prediction Model

To run the link prediction experiment use:

python experiments/predict_links.py with configs/c-rgcn/lp-{DATASET}.yaml

Make sure to replace {DATASET} with one of the following dataset names: FB-toy, or WN18.


Dataset References

Node Classification

Link Prediction

Owner
Thiviyan Singam
PhD candidate at University of Amsterdam
Thiviyan Singam
PyTorch implementation of Glow

glow-pytorch PyTorch implementation of Glow, Generative Flow with Invertible 1x1 Convolutions (https://arxiv.org/abs/1807.03039) Usage: python train.p

Kim Seonghyeon 433 Dec 27, 2022
The codebase for our paper "Generative Occupancy Fields for 3D Surface-Aware Image Synthesis" (NeurIPS 2021)

Generative Occupancy Fields for 3D Surface-Aware Image Synthesis (NeurIPS 2021) Project Page | Paper Xudong Xu, Xingang Pan, Dahua Lin and Bo Dai GOF

xuxudong 97 Nov 10, 2022
This repository provides a PyTorch implementation and model weights for HCSC (Hierarchical Contrastive Selective Coding)

HCSC: Hierarchical Contrastive Selective Coding This repository provides a PyTorch implementation and model weights for HCSC (Hierarchical Contrastive

YUANFAN GUO 111 Dec 20, 2022
Using this you can control your PC/Laptop volume by Hand Gestures (pinch-in, pinch-out) created with Python.

Hand Gesture Volume Controller Using this you can control your PC/Laptop volume by Hand Gestures (pinch-in, pinch-out). Code Firstly I have created a

Tejas Prajapati 16 Sep 11, 2021
End-To-End Optimization of LiDAR Beam Configuration

End-To-End Optimization of LiDAR Beam Configuration arXiv | IEEE Xplore This repository is the official implementation of the paper: End-To-End Optimi

Niclas 30 Nov 28, 2022
Software for Multimodalty 2D+3D Facial Expression Recognition (FER) UI

EmotionUI Software for Multimodalty 2D+3D Facial Expression Recognition (FER) UI. demo screenshot (with RealSense) required packages Python = 3.6 num

Yang Jiao 2 Dec 23, 2021
Unified MultiWOZ evaluation scripts for the context-to-response task.

MultiWOZ Context-to-Response Evaluation Standardized and easy to use Inform, Success, BLEU ~ See the paper ~ Easy-to-use scripts for standardized eval

Tomáš Nekvinda 38 Dec 13, 2022
A very lightweight monitoring system for Raspberry Pi clusters running Kubernetes.

OMNI A very lightweight monitoring system for Raspberry Pi clusters running Kubernetes. Why? When I finished my Kubernetes cluster using a few Raspber

Matias Godoy 148 Dec 29, 2022
Machine learning evaluation metrics, implemented in Python, R, Haskell, and MATLAB / Octave

Note: the current releases of this toolbox are a beta release, to test working with Haskell's, Python's, and R's code repositories. Metrics provides i

Ben Hamner 1.6k Dec 26, 2022
Implementation of self-attention mechanisms for general purpose. Focused on computer vision modules. Ongoing repository.

Self-attention building blocks for computer vision applications in PyTorch Implementation of self attention mechanisms for computer vision in PyTorch

AI Summer 962 Dec 23, 2022
A PyTorch implementation of NeRF (Neural Radiance Fields) that reproduces the results.

NeRF-pytorch NeRF (Neural Radiance Fields) is a method that achieves state-of-the-art results for synthesizing novel views of complex scenes. Here are

Yen-Chen Lin 3.2k Jan 08, 2023
An end-to-end image translation model with weight-map for color constancy

CCUnet An end-to-end image translation model with weight-map for color constancy 1. Download the dataset (take Colorchecker_recommended dataset as an

Jianhui Qiu 1 Dec 21, 2021
Galactic and gravitational dynamics in Python

Gala is a Python package for Galactic and gravitational dynamics. Documentation The documentation for Gala is hosted on Read the docs. Installation an

Adrian Price-Whelan 101 Dec 22, 2022
Code for C2-Matching (CVPR2021). Paper: Robust Reference-based Super-Resolution via C2-Matching.

C2-Matching (CVPR2021) This repository contains the implementation of the following paper: Robust Reference-based Super-Resolution via C2-Matching Yum

Yuming Jiang 151 Dec 26, 2022
[NeurIPS-2021] Mosaicking to Distill: Knowledge Distillation from Out-of-Domain Data

MosaicKD Code for NeurIPS-21 paper "Mosaicking to Distill: Knowledge Distillation from Out-of-Domain Data" 1. Motivation Natural images share common l

ZJU-VIPA 37 Nov 10, 2022
Implementation of Cross Transformer for spatially-aware few-shot transfer, in Pytorch

Cross Transformers - Pytorch (wip) Implementation of Cross Transformer for spatially-aware few-shot transfer, in Pytorch Install $ pip install cross-t

Phil Wang 40 Dec 22, 2022
Bi-level feature alignment for versatile image translation and manipulation (Under submission of TPAMI)

Bi-level feature alignment for versatile image translation and manipulation (Under submission of TPAMI) Preparation Clone the Synchronized-BatchNorm-P

Fangneng Zhan 12 Aug 10, 2022
Repositorio oficial del curso IIC2233 Programación Avanzada 🚀✨

IIC2233 - Programación Avanzada Evaluación Las evaluaciones serán efectuadas por medio de actividades prácticas en clases y tareas. Se calculará la no

IIC2233 @ UC 0 Dec 15, 2022
Official PyTorch implementation of "Uncertainty-Based Offline Reinforcement Learning with Diversified Q-Ensemble" (NeurIPS'21)

Uncertainty-Based Offline Reinforcement Learning with Diversified Q-Ensemble This is the code for reproducing the results of the paper Uncertainty-Bas

43 Nov 23, 2022
Fast SHAP value computation for interpreting tree-based models

FastTreeSHAP FastTreeSHAP package is built based on the paper Fast TreeSHAP: Accelerating SHAP Value Computation for Trees published in NeurIPS 2021 X

LinkedIn 369 Jan 04, 2023