Skip to content

A shallow neural model for relation prediction

Notifications You must be signed in to change notification settings

dice-group/Shallom

Repository files navigation

Shallom

This open-source project contains the Python implementation of our approach Shallom, training and evaluation scripts. We added Shallom into Knowledge Graph Embeddings at Scale open-source project to ease the deployment and the distributed computing. Therein, we provided pre-trained models on many large knowledge graphs.

A shallow neural model for relation prediction

Knowledge graph completion refers to predicting missing triples. Most approaches achieve this goal by predicting entities, given an entity and a relation. We predict missing triples via the relation prediction. To this end, we frame the relation prediction problem as a multi-label classification problem and propose a shallow neural model (SHALLOM) that accurately infers missing relations from entities. SHALLOM is analogous to C-BOW as both approaches predict a central token (p) given surrounding tokens ((s,o)). By virtue of its architecture, SHALLOM requires a maximum training time of 8 minutes on benchmark datasets including WN18RR, FB15K-237 and YAGO3-10. Hence, one does not need to win the hardware lottery to use SHALLOM for predicting missing information on knowledge graphs.

Pre-trained Models

Installation

First clone the repository:

git clone https://github.com/dice-group/Shallom.git.

Then obtain the required libraries:

conda env create -f environment.yml
source activate shallom

The code is compatible with Python 3.6.4.

Reproducing reported results

  • To reproduce the reported results for our approach, please refer to the any desired .ipynb file.
  • Run any desired .ipynb file

How to cite

If you use SHALLOM, please cite the following publication:

@inproceedings{demir2021shallow,
  title={A shallow neural model for relation prediction},
  author={Demir, Caglar and Moussallem, Diego and Ngomo, Axel-Cyrille Ngonga},
  booktitle={2021 IEEE 15th International Conference on Semantic Computing (ICSC)},
  pages={179--182},
  year={2021},
  organization={IEEE}
}

For any further questions, please contact: caglar.demir@upb.de or caglardemir8@gmail.com

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

About

A shallow neural model for relation prediction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published