Back to Nlp Progress

Relation Prediction

english/relation_prediction.md

0.38.9 KB
Original Source

Relation Prediction

Task

Relation Prediction is the task of recognizing a named relation between two named semantic entities. The common test setup is to hide one entity from the relation triplet, asking the system to recover it based on the other entity and the relation type.

For example, given the triple <Roman Jakobson, born-in-city, ?>, the system is required to replace the question mark with Moscow.

Relation Prediction datasets are typically extracted from two types of resources:

  • Knowledge Bases: KBs such as FreeBase contain hundreds or thousands of relation types pertaining to world-knowledge obtained automatically or semi-automatically from various resources on millions of entities. These relations include born-in, nationality, is-in (for geographical entities), part-of (for organizations, among others), and more.
  • Semantic Graphs: SGs such as WordNet are often manually-curated resources of semantic concepts, restricted to more "linguistic" relations compared to free real-world knowledge. The most common semantic relation is hypernym, also known as the is-a relation (example: <cat, hypernym, feline>).

Evaluation

Evaluation in Relation Prediction hinges on a list of ranked candidates given by the system to the test instance. The metrics below are derived from the location of correct candidate(s) in that list.

A common action performed before evaluation on a given list is filtering, where the list is cleaned of entities whose corresponding triples exist in the knowledge graph. Unless specified otherwise, results here are from filtered lists.

Metrics

Mean Reciprocal Rank (MRR):

The mean of all reciprocal ranks for the true candidates over the test set (1/rank).

Hits at k (H@k):

The rate of correct entities appearing in the top k entries for each instance list. This number may exceed 1.00 if the average k-truncated list contains more than one true entity.

Datasets

Freebase-15K-237 (FB15K-237)

The FB15K dataset was introduced in Bordes et al., 2013. It is a subset of Freebase which contains about 14,951 entities with 1,345 different relations. This dataset was found to suffer from major test leakage through inverse relations and a large number of test triples can be obtained simply by inverting triples in the training set initially by Toutanova et al.. To create a dataset without this property, Toutanova et al. introduced FB15k-237 – a subset of FB15k where inverse relations are removed.

WordNet-18-RR (WN18RR)

The WN18 dataset was also introduced in Bordes et al., 2013. It included the full 18 relations scraped from WordNet for roughly 41,000 synsets. Similar to FB15K, This dataset was found to suffer from test leakage by Dettmers et al. (2018) introduced the WN18RR.

As a way to overcome this problem, Dettmers et al. (2018) introduced the WN18RR dataset, derived from WN18, which features 11 relations only, no pair of which is reciprocal (but still include four internally-symmetric relations like verb_group, allowing the rule-based system to reach 35 on all three metrics).

Experimental Results

WN18RR

The test set is composed of triplets, each used to create two test instances, one for each entity to be predicted. Since each instance is associated with a single true entity, the maximum value for all metrics is 1.00.

ModelH@10H@1MRRPaper / SourceCode
Max-Margin Markov Graph Models (Pinter & Eisenstein, 2018)59.0245.3749.83Predicting Semantic Relations using Global Graph PropertiesOfficial
Concepts of Nearest Neighbors (Ferré, 2020)51.944.446.9Application of Concepts of Neighbors to Knowledge Graph CompletionOfficial
KBAT(Deepak et al., 2019)58.136.144Learning Attention Based Embeddings for Relation PredictionOfficial
TransE (reimplementation by Pinter & Eisenstein, 2018)55.5542.2646.59Translating Embeddings for Modeling Multi-relational Data. OpenKE
ConvKB (Nguyen et al., 2018)52.50-24.80A Novel Embedding Model for Knowledge Base Completion Based on Convolutional Neural NetworkOfficial
ConvE (v6; Dettmers et al., 2018)52.0040.0043.00Convolutional 2D Knowledge Graph EmbeddingsOfficial
ComplEx (Trouillon et al., 2016)51.0041.0044.00Complex Embeddings for Simple Link PredictionOfficial
DistMult (reimplementation by Dettmers et al., 2018)49.0040.0043.00Embedding Entities and Relations for Learning and Inference in Knowledge Bases.Link

FB15K-237

ModelH@10H@1MRRPaper / SourceCode
KBAT (Deepak et al., 2019)62.64651.8Learning Attention Based Embeddings for Relation PredictionOfficial
Concepts of Nearest Neighbors (Ferré, 2020)44.622.229.6Application of Concepts of Neighbors to Knowledge Graph CompletionOfficial
TransE (reimplementation by Han et al., 2018)47.0919.8729.04Translating Embeddings for Modeling Multi-relational Data. OpenKE
TransH (reimplementation by Han et al., 2018)41.325.7917.66Knowledge Graph Embedding by Translating on Hyperplanes.OpenKE
TransR (reimplementation by Han et al., 2018)40.6716.3524.44 Learning Entity and Relation Embeddings for Knowledge Graph Completion.OpenKE
TransD (reimplementation by Han et al., 2018)46.0514.8325.27Knowledge Graph Embedding via Dynamic Mapping Matrix.OpenKE
ConvKB (Nguyen et al., 2018)51.70-39.60A Novel Embedding Model for Knowledge Base Completion Based on Convolutional Neural NetworkOfficial
ConvE (v6; Dettmers et al., 2018)50.1023.7032.50Convolutional 2D Knowledge Graph EmbeddingsOfficial
ComplEx (reimplementation by Dettmers et al., 2018)42.8015.8024.70Complex Embeddings for Simple Link PredictionOfficial
DistMult (reimplementation by Dettmers et al., 2018)41.9015.5024.10Embedding Entities and Relations for Learning and Inference in Knowledge Bases.Link

Resources

OpenKE is an open toolkit for relational learning which provides a standard training and testing framework. Currently, the implemented models in OpenKE include TransE, TransH, TransR, TransD, RESCAL, DistMult, ComplEx and HolE.

KRLPapers is a must-read paper list for relational learning.

datasets-knowledge-embedding is a collection of common datasets used in knowledge embedding.

Back to README