All Projects → hyren → PathCon

hyren / PathCon

Licence: MIT License
Combining relational context and relational paths for knowledge graph completion

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to PathCon

NBFNet
Official implementation of Neural Bellman-Ford Networks (NeurIPS 2021)
Stars: ✭ 106 (+265.52%)
Mutual labels:  knowledge-graph, graph-neural-networks
NMN
Source code and datasets for ACL 2020 paper: Neighborhood Matching Network for Entity Alignment.
Stars: ✭ 55 (+89.66%)
Mutual labels:  knowledge-graph, graph-neural-networks
PathCon
Combining relational context and relational paths for knowledge graph completion
Stars: ✭ 94 (+224.14%)
Mutual labels:  knowledge-graph, graph-neural-networks
KGPool
[ACL 2021] KGPool: Dynamic Knowledge Graph Context Selection for Relation Extraction
Stars: ✭ 33 (+13.79%)
Mutual labels:  knowledge-graph, graph-neural-networks
knowledge-graph-nlp-in-action
从模型训练到部署,实战知识图谱(Knowledge Graph)&自然语言处理(NLP)。涉及 Tensorflow, Bert+Bi-LSTM+CRF,Neo4j等 涵盖 Named Entity Recognition,Text Classify,Information Extraction,Relation Extraction 等任务。
Stars: ✭ 58 (+100%)
Mutual labels:  knowledge-graph
bangle-io
A web only WYSIWYG note taking app that saves notes locally in markdown format.
Stars: ✭ 626 (+2058.62%)
Mutual labels:  knowledge-graph
SBR
⌛ Introducing Self-Attention to Target Attentive Graph Neural Networks (AISP '22)
Stars: ✭ 22 (-24.14%)
Mutual labels:  graph-neural-networks
awesome-ontology
A curated list of ontology things
Stars: ✭ 73 (+151.72%)
Mutual labels:  knowledge-graph
Interstellar
Interstellar: Searching Recurrent Architecture for Knowledge Graph Embedding. NeurIPS 2020.
Stars: ✭ 28 (-3.45%)
Mutual labels:  knowledge-graph
KNET
Neural Entity Typing with Knowledge Attention
Stars: ✭ 65 (+124.14%)
Mutual labels:  knowledge-graph
covid-19-community
Community effort to build a Neo4j Knowledge Graph (KG) that links heterogeneous data about COVID-19
Stars: ✭ 95 (+227.59%)
Mutual labels:  knowledge-graph
AGCN
No description or website provided.
Stars: ✭ 17 (-41.38%)
Mutual labels:  graph-neural-networks
DiGCN
Implement of DiGCN, NeurIPS-2020
Stars: ✭ 25 (-13.79%)
Mutual labels:  graph-neural-networks
Knowledge Graph based Intent Network
Learning Intents behind Interactions with Knowledge Graph for Recommendation, WWW2021
Stars: ✭ 116 (+300%)
Mutual labels:  knowledge-graph
MTAG
Code for NAACL 2021 paper: MTAG: Modal-Temporal Attention Graph for Unaligned Human Multimodal Language Sequences
Stars: ✭ 23 (-20.69%)
Mutual labels:  graph-neural-networks
KGMiner
Knowledge Graph Miner
Stars: ✭ 37 (+27.59%)
Mutual labels:  knowledge-graph
DIN-Group-Activity-Recognition-Benchmark
A new codebase for Group Activity Recognition. It contains codes for ICCV 2021 paper: Spatio-Temporal Dynamic Inference Network for Group Activity Recognition and some other methods.
Stars: ✭ 26 (-10.34%)
Mutual labels:  graph-neural-networks
HyperKA
Knowledge Association with Hyperbolic Knowledge Graph Embeddings, EMNLP 2020
Stars: ✭ 27 (-6.9%)
Mutual labels:  knowledge-graph
ke-dialogue
KE-Dialogue: Injecting knowledge graph into a fully end-to-end dialogue system.
Stars: ✭ 39 (+34.48%)
Mutual labels:  knowledge-graph
mtad-gat-pytorch
PyTorch implementation of MTAD-GAT (Multivariate Time-Series Anomaly Detection via Graph Attention Networks) by Zhao et. al (2020, https://arxiv.org/abs/2009.02040).
Stars: ✭ 85 (+193.1%)
Mutual labels:  graph-neural-networks

PathCon

This repository is the PyTorch implementation of PathCon (arXiv):

Entity Context and Relational Paths forKnowledge Graph Completion
Hongwei Wang, Hongyu Ren, Jure Leskovec
arXiv Preprint, 2020

Please find the Tensorflow version here.

PathCon considers relational context and relational paths of (head, tail) pair in knowledge graphs for link prediction. PathCon achieves substantial gains over state-of-the-art baselines. Below is the result of Hit@1 on the test set of FB15K, FB15K-237, WN18, WN18RR, NELL995, and DDB14 datasets for relation prediction task:

Method FB15K FB15K-237 WN18 WN18RR NELL995 DDB14
TransE 94.0 94.6 95.5 66.9 78.1 94.8
RotatE 96.7 95.1 97.9 73.5 69.1 93.4
QuatE 97.2 95.8 97.5 76.7 70.6 92.2
DRUM 94.5 90.5 95.6 77.8 64.0 93.0
PathCon 97.4 (+/-0.2) 96.4 (+/-0.1) 98.8 (+/-0.1) 95.4 (+/-0.2) 84.4 (+/-0.4) 96.6 (+/-0.1)

For more results, please refer to the original paper.

Files in the folder

  • data/
    • FB15k/
    • FB15k-237/
    • wn18/
    • wn18rr/
    • NELL995/
    • DDB14/
  • src/: implementation of PathCon.

Note: We provide a cache/ folder for each dataset, which caches the pre-computed relational paths for this dataset. This folder is not required for running the code because relational paths will be counted (and cached) if no corresponding cache file is found. If you are going to run FB15K-237 with max_path_len=3, please first download and unzip paths_3.zip from here and put all unzipped files under FB15k-237/cache/ (the original files cannot be uploaded to GitHub due to the limitation on file size). Again, this is not required but highly recommended because counting length-3 paths for FB15K-237 will be time-consuming.

Running the code

$ python main.py --cuda

Note: The default dataset is set as WN18RR. Hyper-parameter settings for other datasets are provided in main.py.

Required packages

The code has been tested running under Python 3.6.5, with the following packages installed (along with their dependencies):

  • torch == 1.4.0
  • numpy == 1.16.5
  • scipy == 1.3.1
  • sklearn == 0.21.3
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].