Rot-Pro: Modeling Transitivity by Projection in Knowledge Graph Embedding

Related tags

Deep LearningRot-Pro
Overview

Rot-Pro : Modeling Transitivity by Projection in Knowledge Graph Embedding

This repository contains the source code for the Rot-Pro model, presented at NeurIPS 2021 in the paper.

Requirements

  • Python 3.6+
  • Pytorch 1.1.x

Datasets

The repository includes the FB15-237, WN18RR, YAGO3-10, Counties S1/S2/S3 knowledge graph completion datasets, as well as transitivity subsets of YAGO3-10 mentioned in paper.

Hyper-parameters Usage of Rot-Pro

  • --constrains: set True if expect to constrain the range of parameter a, b to 0 or 1.
  • --init_pr: The percentage of relational rotation phase of (-π, π) when initialization. For example, set to 0.5 to constrain the initial relational rotation phase in (-π/2, π/2)
  • --train_pr: The percentage of relational rotation phase of (-π, π) when training. -- --trans_test: When do link prediction test on transitive set S1/ S2/ S3 on YAGO3-10, set it to the relative file path as "./trans_test/s1.txt"

Training Rot-Pro

This is a command for training a Rot-Pro model on YAGO3-10 dataset with GPU 0.
CUDA_VISIBLE_DEVICES=0 python -u codes/run.py --do_train
--cuda
--do_valid
--do_test
--data_path data/YAGO3-10
--model RotPro
--gamma_m 0.000001 --beta 1.5
-n 400 -b 1024 -d 500 -c True
-g 16.0 -a 1.0 -adv -alpha 0.0005
-lr 0.00005 --max_steps 500000
--warm_up_steps 200000
-save models/RotPro_YAGO3_0 --test_batch_size 4 -de

More details are illustrated in argparse configuration at codes/run.py

Testing Rot-Pro

An example for common link prediction on YAGO3-10. CUDA_VISIBLE_DEVICES=0 python -u codes/run.py
--cuda
--do_test
--data_path data/YAGO3-10
--model RotPro
--init_checkpoint models/RotPro_YAGO3_0 --test_batch_size 4 -de

An example for link prediction test on transitive set S1 on YAGO3-10. CUDA_VISIBLE_DEVICES=0 python -u codes/run.py
--cuda
--do_test
--data_path data/YAGO3-10
--model transRotatE
--trans_test trans_test/s1.txt
--init_checkpoint models/RotPro_YAGO3_0 --test_batch_size 4 -de

Citing this paper

If you make use of this code, or its accompanying paper, please cite this work as follows:

@inproceedings{song2021rotpro,
  title={Rot-Pro: Modeling Transitivity by Projection in Knowledge Graph Embedding},
  author = {Tengwei Song and Jie Luo and Lei Huang},
  booktitle={Proceedings of the Thirty-Fifth Annual Conference on Advances in Neural Information Processing Systems ({NeurIPS})},
  year={2021}
}

Owner
Tewi
Tewi
FLSim a flexible, standalone library written in PyTorch that simulates FL settings with a minimal, easy-to-use API

Federated Learning Simulator (FLSim) is a flexible, standalone core library that simulates FL settings with a minimal, easy-to-use API. FLSim is domain-agnostic and accommodates many use cases such a

Meta Research 162 Jan 02, 2023
Music library streaming app written in Flask & VueJS

djtaytay This is a little toy app made to explore Vue, brush up on my Python, and make a remote music collection accessable through a web interface. I

Ryan Tasson 6 May 27, 2022
Google Brain - Ventilator Pressure Prediction

Google Brain - Ventilator Pressure Prediction https://www.kaggle.com/c/ventilator-pressure-prediction The ventilator data used in this competition was

Samuele Cucchi 1 Feb 11, 2022
An optimization and data collection toolbox for convenient and fast prototyping of computationally expensive models.

An optimization and data collection toolbox for convenient and fast prototyping of computationally expensive models. Hyperactive: is very easy to lear

Simon Blanke 422 Jan 04, 2023
CVPR 2021 - Official code repository for the paper: On Self-Contact and Human Pose.

selfcontact This repo is part of our project: On Self-Contact and Human Pose. [Project Page] [Paper] [MPI Project Page] It includes the main function

Lea Müller 68 Dec 06, 2022
Distributing reference energies for SMIRNOFF implementations

Warning: This code is currently experimental and under active development. Is it not yet suitable for distribution or use as reference implementation.

Open Force Field Initiative 1 Dec 07, 2021
A library for uncertainty quantification based on PyTorch

Torchuq [logo here] TorchUQ is an extensive library for uncertainty quantification (UQ) based on pytorch. TorchUQ currently supports 10 representation

TorchUQ 96 Dec 12, 2022
This repository contains the files for running the Patchify GUI.

Repository Name Train-Test-Validation-Dataset-Generation App Name Patchify Description This app is designed for crop images and creating smal

Salar Ghaffarian 9 Feb 15, 2022
A project to build an AI voice assistant using Python . The Voice assistant interacts with the humans to perform basic tasks.

AI_Personal_Voice_Assistant_Using_Python A project to build an AI voice assistant using Python . The Voice assistant interacts with the humans to perf

Chumui Tripura 1 Oct 30, 2021
Learning infinite-resolution image processing with GAN and RL from unpaired image datasets, using a differentiable photo editing model.

Exposure: A White-Box Photo Post-Processing Framework ACM Transactions on Graphics (presented at SIGGRAPH 2018) Yuanming Hu1,2, Hao He1,2, Chenxi Xu1,

Yuanming Hu 719 Dec 29, 2022
MatryODShka: Real-time 6DoF Video View Synthesis using Multi-Sphere Images

Main repo for ECCV 2020 paper MatryODShka: Real-time 6DoF Video View Synthesis using Multi-Sphere Images. visual.cs.brown.edu/matryodshka

Brown University Visual Computing Group 75 Dec 13, 2022
Learning hierarchical attention for weakly-supervised chest X-ray abnormality localization and diagnosis

Hierarchical Attention Mining (HAM) for weakly-supervised abnormality localization This is the official PyTorch implementation for the HAM method. Pap

Xi Ouyang 22 Jan 02, 2023
A web application that provides real time temperature and humidity readings of a house.

About A web application which provides real time temperature and humidity readings of a house. If you're interested in the data collected so far click

Ben Thompson 3 Jan 28, 2022
Predicting Student Attentiveness using OpenCV

Predicting-Student-Attentiveness-using-OpenCV The model will predict if a student is attentive or not through facial parameter received through the st

Johann Pinto 2 Aug 20, 2022
The official homepage of the COCO-Stuff dataset.

The COCO-Stuff dataset Holger Caesar, Jasper Uijlings, Vittorio Ferrari Welcome to official homepage of the COCO-Stuff [1] dataset. COCO-Stuff augment

Holger Caesar 715 Dec 31, 2022
Pytorch implementation of "MOSNet: Deep Learning based Objective Assessment for Voice Conversion"

MOSNet pytorch implementation of "MOSNet: Deep Learning based Objective Assessment for Voice Conversion" https://arxiv.org/abs/1904.08352 Dependency L

9 Nov 18, 2022
Implementation of popular bandit algorithms in batch environments.

batch-bandits Implementation of popular bandit algorithms in batch environments. Source code to our paper "The Impact of Batch Learning in Stochastic

Danil Provodin 2 Sep 11, 2022
TLoL (Python Module) - League of Legends Deep Learning AI (Research and Development)

TLoL-py - League of Legends Deep Learning Library TLoL-py is the Python component of the TLoL League of Legends deep learning library. It provides a s

7 Nov 29, 2022
MARS: Learning Modality-Agnostic Representation for Scalable Cross-media Retrieva

Introduction This is the source code of our TCSVT 2021 paper "MARS: Learning Modality-Agnostic Representation for Scalable Cross-media Retrieval". Ple

7 Aug 24, 2022
[ICLR 2021] "Neural Architecture Search on ImageNet in Four GPU Hours: A Theoretically Inspired Perspective" by Wuyang Chen, Xinyu Gong, Zhangyang Wang

Neural Architecture Search on ImageNet in Four GPU Hours: A Theoretically Inspired Perspective [PDF] Wuyang Chen, Xinyu Gong, Zhangyang Wang In ICLR 2

VITA 156 Nov 28, 2022