This is the source code for: Context-aware Entity Typing in Knowledge Graphs.

Related tags

Deep Learning CET
Overview

Context-aware Entity Typing in Knowledge Graphs

This is the source code for: Context-aware Entity Typing in Knowledge Graphs.

Requirements

  • Python 3
  • PyTorch >= 1.6.0
  • dgl >= 0.5.3

Usage

Data preprocessing:

cd data
python preprocess.py --dataset FB15kET
python preprocess.py --dataset YAGO43kET

Train:

########### FB15kET ###########
# CET
python run.py --model CET --dataset FB15kET --load_ET --load_KG --neighbor_sampling \
--hidden_dim 100 --temperature 0.5 --lr 0.001 --loss FNA --beta 4.0 --cuda

# R-GCN
python run.py --model RGCN --dataset FB15kET --load_ET --load_KG --neighbor_sampling \
--hidden_dim 100 --lr 0.001 --loss FNA --beta 3.0 --cuda

# CompGCN
python run.py --model CompGCN --dataset FB15kET --load_ET --load_KG --neighbor_sampling \
--hidden_dim 100 --lr 0.001 --loss FNA --activation relu --cuda

########### YAGO43kET ###########
# CET
python run.py --model CET --dataset YAGO43kET --load_ET --load_KG --neighbor_sampling \
--hidden_dim 100 --temperature 0.5 --lr 0.001 --loss FNA --beta 2.0 --cuda

# R-GCN
python run.py --model RGCN --dataset YAGO43kET --load_ET --load_KG --neighbor_sampling \
--hidden_dim 100 --lr 0.001 --loss FNA --beta 2.0 --cuda

# CompGCN
python run.py --model CompGCN --dataset YAGO43kET --load_ET --load_KG --neighbor_sampling \
--hidden_dim 100 --lr 0.001 --loss FNA --activation relu --cuda

The KGE baselines can be found in KGE_baselines.

Acknowledgement

We refer to the code of DGL. Thanks for their contributions.

You might also like...
Language models are open knowledge graphs ( non official implementation )
Language models are open knowledge graphs ( non official implementation )

language-models-are-knowledge-graphs-pytorch Language models are open knowledge graphs ( work in progress ) A non official reimplementation of Languag

Compositional and Parameter-Efficient Representations for Large Knowledge Graphs

NodePiece - Compositional and Parameter-Efficient Representations for Large Knowledge Graphs NodePiece is a "tokenizer" for reducing entity vocabulary

ZSL-KG is a general-purpose zero-shot learning framework with a novel transformer graph convolutional network (TrGCN) to learn class representation from common sense knowledge graphs.
ZSL-KG is a general-purpose zero-shot learning framework with a novel transformer graph convolutional network (TrGCN) to learn class representation from common sense knowledge graphs.

ZSL-KG is a general-purpose zero-shot learning framework with a novel transformer graph convolutional network (TrGCN) to learn class representa

Implementation for the EMNLP 2021 paper "Interactive Machine Comprehension with Dynamic Knowledge Graphs".

Interactive Machine Comprehension with Dynamic Knowledge Graphs Implementation for the EMNLP 2021 paper. Dependencies apt-get -y update apt-get instal

ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphs

ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphs This is the code of paper ConE: Cone Embeddings for Multi-Hop Reasoning over Knowl

Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CVPR 2021)
Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CVPR 2021)

Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CAC) Xin Lai*, Zhuotao Tian*, Li Jiang, Shu Liu, Hengshuang Zhao, Li

Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CVPR 2021)
Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CVPR 2021)

Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CAC) Xin Lai*, Zhuotao Tian*, Li Jiang, Shu Liu, Hengshuang Zhao, Li

IAUnet: Global Context-Aware Feature Learning for Person Re-Identification

IAUnet This repository contains the code for the paper: IAUnet: Global Context-Aware Feature Learning for Person Re-Identification Ruibing Hou, Bingpe

Official PyTorch implementation of UACANet: Uncertainty Aware Context Attention for Polyp Segmentation
Official PyTorch implementation of UACANet: Uncertainty Aware Context Attention for Polyp Segmentation

UACANet: Uncertainty Aware Context Attention for Polyp Segmentation Official pytorch implementation of UACANet: Uncertainty Aware Context Attention fo

Comments
  • Train KGE baselines with FNA loss

    Train KGE baselines with FNA loss

    Hi,

    Thank you for the wonderful and inspiring work. I am wondering if have you tried to train KGE baselines using FNA loss and compare the performance with your proposed model. If yes, could you kindly provide the script for such an experiment? Many thanks.

    opened by yunchengwang 0
Owner
null
Collective Multi-type Entity Alignment Between Knowledge Graphs (WWW'20)

CG-MuAlign A reference implementation for "Collective Multi-type Entity Alignment Between Knowledge Graphs", published in WWW 2020. If you find our pa

Bran Zhu 28 Dec 11, 2022
Source codes for "Structure-Aware Abstractive Conversation Summarization via Discourse and Action Graphs"

Structure-Aware-BART This repo contains codes for the following paper: Jiaao Chen, Diyi Yang:Structure-Aware Abstractive Conversation Summarization vi

GT-SALT 56 Dec 8, 2022
[EMNLP 2021] MuVER: Improving First-Stage Entity Retrieval with Multi-View Entity Representations

MuVER This repo contains the code and pre-trained model for our EMNLP 2021 paper: MuVER: Improving First-Stage Entity Retrieval with Multi-View Entity

null 24 May 30, 2022
[ACL-IJCNLP 2021] Improving Named Entity Recognition by External Context Retrieving and Cooperative Learning

CLNER The code is for our ACL-IJCNLP 2021 paper: Improving Named Entity Recognition by External Context Retrieving and Cooperative Learning CLNER is a

null 71 Dec 8, 2022
Code for the paper "Query Embedding on Hyper-relational Knowledge Graphs"

Query Embedding on Hyper-Relational Knowledge Graphs This repository contains the code used for the experiments in the paper Query Embedding on Hyper-

DimitrisAlivas 19 Jul 26, 2022
git《Commonsense Knowledge Base Completion with Structural and Semantic Context》(AAAI 2020) GitHub: [fig1]

Commonsense Knowledge Base Completion with Structural and Semantic Context Code for the paper Commonsense Knowledge Base Completion with Structural an

AI2 96 Nov 5, 2022
Learning from History: Modeling Temporal Knowledge Graphs with Sequential Copy-Generation Networks

CyGNet This repository reproduces the AAAI'21 paper “Learning from History: Modeling Temporal Knowledge Graphs with Sequential Copy-Generation Network

CunchaoZ 89 Jan 3, 2023
QA-GNN: Question Answering using Language Models and Knowledge Graphs

QA-GNN: Question Answering using Language Models and Knowledge Graphs This repo provides the source code & data of our paper: QA-GNN: Reasoning with L

Michihiro Yasunaga 434 Jan 4, 2023
ATOMIC 2020: On Symbolic and Neural Commonsense Knowledge Graphs

(Comet-) ATOMIC 2020: On Symbolic and Neural Commonsense Knowledge Graphs Paper Jena D. Hwang, Chandra Bhagavatula, Ronan Le Bras, Jeff Da, Keisuke Sa

AI2 152 Dec 27, 2022
Continuous Query Decomposition for Complex Query Answering in Incomplete Knowledge Graphs

Continuous Query Decomposition This repository contains the official implementation for our ICLR 2021 (Oral) paper, Complex Query Answering with Neura

UCL Natural Language Processing 71 Dec 29, 2022