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
Awesome Monocular 3D detection

Awesome Monocular 3D detection Paper list of 3D detetction, keep updating! Contents Paper List 2022 2021 2020 2019 2018 2017 2016 KITTI Results Paper

Zhikang Zou 184 Jan 04, 2023
SMIS - Semantically Multi-modal Image Synthesis(CVPR 2020)

Semantically Multi-modal Image Synthesis Project page / Paper / Demo Semantically Multi-modal Image Synthesis(CVPR2020). Zhen Zhu, Zhiliang Xu, Anshen

316 Dec 01, 2022
Generative Autoregressive, Normalized Flows, VAEs, Score-based models (GANVAS)

GANVAS-models This is an implementation of various generative models. It contains implementations of the following: Autoregressive Models: PixelCNN, G

MRSAIL (Mini Robotics, Software & AI Lab) 6 Nov 26, 2022
A Simulated Optimal Intrusion Response Game

Optimal Intrusion Response An OpenAI Gym interface to a MDP/Markov Game model for optimal intrusion response of a realistic infrastructure simulated u

Kim Hammar 10 Dec 09, 2022
Simulation of self-focusing of laser beams in condensed media

What is it? Program for scientific research, which allows to simulate the phenomenon of self-focusing of different laser beams (including Gaussian, ri

Evgeny Vasilyev 13 Dec 24, 2022
SASM - simple crossplatform IDE for NASM, MASM, GAS and FASM assembly languages

SASM (SimpleASM) - простая кроссплатформенная среда разработки для языков ассемблера NASM, MASM, GAS, FASM с подсветкой синтаксиса и отладчиком. В SA

Dmitriy Manushin 5.6k Jan 06, 2023
Real-Time Multi-Contact Model Predictive Control via ADMM

Here, you can find the code for the paper 'Real-Time Multi-Contact Model Predictive Control via ADMM'. Code is currently being cleared up and optimize

17 Dec 28, 2022
This project demonstrates the use of neural networks and computer vision to create a classifier that interprets the Brazilian Sign Language.

LIBRAS-Image-Classifier This project demonstrates the use of neural networks and computer vision to create a classifier that interprets the Brazilian

Aryclenio Xavier Barros 26 Oct 14, 2022
Election Exit Poll Prediction and U.S.A Presidential Speech Analysis using Machine Learning

Machine_Learning Election Exit Poll Prediction and U.S.A Presidential Speech Analysis using Machine Learning This project is based on 2 case-studies:

Avnika Mehta 1 Jan 27, 2022
Generate Cartoon Images using Generative Adversarial Network

AvatarGAN ✨ Generate Cartoon Images using DC-GAN Deep Convolutional GAN is a generative adversarial network architecture. It uses a couple of guidelin

Aakash Jhawar 50 Dec 29, 2022
PyTorch implementation of EigenGAN

PyTorch Implementation of EigenGAN Train python train.py [image_folder_path] --name [experiment name] Test python test.py [ckpt path] --traverse FFH

62 Nov 12, 2022
Model Serving Made Easy

The easiest way to build Machine Learning APIs BentoML makes moving trained ML models to production easy: Package models trained with any ML framework

BentoML 4.4k Jan 08, 2023
Repository For Programmers Seeking a platform to show their skills

Programming-Nerds Repository For Programmers Seeking Pull Requests In hacktoberfest ❓ What's Hacktoberfest 2021? Hacktoberfest is the easiest way to g

42 Oct 29, 2022
codes for "Scheduled Sampling Based on Decoding Steps for Neural Machine Translation" (long paper of EMNLP-2022)

Scheduled Sampling Based on Decoding Steps for Neural Machine Translation (EMNLP-2021 main conference) Contents Overview Background Quick to Use Furth

Adaxry 13 Jul 25, 2022
Benchmarks for the Optimal Power Flow Problem

Power Grid Lib - Optimal Power Flow This benchmark library is curated and maintained by the IEEE PES Task Force on Benchmarks for Validation of Emergi

A Library of IEEE PES Power Grid Benchmarks 207 Dec 08, 2022
NCVX (NonConVeX): A User-Friendly and Scalable Package for Nonconvex Optimization in Machine Learning.

NCVX NCVX: A User-Friendly and Scalable Package for Nonconvex Optimization in Machine Learning. Please check https://ncvx.org for detailed instruction

SUN Group @ UMN 28 Aug 03, 2022
Top #1 Submission code for the first https://alphamev.ai MEV competition with best AUC (0.9893) and MSE (0.0982).

alphamev-winning-submission Top #1 Submission code for the first alphamev MEV competition with best AUC (0.9893) and MSE (0.0982). The code won't run

70 Oct 29, 2022
Code and datasets for the paper "Combining Events and Frames using Recurrent Asynchronous Multimodal Networks for Monocular Depth Prediction" (RA-L, 2021)

Combining Events and Frames using Recurrent Asynchronous Multimodal Networks for Monocular Depth Prediction This is the code for the paper Combining E

Robotics and Perception Group 69 Dec 26, 2022
HODEmu, is both an executable and a python library that is based on Ragagnin 2021 in prep.

HODEmu HODEmu, is both an executable and a python library that is based on Ragagnin 2021 in prep. and emulates satellite abundance as a function of co

Antonio Ragagnin 1 Oct 13, 2021
This code reproduces the results of the paper, "Measuring Data Leakage in Machine-Learning Models with Fisher Information"

Fisher Information Loss This repository contains code that can be used to reproduce the experimental results presented in the paper: Awni Hannun, Chua

Facebook Research 43 Dec 30, 2022