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
DenseCLIP: Language-Guided Dense Prediction with Context-Aware Prompting

DenseCLIP: Language-Guided Dense Prediction with Context-Aware Prompting Created by Yongming Rao*, Wenliang Zhao*, Guangyi Chen, Yansong Tang, Zheng Z

Yongming Rao 322 Dec 31, 2022
Riemann Noise Injection With PyTorch

Riemann Noise Injection - PyTorch A module for modeling GAN noise injection based on Riemann geometry, as described in Ruili Feng, Deli Zhao, and Zhen

2 May 27, 2022
Official Code for "Non-deep Networks"

Non-deep Networks arXiv:2110.07641 Ankit Goyal, Alexey Bochkovskiy, Jia Deng, Vladlen Koltun Overview: Depth is the hallmark of DNNs. But more depth m

Ankit Goyal 567 Dec 12, 2022
Airborne magnetic data of the Osborne Mine and Lightning Creek sill complex, Australia

Osborne Mine, Australia - Airborne total-field magnetic anomaly This is a section of a survey acquired in 1990 by the Queensland Government, Australia

Fatiando a Terra Datasets 1 Jan 21, 2022
Barbershop: GAN-based Image Compositing using Segmentation Masks (SIGGRAPH Asia 2021)

Barbershop: GAN-based Image Compositing using Segmentation Masks Barbershop: GAN-based Image Compositing using Segmentation Masks Peihao Zhu, Rameen A

Peihao Zhu 928 Dec 30, 2022
Controlling a game using mediapipe hand tracking

These scripts use the Google mediapipe hand tracking solution in combination with a webcam in order to send game instructions to a racing game. It features 2 methods of control

3 May 17, 2022
[CVPR 2022] PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision (Oral)

PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision Kehong Gong*, Bingbing Li*, Jianfeng Zhang*, Ta

256 Dec 28, 2022
Publication describing 3 ML examples at NSLS-II and interfacing into Bluesky

Machine learning enabling high-throughput and remote operations at large-scale user facilities. Overview This repository contains the source code and

BNL 4 Sep 24, 2022
ZEBRA: Zero Evidence Biometric Recognition Assessment

ZEBRA: Zero Evidence Biometric Recognition Assessment license: LGPLv3 - please reference our paper version: 2020-06-11 author: Andreas Nautsch (EURECO

Voice Privacy Challenge 2 Dec 12, 2021
TLDR; Train custom adaptive filter optimizers without hand tuning or extra labels.

AutoDSP TLDR; Train custom adaptive filter optimizers without hand tuning or extra labels. About Adaptive filtering algorithms are commonplace in sign

Jonah Casebeer 48 Sep 19, 2022
CLIP + VQGAN / PixelDraw

clipit Yet Another VQGAN-CLIP Codebase This started as a fork of @nerdyrodent's VQGAN-CLIP code which was based on the notebooks of @RiversWithWings a

dribnet 276 Dec 12, 2022
discovering subdomains, hidden paths, extracting unique links

python-website-crawler discovering subdomains, hidden paths, extracting unique links pip install -r requirements.txt discover subdomain: You can give

merve 4 Sep 05, 2022
Artifacts for paper "MMO: Meta Multi-Objectivization for Software Configuration Tuning"

MMO: Meta Multi-Objectivization for Software Configuration Tuning This repository contains the data and code for the following paper that is currently

0 Nov 17, 2021
PPO is a very popular Reinforcement Learning algorithm at present.

PPO is a very popular Reinforcement Learning algorithm at present. OpenAI takes PPO as the current baseline algorithm. We use the PPO algorithm to train a policy to give the best action in any situat

Rosefintech 11 Aug 23, 2021
A Re-implementation of the paper "A Deep Learning Framework for Character Motion Synthesis and Editing"

What is This This is a simple re-implementation of the paper "A Deep Learning Framework for Character Motion Synthesis and Editing"(1). Only Sections

102 Dec 14, 2022
A large-scale video dataset for the training and evaluation of 3D human pose estimation models

ASPset-510 (Australian Sports Pose Dataset) is a large-scale video dataset for the training and evaluation of 3D human pose estimation models. It contains 17 different amateur subjects performing 30

Aiden Nibali 25 Jun 20, 2021
[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
Scheme for training and applying a label propagation framework

Factorisation-based Image Labelling Overview This is a scheme for training and applying the factorisation-based image labelling (FIL) framework. Some

Wellcome Centre for Human Neuroimaging 2 Dec 17, 2021
OSLO: Open Source framework for Large-scale transformer Optimization

O S L O Open Source framework for Large-scale transformer Optimization What's New: December 21, 2021 Released OSLO 1.0. What is OSLO about? OSLO is a

TUNiB 280 Nov 24, 2022
This is a repository with the code for the ACL 2019 paper

The Story of Heads This is the official repo for the following papers: (ACL 2019) Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy

231 Nov 15, 2022