Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Translational Embedding for Link Prediction | Graph Embeddings
Graph Theory for Machine Learning with Python

bookTranslational Embedding for Link Prediction

メニューを表示するにはスワイプしてください

Translational embeddings offer a powerful conceptual framework for link prediction in graphs. The core idea is that relationships between nodes can be represented as simple vector translations in the embedding space. In this approach, you model a relationship between two nodes as a vector operation: if you have an embedding for a source node (node1), and an embedding for a target node (node2), the embedding of the relation between them is such that node1 + relation ≈ node2. This means that the vector sum of the source node's embedding and the relation embedding should be close to the target node's embedding if the relationship (or edge) exists. This principle is inspired by methods like TransE, which are popular in knowledge graph embedding.

In practice, you can use this translational principle to score candidate links. To do this, you compute the difference between the sum of the source node and relation embeddings, and the target node embedding. The norm (or length) of this difference vector gives you a score: the smaller the norm, the more likely the link exists between the two nodes under the given relation. This method transforms the problem of link prediction into a geometric one, where you search for node pairs whose embeddings satisfy the translational property.

123456789101112131415
import numpy as np # Example embeddings for two nodes and a relation node1_emb = np.array([0.3, 0.1, 0.7]) relation_emb = np.array([0.2, -0.2, 0.4]) node2_emb = np.array([0.6, -0.05, 1.0]) # Translational score: norm of (node1 + relation - node2) def translational_score(node1, relation, node2): diff = node1 + relation - node2 score = np.linalg.norm(diff) return score score = translational_score(node1_emb, relation_emb, node2_emb) print("Translational score:", score)
copy

1. What does a low translational score indicate about a candidate edge?

2. How can translational embeddings help in predicting missing links?

question mark

What does a low translational score indicate about a candidate edge?

正しい答えを選んでください

question mark

How can translational embeddings help in predicting missing links?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  4

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 2.  4
some-alt