Coder Social home page Coder Social logo

daiquocnguyen / quatre Goto Github PK

View Code? Open in Web Editor NEW
36.0 3.0 3.0 12.96 MB

QuatRE: Relation-Aware Quaternions for Knowledge Graph Embeddings (TheWebConf WWW 2022) (Pytorch)

License: Apache License 2.0

Python 54.64% C++ 17.90% C 27.36% Shell 0.10%
knowledge-graph-embeddings knowledge-graph-completion knowledge-base-completion link-prediction quaternion-algebra hamilton-product

quatre's Introduction

Relation-Aware Quaternions for Knowledge Graph EmbeddingsTwitter

GitHub top languageGitHub issues GitHub repo size GitHub last commit GitHub forks GitHub stars GitHub

This program provides the implementation of our QuatRE - a simple yet effective KG embedding model - as described in our paper, where QuatRE further utilizes two relation-aware rotations to strengthen the correlations between the head and tail entities within the Quaternion space.

Usage

Requirements

  • Python 3.x
  • Pytorch 1.5.0

Running commands:

python train_QuatRE.py --nbatches 100 --dataset WN18RR --hidden_size 256 --neg_num 5 --valid_step 400  --num_epochs 8000 --learning_rate 0.1 --lmbda 0.5 --model_name WN18RR_nb100_hs256_neg5_lr0.1_ld0.5 --mode train

python train_QuatRE.py --nbatches 100 --dataset FB15K237 --hidden_size 384 --neg_num 10 --valid_step 200  --num_epochs 2000 --learning_rate 0.1 --lmbda 0.5 --model_name FB15K237_nb100_hs384_neg10_lr0.1_ld0.5 --mode train

python train_QuatRE.py --nbatches 100 --dataset WN18 --hidden_size 256 --neg_num 10 --valid_step 400  --num_epochs 8000 --learning_rate 0.1 --lmbda 0.1 --model_name WN18_nb100_hs256_neg10_lr0.1_ld0.1 --mode train

python train_QuatRE.py --nbatches 100 --dataset FB15K --hidden_size 384 --neg_num 5 --valid_step 200  --num_epochs 2000 --learning_rate 0.02 --lmbda 0.05 --model_name FB15K_nb100_hs384_neg5_lr0.02_ld0.05 --mode train

Cite

Please cite the paper whenever QuatRE is used to produce published results or incorporated into other software:

@inproceedings{NguyenQuatRE,
	author={Dai Quoc Nguyen and Thanh Vu and Tu Dinh Nguyen and Dinh Phung},
	title={QuatRE: Relation-Aware Quaternions for Knowledge Graph Embeddings},
	booktitle={Companion Proceedings of the Web Conference 2022 (WWW '22 Companion)},
	year={2022}
}

License

As a free open-source implementation, QuatRE is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. All other warranties including, but not limited to, merchantability and fitness for purpose, whether express, implied, or arising by operation of law, course of dealing, or trade usage are hereby disclaimed. I believe that the programs compute what I claim they compute, but I do not guarantee this. The programs may be poorly and inconsistently documented and may contain undocumented components, features or modifications. I make no guarantee that these programs will be suitable for any application.

QuatRE is licensed under the Apache License 2.0.

The code is based on the OpenKE framework.

quatre's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.