This repository is converted from thunlp/TensorFlow-TransX, which is a light and simple version of OpenKE based on TensorFlow, including TransE, TransH, TransR and TransD. TransX methods are used for knowledge representation learning (KRL), which encode information of relational knowledge into vectors and expand its usage into many different fields.
This repository is just a practice codes after reading several KRL related papers to help understand the process better. For more details and information on this field, please refer: Natural Language Processing Lab at Tsinghua University -- GitHub page.
Dataset can be download from [here].
In this repository, the codes structure is different from the original one, some modifications and adjustments are made to let the codes more understandable and easily to use.
TransH Training Example:
Input Files Path : ./data/FB15K/
Input Files Path : ./data/FB15K/
Building Graph...Done...
Training started...
step 1, loss: 2128.2130
step 2, loss: 1002.4949
step 3, loss: 648.3365
...
step 399, loss: 18.6965
step 400, loss: 19.4174
step 401, loss: 19.2409
...
Done...
Useful Information and Reference:
- Natural Language Processing Lab at Tsinghua University -- GitHub page.
- TransE -- Translating embeddings for modeling multi-relational data.
- TransH -- Knowledge Graph Embedding by Translating on Hyperplanes.
- TransR -- Learning Entity and Relation Embeddings for Knowledge Graph Completion.
- TransD -- Knowledge Graph Embedding via Dynamic Mapping Matrix.
- thunlp/TensorFlow-TransX: light and simple version of OpenKE based on TensorFlow, including TransE, TransH, TransR and TransD.
- thunlp/Fast-TransX: efficient lightweight C++ inferences for TransE and its extended models utilizing the framework of OpenKE, including TransH, TransR, TransD, TranSparse and PTransE.
- thunlp/OpenKE: an open-source package for knowledge embedding.
- thunlp/TensorFlow-NRE: neural relation extraction implemented with LSTM in tensorflow.
- thunlp/TransNet, source code and datasets of IJCAI2017 paper "TransNet: Translation-Based Network Representation Learning for Social Relation Extraction".
- thunlp/KB2E: knowledge graph embeddings including TransE, TransH, TransR and PTransE.