Knowledge Graph Embedding via Dynamic Mapping Matrix
Paper · 2015 · Guoliang Ji, Shizhu He, Liheng Xu et al.
Summary
A knowledge graph can record who belongs to a sports team or which places lie within a region, yet leave many facts of the same kind unrecorded. Knowledge graph completion asks which of those missing facts can be predicted from the available ones. Ji and colleagues study that question by representing entities and relations as vectors. A candidate fact receives a high score when the relation vector moves the representation of the first entity close to that of the second. Earlier approaches had already made this comparison in a space specific to the relation. TransD changes how the entities get there.
The difference matters when a relation joins unlike entities. For a nationality fact, the first entity might be a person and the second a country. TransR transforms both with a matrix learned for nationality. TransD learns a second vector for each entity and relation, alongside the vector that represents its identity and role in the graph. It combines the entity’s and relation’s second vectors to construct a transformation for that pair. The person and country can therefore enter the same relation space through different transformations. The construction also lets the implementation compute their projections with vector operations, without multiplying by a dense matrix.
The authors evaluate TransD by classifying complete candidate facts and by ranking possible entities for a missing position. In classification, TransD reaches 86.4% accuracy on WN11 and 88.0% on FB15k with relation-aware negative sampling. On FB13 it reaches 89.1%, ahead of the reported translation-based alternatives and below the 90.0% of a neural tensor approach augmented with word embeddings. For link prediction, TransD’s filtered Hits@10 on FB15k reaches 77.3%, compared with 70.2% for the corresponding CTransR setting. The breakdown by relation structure shows particularly large gains when predicting the head of a many-to-one relation or the tail of a one-to-many relation. On WN18 the ranking results are closer, and the strongest setting depends on the metric.
TransD’s computational advantage comes from storing projection vectors in place of full relation matrices. On the authors’ computer, a round of FB15k classification training takes 24 seconds with TransD and 70 seconds with TransR. The accuracy results also show where faster scoring and more flexible projections can only go so far. Some relations have sparse training examples, and others are difficult to recover from the surrounding graph. The authors point to facts such as birthplace to motivate extracting information from text alongside graph completion.
Deep dive: Knowledge Graph Embedding via Dynamic Mapping Matrix
TransD learns how each entity should be projected for a given relation, improving missing-link prediction without storing dense mapping matrices. · about 37 minutes to read
The problem and its context
A missing edge is a question about a fact
A graph stores a fact by identifying two entities and naming the relation between them. The paper calls the ordered record a triplet. Its first entity is the head and its last is the tail. The relation specifies how to read the pair. For instance, Freebase can connect Nobuko Otowa to actor through the relation profession. Here the head identifies the person and the tail identifies the profession. Reversing their positions changes the claim. Similarly, connecting the same entities with a different relation would change what the graph says about them.
This representation gives applications a source of structured information. In question answering, a relation can identify what kind of answer a query calls for. In relation extraction, existing triplets can provide information about which pairs are known to stand in a given relation. The paper names Freebase, Yago and WordNet as examples of resources useful for such work. It also notes that collaboratively assembled and partly automated graphs have substantial gaps. The absence of an edge can mean that a fact has yet to be recorded. For a completion procedure, the question is whether the edges that are available give enough evidence to propose it.
The authors describe earlier approaches based on symbols and logic as difficult to apply at the scale of large graphs. The line of work they build on represents entities and relations with low-dimensional vectors and scores candidate triplets through algebraic operations. A vector’s coordinates are learned from graph data. The same vector participates in scoring every triplet that mentions its entity or relation, so information from different observed facts can influence the score of a new combination. How that shared information enters a score depends on the choice of scoring function.
Why translations need room for different kinds of relations
TransE gives the head, relation and tail vectors the same dimensionality. Its picture of a true fact is that the head vector plus the relation vector lands near the tail vector. The same relation supplies the same displacement wherever it occurs. This makes a triplet inexpensive to score, and it makes the intended geometry easy to follow. To predict the tail, for instance, the sum of the head and relation vectors marks the location near which good candidates should be found.
Difficulty arises when several entities can correctly fill one end of the same relation. Suppose a relation has several valid tails for a fixed head. TransE asks all their vectors to lie near the same translated point. Those tails may also play different roles elsewhere in the graph, where the system needs to distinguish them. The reverse situation occurs when several heads connect to the same tail. A many-to-many relation brings both patterns into the same problem. The paper describes TransE as well suited to one-to-one relations and uses these more complex mappings to motivate alternatives.
TransH gives each relation a hyperplane, a flat subspace in which the translation takes place. It projects the head and tail onto that plane before applying the relation’s displacement. Some of the differences between entities can disappear in the projection for a particular relation while remaining available in other projections. An entity can consequently have different representations for different relations. For a fixed relation, however, the same plane and the same projection rule apply to every entity. Entities and relations also start out in spaces of the same dimensionality.
TransR makes a further distinction between the space in which entities are stored and the space in which a relation is applied. It learns a matrix for each relation to carry entity vectors into that relation’s space. The matrix can choose and combine components of an entity representation before the translation is scored. CTransR adds flexibility by clustering the head–tail pairs of a relation and learning a translation vector for each group. The authors describe this as a way to account for different patterns among pairs involving the same relation. The relation’s projection matrix remains shared across those pairs.
Where a shared mapping can be too coarse
The paper illustrates the issue with the fact that Friedrich Burklein’s nationality is Germany. The head is a person and the tail is a country. Their roles in the relation differ, and the information in their underlying vectors may be organized differently. A single relation matrix has to transform both. The authors propose treating projection as an interaction between a particular entity and a particular relation, so each can help determine the transformation.
Mixed entity types are also visible within a single Freebase relation for partial geographical containment. The paper’s illustration groups examples involving several kinds of heads and tails linked by that relation. A single label can cover varied pairs even when the general meaning of the edge stays the same. CTransR can vary a pair’s translation by cluster. TransD instead varies how each endpoint is represented before the translation, with the entity itself contributing to that change. The paper’s motivation is that similar entities can learn similar ways of being projected even when each has its own parameters.
Simply storing an independent dense matrix for every possible entity and relation combination would leave little of the parameter sharing that makes the vector approach attractive. Even TransR’s smaller collection of matrices, one per relation, requires a matrix-vector product at each end of a triplet and adds parameters as the number of relations grows. TransD addresses both concerns by giving the transformation a form that can be calculated from a pair of short vectors. The resulting matrices depend on the pair, and their structure constrains how they can differ.
The paper also places this work alongside scoring approaches that do more than translate. Structured Embedding uses distinct matrices for the head and tail roles. Semantic Matching Energy builds a representation at each end from the entity and the relation and compares the two. The Latent Factor Model uses a relation matrix to couple head and tail coordinates directly. The single-layer and neural tensor approaches introduce nonlinear scores, with the tensor approach allowing more detailed interactions at greater parameter cost. These alternatives clarify the design choice in TransD. The authors keep the translation test and spend the additional capacity on the representations that enter it.
The method, step by step
From a candidate fact to a score
TransD stores a meaning vector and a projection vector for each entity. It does the same for each relation. “Meaning” here refers to the representation used in scoring. A meaning vector for an entity is the starting point for its projection. The meaning vector for the relation is the displacement applied once both entities are in the relation space. The projection vectors determine how the starting points are changed.
For a candidate triplet, TransD first looks up the head, relation and tail vectors. It combines the head’s projection vector with the relation’s projection vector. It repeats that operation for the tail, reusing the relation’s projection vector. Each combination specifies a mapping from the entity space into the relation space. If the same entity appears under another relation, the relation contribution changes. If another entity takes its place under the original relation, the entity contribution changes. The mapping depends on which entity and relation meet at that end of the triplet. It does not need the identity of the entity at the other end.
The resulting projected head and tail can be compared in a common space. The system adds the relation’s meaning vector to the projected head and measures the remaining distance to the projected tail. A small distance corresponds to a high score. While the paper describes the transformations as matrices, their structure makes it possible to calculate the projected vectors directly.
How TransD scores a candidate triplet
The steps in order.
Constructing the two mappings
In the paper’s derivation of TransD, entity vectors have dimension n and relation vectors have dimension m. The notation in its complexity comparison reverses those dimension labels. Here the derivation uses the local convention, so a map from the entity space to the relation space has m rows and n columns. The first mapping is for the head.
Mᵣₕ = rₚ hₚᵀ + Iₘₓₙ
Mᵣₕ is the matrix for head entity h under relation r. The column vector rₚ is the relation’s projection vector, and hₚ is the head’s projection vector. The subscript p marks a projection vector. The superscript ᵀ denotes transpose, turning hₚ into a row. Multiplying a column by a row forms an outer product, in which each entry is the product of one coordinate from each vector. Iₘₓₙ is the rectangular identity matrix, with ones on its available diagonal and zeros elsewhere. The plus sign adds that matrix to the outer product.
The tail follows the same construction with its own parameters.
Mᵣₜ = rₚ tₚᵀ + Iₘₓₙ
Mᵣₜ is the matrix for tail entity t under relation r. The vector rₚ is again the relation’s projection vector, while tₚ is the tail’s projection vector. The transpose ᵀ makes tₚ a row. The product of rₚ and that row is a matrix with m rows and n columns, and Iₘₓₙ supplies the same rectangular identity term.
The outer product lets every coordinate of the relation projection vector interact with every coordinate of the entity projection vector. Yet those entries are tied together. In a dense matrix learned entry by entry, the columns can vary independently. Here each column of the outer product is a scalar multiple of the same relation projection vector. The identity term supplies a shared starting mapping. The outer product then adds a correction whose direction comes from the relation and whose size depends on the entity.
This also specifies which kinds of sharing persist. If an entity participates in several relations, it carries the same entity projection vector into those interactions. Every participant in a given relation uses that relation’s projection vector. If the same entity occurs as head in one triplet and tail in another under the same relation, the formula gives it the same mapping. The distinction between head and tail still matters when scoring, because the relation displacement is added on the head side.
Projecting an entity without a dense multiplication
The formal definitions apply the matrices to the entities’ meaning vectors.
h⊥ = Mᵣₕ h
The symbol h⊥ is the head after projection into the relation space. Mᵣₕ is its entity–relation mapping, and h on the right is the head’s meaning vector in the entity space. Their product is an m-dimensional vector. The subscript-like symbol ⊥ marks a projected representation.
t⊥ = Mᵣₜ t
Here t⊥ is the projected tail, Mᵣₜ is the mapping for the tail under relation r, and t is the tail’s meaning vector. The output lives in the same relation space as the projected head.
The key to computing these expressions cheaply is the order of multiplication. Applying the outer-product part to an entity vector can begin with the inner product between the entity’s projection vector and its meaning vector. That inner product is a single scalar. Scaling the relation’s projection vector by it gives the correction. The identity part contributes the original entity vector, adjusted to fit the output space. There is no need to allocate the entries of Mᵣₕ or Mᵣₜ for the calculation.
For m at least as large as n, the paper writes the identity contribution as the entity vector with zeros appended as needed. The head calculation can then be written as follows.
h⊥ = (hₚᵀ h) rₚ + [hᵀ 0ᵀ]ᵀ
The inner product hₚᵀ h uses the head’s projection vector hₚ and meaning vector h. Its scalar result multiplies rₚ, the relation projection vector. The bracket joins the transposed head vector hᵀ and the transposed zero vector 0ᵀ to form a row, then the outer transpose makes it a column of dimension m. The symbol h⊥ again denotes the projected head.
t⊥ = (tₚᵀ t) rₚ + [tᵀ 0ᵀ]ᵀ
The inner product tₚᵀ t uses the tail’s projection vector tₚ and meaning vector t. It scales rₚ in the tail calculation. The bracketed term puts the tail vector and any required zero entries into the relation space, with ᵀ indicating transposition. The result t⊥ is the projected tail.
With equal dimensions, no padding is needed. The paper gives the simpler expressions when explaining the connection to earlier translation approaches.
h⊥ = h + (hₚᵀ h) rₚ
Here h is the original head vector, hₚ is its projection vector, and rₚ supplies the correction direction. The transpose ᵀ enables the inner product. The original representation and its correction are added to obtain h⊥.
t⊥ = t + (tₚᵀ t) rₚ
Here t is the original tail vector and tₚ its projection vector. The scalar tₚᵀ t sets the size and sign of the correction along rₚ. Adding that correction to t gives t⊥.
These expressions show exactly how much freedom the dynamic mapping introduces for any fixed relation. Two entities can receive different corrections, including corrections in opposite directions, but the corrections for that relation lie along the same vector. The construction gets entity-dependent behavior at the cost of limiting the form of that behavior. Some aspects of an arbitrary dense mapping are outside what the outer product can express.
Measuring the remaining distance
The main score uses the squared Euclidean length of the residual after translating the head.
fᵣ(h, t) = −‖h⊥ + r − t⊥‖₂²
The function fᵣ scores head h and tail t under relation r. Inside the norm, h⊥ is the projected head, r is the meaning vector of the relation and t⊥ is the projected tail. The plus sign applies the relation displacement and the subtraction forms the residual. The notation ‖·‖₂² means the squared Euclidean norm, and the leading minus sign makes a smaller residual yield a higher score. The experiments also consider L₁ dissimilarity, the sum of the absolute coordinate differences. That choice enters the FB15k classification configuration.
The authors put upper bounds on the lengths of the meaning vectors used in the score and on the lengths of the projected representations.
‖h‖₂ ≤ 1, ‖t‖₂ ≤ 1, ‖r‖₂ ≤ 1, ‖h⊥‖₂ ≤ 1, ‖t⊥‖₂ ≤ 1
Here h and t are the entity meaning vectors, r is the relation meaning vector, and h⊥ and t⊥ are the projected entities. Each ‖·‖₂ is a Euclidean norm, and ≤ 1 states its upper bound. In particular, the projected bounds apply after adding the correction. The displayed constraints specify the sizes of the representations entering the translation, while the projection vectors determine how those representations are produced.
How the score relates to earlier approaches
The score of TransE is the same translation comparison applied to the original entity vectors.
fᵣ(h, t) = −‖h + r − t‖₂²
Here h and t are the original head and tail vectors. The vector r is the displacement for their relation and fᵣ is the score under that relation. The norm with subscript ₂ and superscript ² is squared Euclidean distance, and the minus sign orders nearer translated points above farther ones. With equal dimensions and projection vectors set to zero, TransD’s mappings reduce to the identity, and its score takes this form.
TransH obtains its input to the translation by removing the component in the direction of a relation-specific plane normal. The projection rule can be written for either endpoint.
e⊥ = e − (wᵣᵀ e) wᵣ
The vector e is the head or tail before projection, and e⊥ is that entity on the relation’s hyperplane. The vector wᵣ is the unit normal for relation r, perpendicular to its plane. The product wᵣᵀ e is the component along that normal, with ᵀ denoting transpose. Multiplying that scalar by wᵣ gives the vector removed from e.
fᵣ(h, t) = −‖h⊥ + dᵣ − t⊥‖₂²
The function fᵣ scores the entity pair h and t under relation r. The terms h⊥ and t⊥ are their hyperplane projections, dᵣ is the translation vector for the relation on the hyperplane, and the negative squared Euclidean norm gives higher scores to smaller residuals. Both TransH and equal-dimension TransD add a correction to each starting entity vector. TransH determines the operation from the relation’s normal. TransD uses an entity-specific vector in the inner product and a relation-specific vector for the correction direction.
TransR keeps the translation score and learns a shared matrix for the projections.
fᵣ(h, t) = −‖Mᵣ h + r − Mᵣ t‖₂²
The function fᵣ is the score for head h and tail t under relation r. The matrix Mᵣ maps both entity meaning vectors into the relation space, where the relation meaning vector r translates the projected head. The norm ‖·‖₂² measures the squared residual and the minus sign puts smaller distances first. CTransR retains the mapping associated with the relation and makes the translation vector depend on a cluster of head–tail pairs. TransD keeps a single translation for a relation and moves the variation into the endpoint projections.
Other scoring functions used for comparison
The Unstructured baseline compares the entity vectors directly.
fᵣ(h, t) = −‖h − t‖₂²
The arguments h and t are the entity vectors, and fᵣ is written with the triplet’s relation index r even though r contributes no parameters to this formula. The minus sign and squared Euclidean norm make proximity the sole basis of the score. Consequently, two triplets with the same ordered entities receive the same score regardless of their relation.
Structured Embedding learns separate transforms for the two positions.
fᵣ(h, t) = −‖Mᵣₕ h − Mᵣₜ t‖₁
Here fᵣ scores the pair h and t for relation r. For this approach, Mᵣₕ is the matrix learned for the head role of r, and Mᵣₜ is the matrix learned for the tail role. Each is shared across entities appearing in that role. The notation ‖·‖₁ sums absolute coordinate differences, and the negative sign makes low dissimilarity favorable. The two matrices allow the roles to differ even though each role uses a fixed mapping for the relation.
Semantic Matching Energy constructs an intermediate vector for each side. Its linear version adds transformed entity and relation contributions.
gη = Mη₁ eη + Mη₂ r + bη
The index η selects the left or right side, and gη is that side’s intermediate vector. The vector eη is h on the left and t on the right. The matrices Mη₁ and Mη₂ transform the entity vector eη and the relation vector r, respectively. The bias vector bη is an additive offset for that side. The parameters of the scoring network are shared across relations, while the input r varies with the relation.
The bilinear version uses coordinatewise multiplication in place of addition between the two transformed inputs.
gη = (Mη₁ eη) ⊗ (Mη₂ r) + bη
Here η again indicates the side, gη is its intermediate representation, eη is the entity on that side and r is the relation vector. The matrices Mη₁ and Mη₂ produce vectors whose corresponding entries are multiplied by the Hadamard product ⊗. The bias bη is then added. The paper also mentions a variant in which tensors take the place of the matrices in this bilinear construction.
fᵣ(h, t) = g_leftᵀ g_right
The score fᵣ for h and t under r is the inner product of g_left and g_right, the intermediate vectors calculated for the two sides. The transpose ᵀ makes the first vector a row. Unlike a distance with a negative sign, this score directly rewards a large inner product between the intermediate representations.
The Latent Factor Model introduces a relation matrix inside a bilinear score.
fᵣ(h, t) = hᵀ Mᵣ t
Here fᵣ scores head h and tail t under relation r. The relation matrix Mᵣ couples their vector coordinates. The transpose ᵀ makes h a row so that the result of multiplying by Mᵣ and t is a scalar. The matrix can weight interactions between different coordinates of the two entities.
The Single Layer Model uses a nonlinear transformation of the combined head and tail inputs.
fᵣ(h, t) = uᵣᵀ tanh(Mᵣ₁ h + Mᵣ₂ t + bᵣ)
The function fᵣ scores h and t for relation r. The matrices Mᵣ₁ and Mᵣ₂ transform the head and tail separately and bᵣ provides a relation-specific bias. The hyperbolic tangent, tanh, acts on the resulting vector coordinate by coordinate. The relation-specific vector uᵣ, transposed by ᵀ, weights the transformed coordinates to give a scalar.
The Neural Tensor Network combines a term of that form with further interactions between the endpoints.
fᵣ(h, t) = uᵣᵀ tanh(hᵀ Wᵣ t + Mᵣ [h ⊕ t] + bᵣ)
Here fᵣ is again the score for head h and tail t under relation r. The relation tensor Wᵣ consists of matrix slices. The expression hᵀ Wᵣ t uses a bilinear interaction for each slice to produce a vector. The notation [h ⊕ t] denotes the concatenated entity vectors, and Mᵣ applies the linear transformation to that concatenation. The vector bᵣ adds a bias, tanh is applied coordinatewise, and the transposed vector uᵣᵀ turns the outcome into a score. This additional tensor term is the source of the richer interactions and higher parameter cost discussed by the authors.
Learning from facts and corrupted facts
The graph supplies positive training triplets. To obtain comparisons for learning, the authors generate negative examples by corrupting a positive triplet. They replace either its head or its tail with another entity and retain the relation and the other endpoint. Corrupting a known positive keeps much of the original triplet intact. The score must therefore learn something about the relation or the substituted entity to separate the two.
The paper compares two policies for choosing the side to corrupt, called “unif” and “bern.” The uniform policy gives the two sides equal treatment. The Bernoulli policy lets the choice depend on the relation’s mapping pattern. In a one-to-many relation, changing the tail while keeping the head can produce another valid tail. Changing the head is less likely to have that effect when a tail is associated with a single head. The reverse argument applies to many-to-one relations. The idea is to sample on the side where accidental positives are less likely. It addresses the fact that a replacement can describe a real fact even when the graph does not record it.
Training aims to score a recorded fact above its corrupted counterpart by a margin. Written to show the pairing between examples, the paper’s objective is as follows.
L = ∑ξ∈Δ ∑ξ′∈Δ′(ξ) [γ + fᵣ(ξ′) − fᵣ(ξ)]₊
The symbol L denotes the loss to minimize. The first ∑ ranges over the set Δ of positive triplets, with ξ denoting one such triplet. The second ∑ ranges over corresponding corruptions ξ′, represented here by Δ′(ξ). Both use the same relation r, so fᵣ(ξ) and fᵣ(ξ′) are their scores under that relation. The margin γ sets the desired score gap. The notation [·]₊ takes the maximum of its argument and zero. A pair contributes to learning when the positive has yet to clear the margin, including when the corrupted version currently scores higher.
The authors use stochastic gradient descent to update the parameters. They initialize entity and relation meanings from TransE and arrange for the mappings to start at the identity. The paper presents initialization as a way to speed convergence and guard against overfitting. At the start, the translation geometry thus comes from a system trained without dynamic corrections. The subsequent objective can adjust both the meanings and the parameters that produce the corrections. For classification and the WN18 ranking experiment, the paper explicitly names ADADELTA as the optimization procedure.
What the construction costs
The complexity comparison counts storage for learned parameters and multiplication operations over a training epoch. In that comparison, the paper uses m for entity dimensionality and n for relation dimensionality, the reverse of the local derivation above. With the table’s convention, TransD has the following parameter bound.
O(2Nₑm + 2Nᵣn)
O denotes big-O order, Nₑ is the number of entities and Nᵣ the number of relations. The dimensions m and n are those of the entity and relation spaces in the complexity table. The first term counts two vectors of dimension m per entity, and the second counts two vectors of dimension n per relation. The rectangular identity contribution is fixed. The pair-specific matrices need no separately stored coefficients.
For TransR, the paper reports the following bound.
O(Nₑm + Nᵣ(m + 1)n)
O again indicates big-O order. Nₑ and Nᵣ count entities and relations, and m and n give the corresponding dimensions. The entity term reflects one meaning vector per entity. The relation term includes an m-by-n map and one translation vector of dimension n per relation. In CTransR the paper replaces the translation contribution within that term with one that depends on the average number of clusters per relation.
The multiplication counts for an epoch are reported as follows for TransD and then for TransR and CTransR.
O(2nNₜ)
O is big-O order, n uses the relation dimension convention of the complexity table and Nₜ counts triplets. The factor 2 reflects projecting both endpoints. The table emphasizes that the operation count grows with a vector dimension, consistent with the inner-product and vector-scaling computation. Its comparison is most direct when the entity and relation dimensions are equal, as in the reported selected settings.
O(2mnNₜ)
Here m and n are the entity and relation dimensions in the table, Nₜ is the triplet count, and O denotes big-O order. Both endpoint projections contribute to the factor 2. The product mn reflects applying a dense relation matrix to an entity vector. The authors place TransD near TransH in multiplication cost. Their accounting distinguishes that cost from parameter storage, where TransD also keeps an extra vector for every entity.
Experiments and results
The graph subsets and what they test
The experiments use four subsets drawn from WordNet and Freebase. WordNet represents lexical concepts through sets of synonymous expressions and connects them with lexical and conceptual relations. Freebase is a collaboratively assembled source of facts about entities such as people, places and professions. The two sources therefore provide different kinds of triplets. Within each source, the subsets differ in how many relations and entities they include, as well as in the number of triplets held out for validation and testing.
WN11 has 11 relations and 38,696 entities. The paper’s dataset table lists 112,581 training triplets, 2,609 validation triplets and 10,544 test triplets. WN18 has 18 relations and 40,943 entities. Its splits contain 141,442 training triplets, 5,000 validation triplets and 5,000 test triplets. The classification experiment uses WN11 and the ranking experiment uses WN18, so their results describe different splits and different questions about WordNet.
FB13 has 13 relations and 75,043 entities, with 316,232 training triplets, 5908 validation triplets and 23,733 test triplets in the paper’s dataset table. FB15k has 1,345 relations and 14,951 entities. It contains 483,142 training triplets, 50,000 validation triplets and 59,071 test triplets. FB13 enters the classification experiment. FB15k enters both experiments, but classification requires additional negative examples at evaluation time and ranking uses the known positives as queries.
The contrast between the Freebase subsets is relevant to the paper’s motivation. FB15k has a much broader set of relation labels, so a relation-specific transformation must work across a wider collection of predicates. The paper characterizes this benchmark as sparse in discussing link prediction. The dataset sizes alone give the scale of the dictionaries and splits. The performance breakdown by mapping type gives more direct information about the kinds of ranking problems encountered.
Classifying complete triplets
For classification, the candidate already supplies a head, a relation and a tail. The system must label the whole triplet positive or negative. The decision uses a separate threshold for each relation, selected to maximize classification accuracy on the validation set. If the score exceeds that threshold, the triplet is labeled positive. Scores for different relations can occupy different ranges, so this rule lets each relation have its own boundary. Accuracy is the proportion of the labeled candidates that receive the correct decision.
The WN11 and FB13 test sets already contain both positives and negatives. FB15k supplies positive test triplets, so the authors generate negatives using the setting previously used for FB13. They rerun the translation-based baselines with the implementations from the TransR study to evaluate against this FB15k construction. That matters because classification accuracy depends on which negative examples the system is asked to distinguish from known facts. The paper also reports comparisons with Structured Embedding, Semantic Matching Energy and neural baselines where results are available. The “+E” suffix denotes a result augmented with word embeddings.
For the classification runs, the authors search margins of 1, 2, 5 and 10. They consider dimensions of 20, 50, 80 and 100 for the two spaces, and mini-batch sizes of 100, 200, 1000 and 4800. The selected WN11 setting uses a margin of 1, dimensions of 100 for both spaces and a mini-batch size of 1000, with L₂ dissimilarity. FB13 selects a margin of 1 and dimensions of 100 with a mini-batch size of 200, also with L₂. FB15k selects a margin of 2, dimensions of 100 and a mini-batch size of 4800, with L₁ dissimilarity. The authors report training for 1000 rounds on each classification dataset.
FB15k test triplet classification accuracy by scoring approach
TransD with relation-aware sampling has the highest accuracy among the settings shown.
The numbers
| System or setting | accuracy % |
|---|---|
| TransE (bern) | 74.2 |
| TransH (bern) | 79.9 |
| TransR (bern) | 82.1 |
| CTransR (bern) | 84.3 |
| TransD (unif) (this paper) | 86.4 |
| TransD (bern) | 88.0 |
The FB15k comparison shows that the best TransD score is accompanied by an improvement under uniform sampling as well. The uniform TransD run reaches 86.4% test accuracy, while uniform CTransR reaches 81.1%. That matched comparison matters because the strongest settings across methods need not always use the same sampler. It shows that the FB15k classification result survives when the corruption policy is held fixed at the uniform choice.
On WN11, TransD with Bernoulli sampling has 86.4% test accuracy. The strongest TransR result in the table is 85.9%, and the word-embedding-augmented Neural Tensor Network reaches 86.2%. TransD with uniform sampling gives 85.6%, illustrating the narrower separation on this dataset. The authors call attention to entities that appear in validation or test but never appear in training. They identify 570 entities of this kind. TransD has randomly initialized representations for them, whereas the word-embedding approach can obtain a vector from outside the graph. The aggregate result leaves their individual contribution to the error unresolved.
On FB13, TransD with Bernoulli sampling reaches 89.1% test accuracy, compared with 83.3% for Bernoulli TransH and 82.5% for Bernoulli TransR. Uniform TransD gives 85.9%. The Neural Tensor Network reaches 87.1% without the additional word embeddings, and its augmented version reaches 90.0%. These results make the benchmark’s comparison twofold. TransD leads the reported translation-based settings, while the best FB13 result uses extra information. The CTransR entry for FB13 is unreported in the classification table.
The training-time observation comes from FB15k classification. The authors report 70 seconds per round for TransR and 24 seconds per round for TransD on their computer. This is the empirical counterpart to the multiplication count. It measures the cost of training under one reported setup alongside the analytical argument about what each projection requires.
Ranking candidates for a missing endpoint
Link prediction starts with a recorded test fact and removes either endpoint. For that position, the experiment proposes each entity in the dictionary in turn. The relation and known endpoint stay fixed. The resulting candidates are scored from highest to lowest, and the evaluator records the rank of the removed entity. Filling the head and filling the tail have the same procedure, but they can differ considerably in difficulty. One direction might have a single likely answer while the other has many plausible entities.
Mean Rank averages the positions of the removed entities, so a lower value is better. Hits@10 reports the proportion that appear among the first 10 positions, so a higher value is better. The two metrics capture different behavior. A correctly recovered entity moving within the top 10 can improve Mean Rank while leaving Hits@10 unchanged. Likewise, getting more examples into the top 10 can coexist with a poor average if some remaining examples rank far down the list. Reporting both metrics makes these outcomes visible.
In the Raw setting, the ranking includes the candidates generated from the full dictionary. Some alternatives may already be facts recorded elsewhere in the benchmark. The Filter setting removes those known alternatives from the training, validation and test splits while retaining the target being ranked. For a head with several recorded tails, this avoids counting those valid tails as competitors against the particular target. The filter uses benchmark membership. Whether a candidate outside the known facts is genuinely false remains separate from its presence in the ranking.
The ranking experiments use WN18 and FB15k. The paper draws on earlier results for the comparison systems because they use the same datasets, including results for RESCAL and earlier structured or matching approaches. The search for TransD considers margins of 0.1, 0.5, 1 and 2, dimensions of 20, 50, 80 and 100, and mini-batch sizes of 100, 200, 1000 and 1400. The reported validation choice is a margin of 1, dimensions of 50 for both spaces and a batch size of 200, using L₂ dissimilarity. Training lasts 1000 rounds on both ranking datasets.
FB15k test link prediction by filtered Hits@10
Both TransD settings put more held-out answers in the leading group than the listed baselines.
The numbers
| System or setting | Hits@10 % |
|---|---|
| RESCAL | 44.1 |
| TransE | 47.1 |
| TransH (bern) | 64.4 |
| TransR (bern) | 68.7 |
| CTransR (bern) | 70.2 |
| TransD (unif) (this paper) | 74.2 |
| TransD (bern) | 77.3 |
On FB15k, TransD with Bernoulli sampling reaches 53.4% Raw Hits@10 alongside the 77.3% filtered result. The corresponding CTransR values are 48.4% Raw Hits@10 and 70.2% filtered Hits@10. For Raw Mean Rank, Bernoulli TransD gives 194, compared with 198 for Bernoulli TransR and 199 for Bernoulli CTransR. The picture changes for filtered Mean Rank. Uniform TransD gives 67, ahead of the reported baseline values, while Bernoulli TransD gives 91. The latter setting is best for bringing answers into the top group on this dataset, and the former is best for their average position after filtering.
On WN18, uniform TransD reaches 92.5% filtered Hits@10 and Bernoulli TransD reaches 92.2%. Both CTransR settings give 92.3% for that metric. On the same dataset, Bernoulli TransD has a Raw Mean Rank of 224 and a filtered Mean Rank of 212. Those are lower than the corresponding Bernoulli CTransR ranks of 231 and 218. TransR with Bernoulli sampling has the highest WN18 Raw Hits@10 in the table at 79.8%, compared with 79.6% for Bernoulli TransD. The WN18 results consequently support the paper’s argument through particular metrics and settings. FB15k provides the clearer separation in top-ranked retrieval.
What the ablations show
Changing the corruption policy
The paper has no component-removal ablation that retrains TransD with its entity-dependent correction disabled. Its closest controlled comparison changes how training negatives are generated while keeping the scoring architecture the same. The comparison is repeated across methods, and the paper also analyzes scores by relation type and inspects the learned projection vectors. Those analyses address different parts of the explanation for the gains.
For classification, Bernoulli TransD has higher test accuracy than uniform TransD on all the reported subsets. WN11 moves from 85.6% to 86.4%, FB13 from 85.9% to 89.1%, and FB15k from 86.4% to 88.0%. The result is consistent with the authors’ contention that relation-aware corruption can reduce incorrect negative labels. The classification experiments record the resulting accuracy. They provide no direct count of how many sampled negatives were valid facts under either policy. The score comparison gives evidence about the usefulness of the resulting training examples.
In ranking, Bernoulli sampling has a more mixed relationship with performance. On WN18, it improves TransD’s Raw Mean Rank from 242 to 224 and filtered Mean Rank from 229 to 212. Filtered Hits@10 favors the uniform setting at 92.5% over 92.2%. On FB15k, the Bernoulli policy gives the higher top-group scores, but its filtered Mean Rank of 91 is worse than the uniform run’s 67. The way negatives are chosen therefore affects which aspect of the ranking improves. The existence of an advantage for uniform TransD over uniform CTransR on FB15k also shows that the overall gain cannot be attributed entirely to the choice of Bernoulli sampling.
Splitting the ranking by relation structure
The authors group FB15k relations by the number of entities that can appear at either end. A one-to-one relation has a single counterpart in either direction. A one-to-many relation allows several tails for a head, and a many-to-one relation allows several heads for a tail. A many-to-many relation permits multiplicity in both directions. The paper applies the grouping rules from the TransE study and reports Hits@10 for predicting each endpoint separately.
These groups expose a distinction obscured by a dataset-wide average. Predicting the head of a one-to-many relation means starting with a known tail and finding its head. Predicting the tail of the same relation begins with a head that may be linked to several valid tails. Even though both evaluations involve the same relation category, they pose different ranking problems. In the many-to-one case the asymmetry is reversed. The paired results show whether improvements arise mainly in the direction with many possible answers or extend to the other direction as well.
FB15k test tail prediction for one-to-many relations by Hits@10
The strongest TransD setting improves retrieval in the direction with multiple possible tails.
The numbers
| System or setting | Hits@10 % |
|---|---|
| TransE | 19.7 |
| TransH (bern) | 39.8 |
| TransR (unif) | 38.4 |
| CTransR (bern) | 38.6 |
| TransD (bern) (this paper) | 50.6 |
| TransD (unif) | 54.5 |
For many-to-one head prediction, uniform TransD reaches 47.1% Hits@10. Uniform TransR reaches 38.1%, and Bernoulli CTransR reaches 34.7%. For one-to-many tail prediction, uniform TransD reaches 54.5%. The authors report improvements over the previous best of 9.0% for the many-to-one head task and 14.7% for the one-to-many tail task. They also report an improvement of almost 7.4% over CTransR for many-to-many relations when predicting the endpoints. The question in each case is whether the particular held-out entity appears in the leading group, even in a relation category with several possible connections.
The many-to-many rows show the advantage in both directions. Bernoulli TransD reaches 78.5% Hits@10 for the head and 81.2% for the tail, compared with 71.2% and 73.8% for Bernoulli CTransR. There are gains in the one-to-one category as well. Bernoulli TransD scores 86.1% for the head and 85.4% for the tail, compared with 81.5% and 80.8% for Bernoulli CTransR. The results therefore show a particular benefit on some difficult multiple-answer cases alongside improvements on simpler mappings.
Comparing individual settings reveals exceptions to broad claims about the category table. For example, uniform TransD’s one-to-one head result is 80.7%, below Bernoulli CTransR’s 81.5%. Uniform TransD gives the strongest results on the two asymmetric cases that the authors highlight, while Bernoulli TransD leads their many-to-many results. The observations fit the motivation for letting projections depend on entities, but the category breakdown compares complete systems. It does not isolate the projection term from initialization, sampling and the rest of training.
Inspecting the learned projection vectors
The authors ask whether projection vectors of related objects resemble one another. They use cosine similarity, which compares the directions of two vectors. On WN18 they inspect nearest neighbors of entity projection vectors. The examples include a verb sense of “upset” associated with changes of position or state and neighbors such as “sway,” “shift” and “flap.” The neighbors of the entry for Srbija include several geographical entities. These are examples of what the projection parameters retain about objects that play related roles in the graph.
The relation inspection uses FB15k. A relation involving the currency used for rent measurements retrieves other relations involving currency and monetary measurements. A sports roster relation retrieves relations involving player rosters for teams in different sports. This is a different kind of evidence from a benchmark score. Two projection vectors can be close in direction even though neither is itself a claim about a fact. Their similarity suggests that the learned transformations can share structure across related relations.
The authors interpret these examples as support for assigning projection vectors to entities and relations. The inspection is qualitative. It shows selected neighborhoods, rather than a benchmark-wide measure of how well the vectors recover entity types or relation families. The mapping uses the projection vectors together with the entity meaning vector, so a neighborhood of projection vectors is only one part of the resulting scoring geometry.
Looking at the relations that remain difficult
The relation-level classification plots show that strong aggregate accuracy can conceal weak predictions for individual relations. On WN11, the paper reports 51% accuracy for “similar to,” close to chance in the authors’ assessment. There are 1672 training pairs for that relation, reported as 1.5% of the training data. The authors attribute the difficulty chiefly to the limited number of examples and the need for considerable information about the connected entities. The comparison is observational. It identifies a candidate explanation for a low score without measuring the effect of adding examples.
On FB13, cause of death and gender are among the weaker relations. The authors argue that cause of death is particularly difficult to reconstruct from other facts. They also note that parts of a person’s name can sometimes carry evidence about gender. TransD gives the whole name an entity embedding and has no mechanism that separately uses its component words. That illustrates how evidence may be available in a label or in other text while remaining inaccessible to a method that primarily learns from triplets. On FB15k, the paper finds relations with classification accuracy below 50% and gives both sparse training evidence and limited inferability as possible explanations.
Limitations
Limits identified by the authors
The authors distinguish missing facts that leave clues in the graph from those that are difficult to infer from the available edges. Gender, parents and children are among the relations they discuss. The presence of other attributes about a person may still leave the relevant fact undetermined. According to an estimate cited in the paper, Freebase lacks birthplace information for 71% of the people it lists. This is a figure about attribute coverage in Freebase. It does not measure TransD’s accuracy on birthplace, and the paper provides no result showing that those missing values can be recovered through graph embeddings.
The proposed complement is information extraction from text. A sentence can state a fact for which the graph contains few clues, and text may also mention entities or relations that are absent from the graph. The authors identify extraction as a direction for future work. The experiments in the paper concern scoring with an existing graph and its entity and relation dictionaries. Their results establish no measured benefit for a system combining the graph with text.
Another limit arises when the graph provides no training triplets for an evaluation entity. The WN11 discussion identifies 570 entities seen only in the validation and test portions, and the paper reports 1680 triplets involving such entities, with a reported share of 6.4%. The denominator for that share is unclear alongside the split totals. The central issue is that these entities cannot learn from appearances in training. TransD initializes their embeddings randomly, and the paper gives no separate accuracy score for the triplets that contain them. Its WN11 aggregate thus establishes how the system performed on the full classification test, with both seen and unseen entities mixed together.
What follows from the experimental setup
Triplet classification uses relation-specific thresholds and depends on the supplied or constructed negatives. The reported accuracies show how well the systems tell those labeled classes apart. A graph with many missing facts leaves open the possibility that an apparently negative triplet is true. The Bernoulli sampler addresses this issue during training by changing the chances of corrupting one endpoint or the other. It cannot verify the truth of each negative example. The test results should therefore be read in the context of the benchmark’s negative construction, especially on FB15k where the authors create negative test cases for this experiment.
Filtered ranking handles another consequence of incompleteness. It removes known correct alternatives so that the target is judged against candidates with no recorded claim to correctness in the splits. An alternative that is true but missing from all splits can still appear above the target and count against it. Conversely, a correct entity in the top 10 does not imply that the other entities ranked above or below it have been checked. Mean Rank and Hits@10 measure recovery of held-out graph entries. They leave open how accurate the additional proposed facts would be if reviewed independently.
The dynamic mapping’s form limits what can be learned relative to an unrestricted matrix. For each relation, its correction acts along one learned direction. Endpoint-dependent scalar weights give it flexibility within that pattern. An arbitrary relation matrix can mix coordinates in ways that cannot be written as an identity plus that outer product. The experiments show the performance of this tradeoff on the selected benchmarks. Since the reported best configurations use equal entity and relation dimensions, they give little evidence about when choosing different dimensions would help.
The cost claim has both an analytical and a measured part. The vector construction removes the need for dense matrix multiplication when projecting the endpoints. The 24-second and 70-second observations are measurements of classification training rounds on the authors’ computer. The experiments do not include a scaling series across larger graphs, a memory benchmark, or an end-to-end latency study. In particular, the link prediction protocol still requires scoring every entity candidate for each missing position. A cheaper score reduces the work per candidate while leaving the number of candidates determined by the dictionary.
Finally, the architecture comparison combines several choices. TransD introduces an entity projection vector, constrains the form of the relation mapping and uses a particular initialization and training configuration. The uniform and Bernoulli comparisons isolate the corruption policy within a given approach. The mapping-type breakdown localizes improvements, and the cosine analysis describes some of the learned parameters. Together these results make the authors’ explanation plausible. A trained comparison holding the rest of TransD fixed while removing entity-dependent projection would be needed to measure the contribution of that component on its own.
What came after
Other ways to represent and compare graphs
STransE is a later embedding approach for entities and relationships. Its place in this line of work is the design of the representation used to score facts. TransD’s particular decision is to let an endpoint and its relation jointly determine the endpoint’s mapping. STransE cites the paper while presenting another embedding design for the same objects. The citation connects the two as alternatives for representing relational data.
Low-Dimensional Hyperbolic Knowledge Graph Embeddings changes the geometry in which graph representations are studied. In TransD, the projection and translation are built from operations on ordinary real vectors and the main score uses a Euclidean residual. The later work’s stated focus is on obtaining embeddings in a low-dimensional hyperbolic space. The connection is the effort to represent graph relations with compact geometry. The later paper raises the choice of the space itself, alongside the earlier question of how entities are transformed for a relation.
Cross-lingual Knowledge Graph Alignment via Graph Convolutional Networks addresses correspondences across graphs in different languages. TransD’s evaluation searches for the entity that fills a position in a triplet within one graph. Alignment uses graph representations for a different comparison, identifying entities across graphs. This citing work approaches that comparison through graph convolutional networks. It extends the setting in which learned representations of graph structure are useful.
Out-of-Sample Representation Learning for Knowledge Graphs takes up a condition that appears explicitly in TransD’s WN11 results. A graph representation learned by assigning parameters to entities faces a difficulty when evaluation introduces an entity absent from training. TransD’s WN11 discussion treats those entities as a special case within the test population. The later work makes out-of-sample representation learning the subject of the study, bringing the availability of an entity representation to the foreground.
Beyond Model Performance: Can Link Prediction Enrich French Lexical Graphs? revisits link prediction as a way to add information to a lexical graph. The question it poses is about enrichment of French lexical resources. TransD’s WordNet experiments already evaluate whether held-out lexical links can be recovered through learned representations. The later study’s focus connects those benchmark questions to the usefulness of the links that a predictor could propose for an existing lexical resource.
The place of TransD in broader research
Knowledge Graphs cites TransD in a work about knowledge graphs as a broader subject. TransD addresses one operation within that subject, assigning plausibility to candidate facts from relational data. The general treatment places this embedding approach in a research area that also concerns how graph knowledge is organized and used.
The survey of knowledge graph representation learning for link prediction has a narrower scope that directly matches one of the paper’s experiments. Its subject is the collection of ways to learn graph representations for missing-link prediction. The overview of knowledge graph embedding techniques situates the paper among embedding methods more generally. In both connections, TransD contributes an example of a translation design distinguished by its mapping from entity vectors to the space of a relation.
The review of temporal knowledge graph representation and reasoning concerns graphs whose representation and inference take time into account. TransD’s score uses the head, relation and tail of a candidate, with no temporal input in its formulation. The review’s citation links that static embedding design to a body of work concerned with how graph facts and their interpretation can depend on time.
Citations in language research
A Regularization Approach for Incorporating Event Knowledge and Coreference Relations into Neural Discourse Parsing concerns how information about events and coreference, where expressions refer to the same entity, can enter a discourse parser. Its stated mechanism is regularization, which brings such information to bear during learning. The citation gives a connection to graph embedding from a task in which relational knowledge is used in the analysis of discourse.
The survey of implicit discourse relation recognition cites TransD in a different relation-prediction setting. Its subject is identifying relations in discourse when the text leaves them implicit. TransD uses a graph relation label to test proposed entity connections. The later survey covers relations between parts of discourse, an application with a different input and prediction target.
The systematic survey of deep-learning dialogue systems cites TransD from a treatment of dialogue systems. This is a broader application context than the paper’s graph-completion experiments. For the language studies and surveys, the citation establishes a connection to the graph-embedding literature. The available descriptions establish the citing works’ subjects, while leaving their exact use of TransD’s projection rule unspecified.
Institutions
Fields, topics and concepts
Shelves 5The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 worksInformation Systems · 1,888 works
Topics 1Research subjects and languages the work is about.Knowledge graphs & ontologies · 218 works
Concepts 1Key ideas and methods explained on our concept pages.Knowledge graph · 49 works
Cite
Cite as Guoliang Ji, Shizhu He, Liheng Xu, Kang Liu and Jun Zhao. 2015. Knowledge Graph Embedding via Dynamic Mapping Matrix. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers).
@inproceedings{ji2015knowledge,
title = {{Knowledge Graph Embedding via Dynamic Mapping Matrix}},
author = {Guoliang Ji, Shizhu He, Liheng Xu, Kang Liu and Jun Zhao},
booktitle = {Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)},
year = {2015},
doi = {10.3115/v1/p15-1067},
url = {https://doi.org/10.3115/v1/p15-1067}
}References
- George A. Miller. 1995. WordNet: A lexical database for english. Communications of the ACM, 38(11):39-41.
- Bollacker K., Evans C., Paritosh P., Sturge T., and Taylor J. 2008. Freebase: A collaboratively created graph database for structuring human knowledge. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/ji-2015-knowledge-graph-embedding-dynamic-mapping/