• No results found

About Link prediction on Knowledge graph using TuckER

N/A
N/A
Protected

Academic year: 2022

Share "About Link prediction on Knowledge graph using TuckER"

Copied!
23
0
0

Loading.... (view fulltext now)

Full text

(1)

About Link prediction on Knowledge graph using TuckER

by Haoyu and Joss

March 2020

(2)

Content

Based on TuckER: Tensor Factorization for Knowledge Graph Completion (Balazevi´c et al,. 2019)

What is a knowledge graph?

Link prediction Previous Models TuckER

Summary of the different models Advantages of TuckER

Comparison of different algorithms Implementation and Experiments Conclusion

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 2 / 23

(3)

What is a knowledge graph? (KG)

Oriented labeled graph-structured database which stores relations Vertices: entities (objects, persons, situations, events, etc.) Edges: relations

Based on real-world facts

Figure:An example of knowledge graph

(4)

What is a knowledge graph?

Figure:How the corresponding dataset looks like

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 4 / 23

(5)

What is a knowledge graph?

Why do we care about link prediction?

Figure:Another example of knowledge graph

(6)

Example of known knowledge graph data sets

FB15K (Freebase) : 362 million of facts, 4% are not symmetric but suffer from test set leakage1

FB15k-237 : Created from FB15k by removing the inverse of many relations that are present in the training set.

WN18 (WordNet)2 : 60% are not symmetric, suffer from test set leakage

WN18RR : Subset of WN18 created by removing the inverse of many relations that are present in the training set.

1inverse relations from the training set were present in the test set

2This data set is often categorized as a semantic graph

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 6 / 23

(7)

What is a knowledge graph?

Why do we care about link prediction?

We focus on the Open world assumption (OWA).

The objective is to complete the graph (find out the unknown). Many problems can happen in OWA:

Link prediction

Entity resolution : which entities refer to the same entity?

Link-based clustering: grouping entities based on similarity of their links.

(8)

Link prediction

Also known as knowledge graph completion

Given a knowledge graph G , we let:

E denotes set of entities R denotes set of relations (s, r , o) ∈ E × R × E is a tuple.

ζ denotes the set of tuples that are true in a world r ∈ R is called symmetric if (a, r , b) ∈ ζ ⇔ (b, r , a) ∈ ζ

An embedding is a function fs : E → V , or fr : R → V or fo : E → V where V is a vector space.

a tensor factorization model is (E , R, fs, fr, fo, φ) where φ : E × R × E → R is the scoring function

Notation: v [i ] is the ith entry of v .

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 8 / 23

(9)

Models

Linear models CP RESCAL DistMult ComplEx SimplE Non-linear models

ConvE HypER

(10)

RESCAL (Nickel et al,. 2011)

φ(s, r , o) = es>Wreo

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 10 / 23

(11)

DistMult (Yang et al., 2015)

Special case of RESCAL with diagonal matrix

Scale to large knowledge graph, at cost of learning less expressive features

(12)

SimplE (Kazemi and Poole, 2018)

φ((ei, r , ej)) = 12(hhei, vr, teji + hhej, vr−1, teii)

Fully expressive for embedding dimension min(|E ||R|, γ + 1) :

for |E ||R| bounds: (ei, rj, ek) ∈ ζ then set hei[n] = 1 ⇔ n mod |E | ==

i else 0&vrj[n] = 1 ⇔ if |E|n = j else 0 and tek[j |E | + i ] = 1 for γ + 1 bounds: induction on γ, γ = 0 clear, inductive step...

Background knowledge encode : (ei, r , ej) ∈ ζ ⇔ (ej, r , ei) ∈ ζ by tying vr−1, vr as (ei, r , ej) ∈ ζ ⇒ hhei, vr, teji > 0&hhej, vr−1, teii >

0 ⇒ hhej, vr, teii > 0&hhei, vr−1, teji > 0

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 12 / 23

(13)

TuckER

Linear model based on the Tucker decomposition One Entity embedding matrix E ∈ Rne×de

One Relation Embedding matrix R ∈ Rnr×dr One Core tensor W ∈ Rde×dr×de.

Scoring function φ(s, r , o) = W ×1es ×2wr ×3eo = es>(W ×2wr)eo 1-N scoring: Takes one (s, r ) pair and scores it against all entities.

Bernoulli negative log-likelihood loss function:

L = −1 n

ne

X

i =1

(y(i )log (p(i )) + (1 − y(i ))log (1 − p(i )))

(14)

Summary of the different models

Figure:Models Summary

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 14 / 23

(15)

Summary of the different models

Figure:Models view as TuckER

Figure:Models view as SimpLE

(16)

Advantages of TuckER

TuckER is fully expressive One entity embedding matrix

It has parameter sharing encoded in W

Encode the interaction between the entities and relations Induce less parameters

Induce asymmetry Induce multi-task learning

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 16 / 23

(17)

TuckER is fully expressive

Theorem : TuckER is fully expressive Proof:

Let es, eo∈ Rne be the one-hot encoding of subject s and object o respectively, wr ∈ Rnr the one-hot encoding of relation r .

Let the core tensor W ∈ Rne×nr×ne be 1 at position (s, r , o) if (s, r , o) holds, −1 otherwise.

Then the tensor product will accurately represent the ground truth from the rest:

If (s, r , o) holds, φ(s, r , o) = W ×1es ×2wr×3eo= 1 If not, φ(s, r , o) = −1

(18)

Influence of Parameter Sharing

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 18 / 23

(19)

Comparison of Different algorithms

Comparison idea: use the rank of our ground truth

Common evaluation metrics Mean Reciprocal Rank (MRR)

Hits@k, with k a small integer (ex: Hits@1 is equivalent to the accuracy, Hits@ne always gives 100%)

(20)

Implementation and Experiments

Figure:Best performing hyper-parameter values for Tucker

Figure: Best performing hyper-parameter values for ComplEx and SimplE on FB15k-237

Figure:MRR vs embedding size

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 20 / 23

(21)

Comparison of the algorithms

Figure: Comparison of the models

(22)

Conclusion

TuckER outperforms state-of-the-art models Number of parameter grows linearly

previous models are special case of TuckER How to incorporate background knowledge?

Linear model rocks !

by Haoyu and Joss About Link prediction on Knowledge graph using TuckER March 2020 22 / 23

(23)

References

Ivan Balazevic, Carl Allen, and Timothy M. Hospedales. TuckER:

Tensor Factorization for Knowledge Graph Completion. CoRR, abs/1901.09590, 2019. URL hp://arxiv.org/abs/1901.09590 Seyed Mehran Kazemi. David Poole SimplE Embedding for Link Prediction in Knowledge Graphs In Advances in Neural Information Processing Systems.

Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel 2011 A Three-Way Model for Collective Learning on Multi-Relational Data In International Conference on Machine Learning.

Theo Trouillon, Johannes Welbl, Sebastian Riedel, Eric Gaussier, and Guillaume Bouchard. 2016 Complex Embeddings for Simple Link Prediction In International Conference on Machine Learning.

References

Related documents

In accordance with Article 50(4) of the SIS II Regulation and Article 66(4) of the SIS II Decision, the Management Authority (eu-LISA) hereby submits to the

The chart below show the number of entries for each of the gated lots and number of manual gate openings which required intervention by parking staff at the intercom system or in

The areas critical for fluoroscopy competency include clinical training and expertise, technical knowledge of mechanical and electrical safety, of radiation safety, radiation

[r]

Clinical predictors Functional capacity Surgical risk Noninvasive testing Invasive testing Poor ( < 4 METs) Moderate or excellent ( > 4 METs) Minor or no clinical predictors‡

God prescribes the curses for the violation of the covenant: “If you fail to observe faithfully all the words of this Torah that are written in this book… the Lord will inflict

As at least three of these cases can easily lead to accidental homophone mix-ups in Icelandic, a confusion set classifi- cation method is vital for the creation of a context

This us- age of the parametric PIRR table could support the move from a centralized and static NM approach, such as the one currently used in commercial systems, to a distributed and