Lifted Rule Injection for Relation Embeddings
Paper · 2016 · Thomas Demeester, Tim Rocktäschel and Sebastian Riedel
Summary
A system that learns relations from text can discover that two expressions occur with similar pairs of people or places. It has a harder time learning which expression is more general. The same examples might make father and parent look interchangeable, even though being a father implies being a parent and the reverse implication fails. A lexical resource such as WordNet supplies that direction. The question in “Lifted Rule Injection for Relation Embeddings” is how to give it to a system that learns from data without making training revisit every entity pair for every rule. The authors study this question in information extraction, where textual evidence helps recover facts for a structured knowledge base.
The paper starts with a predictor that represents relations and entity pairs as vectors. To score a candidate fact, it takes the dot product of the relation vector and the pair vector. The authors make the pair vectors non-negative and train the vectors of relations linked by an implication to follow a coordinate-by-coordinate order. If father is below parent in every coordinate, then every permitted pair vector gives parent a score at least as high as father. The training penalty can therefore be calculated from the relation vectors alone. The paper calls this lifted rule injection because it handles the rule at the level of relations, without creating a separate training term for each substitution of an entity pair.
On the New York Times relation extraction benchmark, the authors’ matrix factorization baseline scores 0.65 in weighted mean average precision. Restricting the entity-pair vectors improves it to 0.67 before any rules are added. With 36 manually screened WordNet rules, the same restricted setup reaches 0.69. The rules connect textual patterns, while the test targets are Freebase relations. The experiment therefore shows that rules about the wording of relations can help rank structured facts even when those relations never appear in the rules. On the hardware used for the timing experiment, the restricted setup takes 6.33s per training epoch, and the version with the screened rules takes 6.76s.
Separate experiments use hand-picked rules that can directly support Freebase predictions when labeled facts are scarce. The paper also checks whether WordNet rules preserve their direction: after injection, the predictor generally assigns much higher scores to facts inferred in the stated direction than to facts inferred in reverse. The mathematical guarantee concerns the score order once the coordinate constraints hold. The empirical results show what happens when those constraints are encouraged through a training penalty, alongside the objective of fitting the observed data.
Deep dive: Lifted Rule Injection for Relation Embeddings
Lifted rule injection teaches relation embeddings to respect implications without checking every entity pair, improving relation extraction. · about 38 minutes to read
The problem and its context
What a relation predictor learns from repeated pairs
A structured relation gives a name to a connection between entities. A knowledge base might record that a person works for a company, that an author wrote a particular work, or that a place lies within a larger place. A record specifies the relation and the entities in its argument positions. In a knowledge graph, such a record can be understood as a labeled connection. Relation extraction supplies candidates for those connections from text, and knowledge base completion asks which missing entries are plausible.
In the approach this paper builds on, a relation can also be a pattern observed in a sentence. A pattern records a way of expressing a connection between the entities, such as a construction involving the word father. A structured label such as parent/child and the textual pattern have different origins. The former comes from Freebase, and the latter comes from the text. The predictor gives both a place in the same representation because both can describe the same entity pair.
Imagine a matrix with a row for each pair and a column for each relation, including the textual patterns. An observed cell says that a relation has been recorded for that pair. The matrix is sparse because each pair occurs with only some of the relations the system knows about. Matrix factorization replaces the large array of potential scores with vectors for its rows and columns. If several pairs that occur with a textual pattern also have a particular Freebase relation, training can make that pattern informative about the Freebase relation for other pairs.
This sharing is what makes a missing cell predictable. The system can draw on the rest of the matrix to score the combination of a known pair and a relation. It also explains why the authors care about the representation of textual patterns even when evaluation concerns only structured relations. Textual and structured observations both contribute to the learned pair vectors, and those vectors are what the predictor uses when it ranks candidates for a structured relation.
Observations about where patterns occur are incomplete evidence about meaning. The text may contain examples of someone being described as a father, a parent, or both. It has little reason to spell out a general fact connecting the two terms. A learned association can consequently be strong without having the right direction. If father and parent occur with similar pairs, the system may find each a good predictor of the other within its training data. The rule conveys an additional distinction. The broader relation applies whenever the narrower one applies, and the broader relation can also apply on its own.
The authors identify resources such as WordNet and PPDB as places where background knowledge can be found. Their experiments use WordNet to get connections between words and then translate a subset of those connections into implications between textual patterns. The distinction between a word and a pattern matters. The relation being scored is a particular expression of a connection between entities. The rule has to preserve that connection and the roles of the entities when it moves from one expression to another. Knowing how words are related gives the authors a way to propose rules, with manual screening used to select the rules for the main accuracy experiment.
How earlier methods attached rules to facts
The relevant form of reasoning in this paper starts with a rule containing a variable. In professorAt ⇒ employeeAt, that variable stands for the same pair throughout the implication. A statement that a person is a professor at an institution should support a statement that the person is employed there. To make a ground instance of the rule, substitute a particular person and institution for the variable. The two sides then name candidate facts about that pair.
Earlier work described in the paper incorporated first-order rules into learned vector representations by making such substitutions and adding the resulting rule instances to the training objective. This procedure is called propositionalization. It makes each case available for scoring, which allows the training procedure to penalize a violation on a specific pair. The cost follows from the same feature. Each new pair relevant to a rule can create more ground instances to evaluate, and each new rule can require another set of substitutions.
A natural economy is to use the pairs that occur with the relevant relations in the training data. That already leaves a collection of instances for each rule. It also gives the penalty a narrower reach. The fitted vectors might score both sides of the rule in the desired order for all the selected pairs while reversing them for a pair that never appeared in those checks. Generalization from selected instances would then depend on what the embeddings happened to learn. A training objective defined directly over the relation vectors offers a way to make the desired score order follow from the representation itself.
The paper places its proposal among several approaches to combining rules with learned representations. It describes prior work that jointly rewarded observed facts and grounded rules, work that used integer linear programming to incorporate several kinds of rules, and work that learned representations of facts and first-order rules through matrix factorization. It also describes an approach that reduced grounding cost by filtering the facts considered, and another that added a training loss based on paths intended to capture interactions across several relations. Their relevance here is the different place each gives to a symbolic relationship in the computation. A grounded rule acts on a candidate instance, a path connects entities across multiple edges, and the proposed coordinate order acts on the parameters used to score every pair.
There is also a connection to work that ordered embeddings for images and phrases, and to work that used WordNet to shape word representations. The first gives a precedent for representing an asymmetric relationship by coordinate order. The second shows how an external lexical resource can influence learned vectors. This paper’s object of interest is a relation between entities. Its additional step is to ensure that the order on relation vectors survives the operation used to score facts. That requires specifying what the pair vectors are allowed to look like.
The authors describe an earlier workshop version of their own work that tried several transformations and used approximately Boolean relation representations. The present paper puts the restriction on the pair side and derives a rule penalty from an inequality. This leaves the relation coordinates free to take positive and negative values. That allocation of freedom matters because the order needs to say which of two relations has the higher score, while the fact predictor still needs ways to give different relations high or low scores across a varied set of pairs.
Why the rule has a narrow form
The proposed method applies to implications between two relations with the same arguments in the same positions. This gives it a particularly direct interpretation. The two candidate facts are scored against a shared pair vector, so the implication becomes an inequality about two dot products. The pair vector is common to both sides, and the difference between the scores can be attributed to the difference between the relation vectors.
That simplification defines the research problem. The authors want a loss whose cost for a rule is independent of the number of entity pairs, and they want an order that applies to any permitted representation of a pair. A rule with premises about several different pairs, such as a rule following a chain of connections through an intermediate entity, poses a different problem. There is then no single pair vector common to all the scores. The earlier grounded approach covers a broader range of first-order formulas. The paper pursues the computational and mathematical advantages available for the simpler case.
There is a second difference in how the two approaches interpret a rule. The earlier probability-based construction described by the authors approximates the probability that a premise holds and its conclusion fails using the probabilities of the two facts. That approximation treats the two events as independent. Related descriptions of the same pair can be strongly dependent, especially if their meanings are close. The approach here imposes a relation between their scores directly. It can therefore express that the scores move together or even coincide without having to assign a joint probability to the two facts.
The method, step by step
From an observed pair to a score
The predictor has two kinds of vectors. A relation vector describes a type of connection. A tuple vector describes the pair of entities that might have that connection. A tuple here is an ordered grouping of entities, so the argument positions are part of what identifies it. Each observed fact matches a relation with a tuple. The paper uses the matrix factorization predictor called F as its starting point.
Training relation embeddings with lifted rules
The steps in order.
The vectors have the same number of coordinates. To score a fact, the predictor multiplies the relation and pair entries in each coordinate and sums their products. A coordinate can contribute positively or negatively, depending on the entries. The coordinates are learned from the observed combinations of pairs and relations. The scoring function gives those coordinates a role without requiring the authors to give each one a meaning in advance.
S(r, t) = 𝐫ᵀ𝐭
Here r is a relation label, t is an entity tuple, and S(r, t) is their compatibility score. The bold symbols 𝐫 and 𝐭 are the corresponding vectors. The superscript ᵀ transposes the relation vector, so the product on the right is a dot product. The common vector dimension is written k.
Training seeks to place observed facts above unobserved ones. The distinction is important because the knowledge base and the text together record only a portion of the facts that could be true. For most candidates the authors have no explicit negative label. An unobserved fact supplies a comparison for an observed fact, with the expectation that the observed one should receive the better score. A particular sampled candidate can still turn out to be true in the world.
𝐫(p)ᵀ𝐭(p) ≤ 𝐫(q)ᵀ𝐭(q)
The indices p and q distinguish the comparison fact from the observed fact. The vectors 𝐫(p) and 𝐭(p) belong to the unobserved candidate, and 𝐫(q) and 𝐭(q) belong to the observed one. Each product with ᵀ is the candidate’s dot-product score. The inequality ≤ says that the unobserved candidate should score at most as highly as the observed fact. This is the preference behind the Bayesian Personalized Ranking objective used in the paper.
In practice, the comparison keeps the relation fixed. For an observed fact about a particular relation and tuple, the authors sample another tuple whose combination with that relation is unobserved. Fixing the relation makes the comparison directly relevant to the eventual ranking task. The predictor learns which pairs make better candidates for that relation. The same tuple can supply useful evidence in a comparison for one relation and be the observed member of a comparison for another.
Lᵣ = ∑_{⟨r, t(q)⟩ ∈ O} ∑_{t(p) ∈ T, ⟨r, t(p)⟩ ∉ O} R(𝐫ᵀ(𝐭(p) − 𝐭(q)))
Lᵣ is the reconstruction loss, the part of the objective that fits the rankings suggested by the observed data. O is the set of observed training facts, and T is the set of tuples occurring in O. The angle brackets denote a fact consisting of a relation label and a tuple. The first sum ∑ ranges over observed facts ⟨r, t(q)⟩. The second ranges over tuples t(p) in T whose facts with the same relation r are outside O, as indicated by ∉. The implementation uses sampling for those comparisons. 𝐫, 𝐭(p), and 𝐭(q) are the associated vectors. The difference in parentheses puts the unobserved candidate first, so its dot product with 𝐫 is positive when the scores violate the desired ranking. R is the scalar loss applied to this difference.
R(s) = −log σ(−s)
R denotes the reconstruction penalty for a score difference s. The function σ is the sigmoid, log is the natural logarithm, and the minus signs reverse the score difference inside the sigmoid and negate the logarithm outside it. A larger value of s means the sampled candidate ranks more strongly against the observed fact and receives a larger penalty. A favorable ordering lowers the penalty, and the logistic form continues to reward better separation as the observed fact pulls further ahead.
σ(s) = (1 + exp(−s))⁻¹
σ maps its real input s to the interior of the unit interval. The function exp is the natural exponential. The exponent ⁻¹ outside the parentheses takes the reciprocal of the positive denominator. In the reconstruction loss, the sigmoid acts on a scalar score difference. Later, the same function is applied separately to each coordinate of a tuple’s parameter vector.
L_F = Lᵣ + α(∑ᵣ ‖𝐫‖₂² + ∑ₜ ‖𝐭‖₂²)
L_F is the full objective for the baseline F, and Lᵣ is its reconstruction loss. The first sum in parentheses runs over relation vectors 𝐫, and the second over tuple vectors 𝐭. The notation ‖·‖₂² means the sum of the squares of a vector’s entries. The weight α controls the cost of large entries relative to fitting the training comparisons. This regularization limits the incentive to improve rankings simply by increasing the magnitudes of the vectors.
What changes when a rule is added
The implication uses a shared tuple on both sides. Take the authors’ example of professorAt and employeeAt. If the first relation holds for a particular person and institution, the training rule is meant to favor the second relation for that same combination. In the rule notation below, p and q now identify relations. The comparison for learning from data kept the relation fixed and changed the tuple. The comparison for learning an implication keeps the tuple fixed and changes the relation.
∀t ∈ T : ⟨r(p), t⟩ ⇒ ⟨r(q), t⟩
∀ means “for every,” and t ∈ T ranges over the entity tuples in the domain under discussion. The angle brackets again join a relation with its arguments. The premise relation is r(p), the conclusion relation is r(q), and ⇒ states the implication from the first fact to the second. Its direction is part of the input. In the scoring formulation, a high score for the premise should carry over to the conclusion.
∀t ∈ T : 𝐫(p)ᵀ𝐭 ≤ 𝐫(q)ᵀ𝐭
𝐫(p) and 𝐫(q) are the vectors for the premise and conclusion, and 𝐭 is the shared tuple vector. The transposed vector products are their compatibility scores. The inequality ≤ says that the conclusion must receive at least the premise’s score for every tuple indexed by ∀t ∈ T. A pair giving the premise a low score imposes no upper limit on the conclusion. This is the sense in which the score condition can encode a one-way rule.
The authors first formulate a loss that uses this ordering explicitly for every tuple. They normalize each tuple before assigning its penalty so that a tuple with large coordinates does not count more simply because of its magnitude. For a non-zero tuple, dividing by the sum of the absolute entries preserves the sign of the score difference, which is what determines whether the premise is above the conclusion. Normalization therefore changes how much a violation costs while preserving which direction the comparison goes.
𝐭̃ = 𝐭 / ‖𝐭‖₁
𝐭̃ is the normalized vector for tuple t, 𝐭 is its original vector, and ‖𝐭‖₁ is the sum of the absolute values of its entries. The division is by a positive scalar when 𝐭 is non-zero. The sigmoid parameterization used in the proposed system gives positive tuple entries for finite parameters, which keeps this denominator positive.
L_I = ∑_{t ∈ T} J((𝐫(p) − 𝐫(q))ᵀ𝐭̃)
L_I is the grounded loss for the implication I. The sum goes over tuples t in T. The vectors 𝐫(p) and 𝐫(q) are subtracted in premise-to-conclusion order, so the dot product with 𝐭̃ is positive when the premise outscores the conclusion. J is the convex implication penalty, whose specific form is given below. A convex penalty lets the authors bound the cost of a weighted average by the corresponding weighted average of costs.
This objective makes the computational issue visible. The same two relation vectors occur in every summand, with only the tuple changing. A traversal limited to tuples observed with either of the relations would still repeat the comparison, and the training loss would directly inspect only those selected tuples. The lifted formulation asks what properties of the shared relation vectors would take care of all these comparisons at once.
Why nonnegative coordinates make lifting possible
Suppose the premise vector is at most the conclusion vector in each coordinate. Multiplying both entries in a coordinate by the same non-negative tuple entry preserves that order. Adding the resulting products across coordinates preserves it again. The conclusion therefore receives a dot-product score at least as large as the premise for every non-negative tuple. A negative tuple entry could reverse an individual comparison, which explains why this argument places a restriction on tuples.
The relation vectors can still contain negative entries. A premise and a conclusion can both have negative values in some coordinate, and the premise can be the smaller of the two. The ordering is about which value is larger, while the sign of each entry helps decide whether the coordinate supports or lowers the score of an individual fact. Keeping these two roles separate leaves room for a relation to score poorly against some pairs even when it is the general conclusion of a rule.
𝐫(p) ≤ 𝐫(q) and 𝐭 ≥ 𝟎 for every t ∈ T
Here 𝐫(p) and 𝐫(q) are the relation vectors, and 𝐭 is the vector for each tuple t in T. Both inequalities are coordinatewise. 𝟎 is the all-zero vector in the same space. These conditions suffice for the desired ordering of dot products. A coordinatewise comparison can leave some pairs of relations unordered, which is why the paper describes a partial order in the relation space.
A useful way to think about the sufficient condition is to ask what a tuple can emphasize. If the conclusion has the larger entry in a coordinate, any positive weight on that coordinate helps the conclusion relative to the premise. If the two entries are equal, weighting that coordinate affects both scores equally. Once every coordinate behaves in one of these ways, the relative scores cannot reverse as the tuple shifts its emphasis. The rule remains directional because an advantage for the conclusion is permitted even for a tuple whose premise score is low.
The paper derives a bound on the entire grounded loss from the same idea. With non-negative entries, the normalized tuple consists of weights that sum to one. The normalized score difference is therefore an average of the coordinate differences, weighted by that tuple. The authors use unit vectors to write the coordinate differences in the same dot-product form as the original rule score.
(𝐫(p) − 𝐫(q))ᵀ𝐭̃ = ∑ᵢ 𝐭̃ᵢ (𝐫(p) − 𝐫(q))ᵀ𝟏ᵢ
𝐭̃ is the normalized tuple vector, and 𝐭̃ᵢ is its entry at coordinate i. The sum goes over the k coordinates. 𝟏ᵢ is the unit vector with an entry of one at i and zero everywhere else. The dot product of 𝐫(p) − 𝐫(q) with that unit vector selects the difference at coordinate i. The expression on the right displays the weights that were implicit in the dot product on the left.
Jensen’s inequality now applies. For a convex function, evaluating the function on a weighted average gives a value at most as large as the weighted average of the separate function values, provided the weights are non-negative and sum to one. Here the arguments of the function are the coordinate differences, and the function gives the cost of those differences for the implication. This step is where both the geometry of the tuple space and the choice of a convex rule loss matter.
L_I ≤ ∑ᵢ J((𝐫(p) − 𝐫(q))ᵀ𝟏ᵢ) ∑_{t ∈ T} 𝐭̃ᵢ
L_I is the grounded loss over T for one rule. The first sum runs over the coordinates i. For each one, J evaluates the penalty on the difference between the premise vector 𝐫(p) and the conclusion vector 𝐫(q) selected by unit vector 𝟏ᵢ. The inner sum collects the weights 𝐭̃ᵢ from the normalized vectors of every tuple t in T. The bound follows by applying Jensen’s inequality to each tuple and collecting all the terms for each coordinate.
The expression still contains a total weight for each coordinate across the tuples. A common upper bound on those totals turns them into a single multiplier. The resulting lifted objective is the sum of the rule losses on the unit vectors. A coordinate that happens to get little weight from the observed tuples is still checked. This is useful for imposing an order that will apply when a future scored combination emphasizes a different part of the space.
Lᴜ_I = ∑ᵢ J((𝐫(p) − 𝐫(q))ᵀ𝟏ᵢ)
Lᴜ_I is the lifted loss for implication I. The sum runs over coordinates i, J is the implication penalty, and 𝟏ᵢ selects the corresponding entry in the difference between the premise and conclusion vectors. The superscript ᴜ marks the lifted term used to construct the upper bound. The formula can be evaluated from the relation vectors with no access to the vectors of training pairs.
L_I ≤ β Lᴜ_I
L_I is the grounded loss, and Lᴜ_I is the lifted loss for the same rule. The multiplier β is any common upper bound on the total normalized tuple weight at an individual coordinate. The paper gives |T|, the size of the tuple set, as one possible bound, since each normalized tuple contributes at most one to a coordinate. This mathematical β establishes the inequality. The authors use a separate tunable weight in training to choose the importance of the lifted term.
The bound and the componentwise argument play related roles. The bound justifies using a tuple-independent loss in place of the repeated tuple-specific terms. The ordering argument explains what follows if the desired relation order is achieved. A training run can reduce the lifted penalty while some coordinates still violate the order, because the total objective also rewards fitting observed data. The general guarantee is a property of the attained order, and the experiments assess what the soft penalty achieves in practice.
Restricting the tuple vectors during learning
The mathematical argument needs non-negative tuple entries. The authors go further and constrain each entry to the unit interval using a sigmoid. They describe the resulting vectors as approximately Boolean. Entries can vary continuously and can lie near either endpoint. The experiment leaves room for intermediate values, and the method works with those values directly.
𝐭 = σ(𝐞), with 𝐞 ∈ ℝᵏ
𝐞 is the real-valued trainable parameter vector for a tuple, ℝᵏ is the space of real vectors with k coordinates, and σ is applied to each coordinate independently. The result 𝐭 is the vector used to score facts. Its entries lie in the unit interval, and for finite parameters they are strictly between the endpoints. The training gradients update 𝐞, and the squared-magnitude penalty for a tuple applies to 𝐞 as well. The relation vectors are trained directly in real space.
The transformation makes each tuple coordinate act like a bounded weight on a relation coordinate. A large positive parameter yields a weight near the upper end of the interval, and a large negative parameter yields one near the lower end. A tuple can thus emphasize some relation coordinates and give little influence to others. The authors had considered other ways to obtain non-negative entries, including an exponential transformation in their earlier work, and report that the sigmoid choice worked better in practice. The mathematical bound itself depends on nonnegativity and the subsequent normalization.
The paper calls the restricted variant FS. It scores facts with the transformed tuple vectors and uses the same ranking structure as F. FS is necessary for interpreting the experiments because it allows the authors to measure what happens when only the representation is changed. The rule-bearing system FSL then adds the lifted loss to FS. The effects of the representation and the rules can be examined separately through those comparisons.
L_FS = ∑_{⟨r, t(q)⟩ ∈ O} ∑_{t(p) ∈ T, ⟨r, t(p)⟩ ∉ O} R(𝐫ᵀ(σ(𝐞(p)) − σ(𝐞(q)))) + α(∑ᵣ ‖𝐫‖₂² + ∑ₑ ‖𝐞‖₂²)
L_FS is the objective for the restricted predictor. In the first sum, O supplies an observed relation r and tuple t(q). For that relation, the second sum considers a tuple t(p) in T with an unobserved fact. 𝐞(p) and 𝐞(q) are the two underlying tuple parameter vectors. The componentwise sigmoid σ maps them to their scoring vectors. Their difference, dotted with the relation vector 𝐫, gives the sampled score minus the observed score, and the reconstruction function R penalizes that difference. The last two sums run over relation vectors 𝐫 and underlying tuple parameter vectors 𝐞, respectively. The squared Euclidean norm ‖·‖₂² measures the magnitude of each parameter vector, and α weights this regularization.
Choosing how much separation a rule should demand
The ranking objective rewards a growing separation between observed and sampled facts. An implication has a different purpose. Its conclusion should be at least as compatible as its premise. Once their vectors are ordered with a small margin, further separation could distort relations that happen to be close in meaning. A rule between near-equivalent expressions should be compatible with an embedding that puts them near each other.
For that reason, the authors choose a hinge penalty for the rule. The penalty falls as the premise coordinate moves below the conclusion coordinate and then reaches zero. The small positive margin ensures that a coordinate at exact equality still receives pressure in the intended direction. After the margin is met, the data objective and other training terms can determine where the two coordinates settle.
J(s) = max(0, s + δ)
J is the implication penalty. The input s is a premise score minus a conclusion score, or, in the lifted version, the difference between the premise and conclusion at a coordinate. The operator max selects the larger of zero and s + δ. The parameter δ is a positive margin, set to 0.01 in the experiments. The loss is zero once s is at most the negative of that margin. It is convex, which is the property required for the upper-bound argument.
The margin is stronger than the score order alone requires. Equality at a coordinate satisfies the weak inequality, while the hinge still incurs a cost there. This distinction matters for mutual implications. If two relations imply each other, the exact weak orders can both hold when their vectors coincide. Positive-margin penalties in both directions still contribute to the objective at equality. The paper’s observation about equality describes the coordinate ordering, while the margin describes how the training loss encourages it.
L_FSL = L_FS + β̃ ∑_{I ∈ ℐ} Lᴜ_I
L_FSL is the full objective for lifted rule injection. L_FS is the ranking and parameter objective with sigmoid tuple vectors. ℐ is the set of injected implications, I indexes a rule in that set, and Lᴜ_I is its lifted penalty. The training weight β̃ controls the influence of all rule penalties relative to the other terms. It is distinct from the upper-bound multiplier β. The experiments use 0.1 for β̃.
Training therefore learns one set of representations from two sources of evidence. The reconstruction term uses observed and sampled facts to set the relative scores of pairs for individual relations. The lifted term uses the rules to order the vectors of related predicates. If a textual relation participates in a rule, changing its vector to accommodate that rule can change how well it fits its observed tuples. The reconstruction term in turn can move the parameters for those tuples. Since other relations also score those tuples, the impact of rule injection can extend to relations absent from the rule list.
Computing a lifted rule penalty involves a difference and a penalty across the relation coordinates. The authors compare the work of evaluating that term or its gradient to the work of evaluating the reconstruction loss for a single pairwise training comparison. The rule cost grows with the number of rules and the embedding dimension. The number of training facts still matters for reconstruction, which continues to learn from the data. Lifting removes the need to multiply the work for an individual rule by the number of tuples against which that rule might otherwise be checked.
Experiments and results
Benchmark, baselines, and training settings
For their evaluation, the authors use the New York Times dataset that Riedel and co-authors introduced. The relation inventory includes textual patterns from the corpus and structured Freebase relations. The main evaluation ranks candidate facts for the structured relations. The textual patterns help supply evidence during training, including in the experiment where linguistic rules affect only the textual side of the inventory.
The main outcome is weighted mean average precision, reported as weighted MAP. Average precision summarizes a ranking by giving credit for retrieving correct candidates high in the list. The paper reports average precision individually for the test relations and a weighted aggregate across them. The test counts show how unevenly supported the individual rows are. For example, person/company has 106 in the test count column and location/containedby has 73, while person/religion and film/produced by each have 1. The aggregate and the relation-level rows thus answer different questions. One summarizes performance on the benchmark, and the others show where that performance changes and how much test evidence is available for a particular relation.
The original published matrix factorization result is labeled R13-F. The authors’ reimplementation is F. It provides the baseline for FS, which changes the tuple representation, and FSL, which adds implications to that restricted representation. The distinction between R13-F and F matters because the paper uses a different implementation and optimization procedure from the original experiment. Comparisons among F, FS, and FSL track the changes within the authors’ training setup.
The authors implement the predictors in TensorFlow and optimize them with ADAM. They give the embeddings 100 hidden dimensions and set the weight for squared-magnitude regularization to 0.01. The initial learning rate is 0.005, and the training mini-batch size is 8192. The standard parameter initialization is uniform over [−0.1, 0.1]. Where lifting is used, the rule weight is 0.1, and its hinge margin is 0.01. The zero-shot experiment has an additional initialization choice for the affected Freebase relations.
Rules that help textual patterns support Freebase predictions
To construct rules automatically, the authors inspect the textual patterns in the corpus. They try replacing a word in a pattern with a hypernym from WordNet. A hypernym is a term for a more general category, such as official for diplomat in the example the authors use. They generate a rule when the modified pattern also exists in the dataset. This gives both sides of the rule an actual relation vector in the training inventory.
The resulting direction runs from the pattern containing the more specific term to the pattern containing the more general term. In the example, both patterns have the same surrounding structure, and the replacement changes diplomat to official. The procedure produces 427 candidate rules. The authors then annotate the candidates manually to obtain 36 high-quality rules for the main effectiveness experiment.
None of those selected rules directly concludes that a Freebase fact holds. The training procedure instead uses them to shape relations that encode textual evidence. To improve the Freebase rankings, the effect must pass through the shared representation. For instance, the authors suggest that a textual implication from a father pattern to a parent pattern can help the predictor with parent/child. The rule itself makes a claim about the two patterns. Its relevance to the structured relation comes from the way those patterns and the structured relation fit overlapping pairs.
Weighted MAP for Freebase relation extraction on the New York Times test set
The restricted tuple representation improves the reimplemented baseline, and adding screened WordNet rules yields the strongest aggregate ranking.
The numbers
| System or setting | Weighted MAP |
|---|---|
| R13-F, original matrix factorization | 0.67 |
| F, reimplemented matrix factorization | 0.65 |
| FS, sigmoid tuple embeddings | 0.67 |
| FSL, sigmoid tuples with WordNet rules (this paper) | 0.69 |
FSL reaches 0.69 in weighted MAP on the New York Times test set, above 0.67 for the rule-free FS comparison and 0.65 for the authors’ F baseline. The original R13-F result is 0.67. The comparison with FS measures the addition of the screened rules on top of the tuple representation that makes lifting possible. The comparison with F also includes the change to that representation.
Individual relations show a mixture of gains and declines when the rules are added. Average precision for person/company is 0.74 with FS and 0.77 with FSL. For location/containedby, it is 0.70 with FS and 0.71 with FSL. For parent/child, it is 0.81 with FS and 0.85 with FSL. The latter is consistent with the authors’ suggestion about father and parent patterns, though several rules and all learned parameters can affect that result. The paper gives the comparison for the rule set as a whole.
Other rows move the opposite way. For author/works written, test average precision is 0.69 with FS and 0.65 with FSL. For film/produced by, it is 1.00 with FS and 0.33 with FSL, with 1 in the test count column for that relation. These rows help put the aggregate in context. The method changes shared representations, and a beneficial aggregate change can include a deterioration in particular rankings. Very small test counts also limit the conclusions one can draw about a particular relation.
Using rules when structured training facts are scarce
The zero-shot experiment has a different setup. The authors use the same hand-picked rules as the earlier grounded rule-injection study. Some of these rules have a Freebase relation as their conclusion. The experiment removes all Freebase facts from training at its starting point, while retaining the textual observations used to learn about the tuples and patterns. A rule can then give a structured relation information from the observed patterns even without direct training examples of that structured label.
There is a special initialization in this setting. The affected Freebase relation vectors start with negative entries sampled uniformly between the endpoints that the paper lists as −7.9 and −8.1. Without ranking comparisons for those relations, the implication loss pushes their conclusion coordinates upward. Starting them low gives that pressure a useful role during training. It also avoids beginning with already-high conclusion coordinates that satisfy the rule without having to take much information from the premise.
With all Freebase training facts removed, FSL reaches 0.35 weighted MAP on the New York Times evaluation. R15-Joint, the earlier grounded rule-injection system, reaches 0.38 under that zero-shot condition. This result anchors the claim about learning with no direct structured examples. The lifted approach transfers useful evidence through the rules, and the earlier system has the higher score at that endpoint.
The authors also vary the fraction of Freebase facts made available in training. In the curve they report, FSL exceeds both R15-Joint and plain matrix factorization when given more than 7.5% of the Freebase training facts. As direct observations return, the ranking term can use them to distinguish plausible from less plausible pairs for the structured relation, while the rule term still carries information from textual patterns. The authors attribute the relative improvement to the lifted formulation’s compatibility with Bayesian Personalized Ranking. The comparison changes the rule implementation and the training criterion together, so the attribution explains their interpretation of the curve.
The zero-shot experiment and the screened WordNet experiment test different routes for external knowledge. The hand-picked rules make some structured relations conclusions of implications, so they can provide direct guidance when Freebase supervision is missing. The screened rules affect Freebase predictions indirectly by changing the textual representation. The zero-shot result therefore speaks to the value of rules that directly target a missing label. The main benchmark result shows that improvement is also possible when only the textual patterns appear in the rules.
Runtime as the rule set grows
The timing experiment runs training on a single 2.4GHz CPU core. It compares FS with two FSL settings, one using the screened WordNet rules and the other using the full set of generated candidates. In this experiment, all rule penalties are included in every training batch. The additional work of using more rules therefore appears directly in the measured time per epoch.
Mean training time per epoch on the New York Times dataset
Evaluating the full candidate rule set adds little time over evaluating the screened set.
The numbers
| System or setting | Seconds per epoch |
|---|---|
| FS, no rules | 6.33 |
| FSL, screened WordNet rules (this paper) | 6.76 |
| FSL, unfiltered WordNet rules | 6.97 |
The authors measure 6.33s per epoch with FS. The lifted predictor takes 6.76s with the 36 screened rules and 6.97s with the 427 unfiltered candidates. The paper reports a 3% increase in computation time when moving from the screened set to the unfiltered set in this setup. The time measurement supports the claim that evaluating the coordinate penalties is inexpensive relative to ordinary fact training at the scale tested.
The unfiltered setting serves a timing purpose. The accuracy results for WordNet injection come from the manually screened rules. The runtime of the larger set establishes that the computation can handle the extra candidates with modest per-epoch cost. Whether injecting those extra candidates would help prediction is a separate empirical question.
What the ablations show
The tuple restriction has an effect before rules enter
The comparison between F and FS asks whether the new tuple space harms prediction. Both learn from the facts without a rule penalty. F uses unconstrained tuple vectors, and FS obtains its scoring vectors through the sigmoid. On the New York Times test relations, weighted MAP goes from 0.65 in F to 0.67 in FS. The restriction therefore proves compatible with effective rankings in this setup and gives an empirical improvement over the authors’ unconstrained reimplementation.
The result suggests a regularization effect. An unconstrained tuple coordinate can contribute with either sign and can grow in magnitude, subject to the parameter penalty. A sigmoid coordinate has a bounded, positive contribution as a weight on the relation vector. That reduces the ways an individual pair can adjust its scores to fit the training observations. If the resulting representation captures patterns shared among pairs, the constraint can favor rankings that transfer better to held-out facts.
The authors inspect the textual patterns with the largest values in a sampled coordinate to get a sense of what this change does. In the restricted system, the displayed group includes several patterns involving return, together with patterns involving leave and quit. They interpret the grouping as more cluster-like than in F and propose that the tuple vectors may behave as collections of attributes indicating which groups of relations apply. A sampled coordinate illustrates a possible organization of the space. The held-out ranking comparison supplies the quantitative evidence for the restriction’s benefit.
This ablation changes the parameterization as well as the set of permitted scoring vectors. In FS, gradients pass through a sigmoid, and the magnitude regularization applies to the parameters feeding it. Thus the comparison assesses the whole restricted formulation. It leaves open how much of the observed gain comes from nonnegativity, the upper bound on coordinate values, or the optimization behavior of the transformation.
The rules add something beyond the restriction
The comparison of FS with FSL retains the sigmoid tuple representation and adds the penalty for the screened WordNet implications. Weighted MAP rises from 0.67 to 0.69 on the New York Times test relations. The comparison shows that the rule-bearing predictor’s advantage over F includes a gain beyond the change in the tuple space. It also establishes that the main result can occur without placing a test relation directly on the conclusion side of a rule.
This supports a specific account of the effect of sharing. Two textual vectors can be pushed into the required order, altering how they fit the pairs observed with those patterns. The pair representations are also used by the Freebase relations. The measured improvement is consistent with the predictor acquiring more useful textual evidence for some of the structured rankings. That account leaves individual paths of influence undetermined. For a single test relation, the reported results reveal the net effect of fitting the entire system with the rule set.
The visual inspection examines columns for the textual relations involved in the screened rules. The authors arrange the relation embeddings by their sum of absolute coordinate values and display their coordinates. In FSL the values appear more strongly positive or negative. They also report a clearer division between vectors that are predominantly negative and more specific and vectors that are predominantly positive and more general. This qualitative pattern fits the expected effect of placing the narrower relations below broader ones.
That visualization compares F with FSL. Both the tuple transformation and the rule penalty differ across those settings. The linear order imposed by the rules gives a reason to expect the separation, while the picture reflects the joint change in the fitted system. The FS-to-FSL accuracy comparison and the direct directional analysis address different aspects of the rule term more closely.
Direction is visible in the inferred scores
The direction test goes back to the observations for each WordNet rule. The authors take tuples observed with the premise and ask how highly the predictor scores the conclusion for them. They also take tuples observed with the conclusion and ask how highly it scores the premise for those tuples. The first cross-score is associated with applying the supplied rule. The second measures the analogous inference in the reverse direction.
For easier comparison, the authors pass the scores through a sigmoid. This displays them on the unit interval and preserves the order of the scores on which it acts. The predictor’s training objective uses relative rankings, so the transformed values are reported as scores. Their location on the unit interval alone supplies no calibration against a set of verified outcomes.
Mean cross-relation sigmoid score across the screened New York Times WordNet rules
Rule injection separates forward inferences from reverse inferences much more clearly.
The numbers
| System or setting | Mean sigmoid score |
|---|---|
| FS, forward inference | 0.74 |
| FSL, forward inference (this paper) | 0.95 |
Across the 36 rules, the reported mean forward score is 0.74 for FS and 0.95 for FSL. The mean reverse score is 0.70 for FS and 0.28 for FSL. A higher score is desired in the forward comparison shown in the chart. The reverse means supply the other half of the result, because high scores in both directions could reflect similarity without distinguishing the premise from its conclusion.
The example involving father and parent makes the direction change concrete. In FS, the average forward score is 0.72 and the average reverse score is 0.89. The data alone lead this test to favor the reverse direction. With rule injection, the averages become 0.96 in the intended direction and 0.00 in reverse. This is evidence that the rule contributes information absent from the symmetry of the learned association in the rule-free setting.
Other examples show why the diagnostic has two dimensions. For the patterns involving daily and newspaper, FSL reports a forward average of 0.98 and a reverse average of 0.79. The authors interpret this as a case where the relations are close to equivalent, so the reverse match remains strong. For the patterns involving ambassador and diplomat, the forward average is 0.31 and the reverse average is 0.05. That pair shows the intended asymmetry while both averages remain low. Directional success and a strong absolute score are distinct outcomes.
The two cross-scores use tuples selected from different observed facts. They show how the predictor treats these groups under forward and reverse matching. The mathematical property concerns the scores of both relations on the same tuple. Assessing each learned coordinate or checking both scores on a fixed set of tuples would address that property directly. The reported test instead asks whether the injected direction is apparent in the scores of inferred facts, which is closer to one practical use of the rules.
Limitations
Limits identified by the authors
The paper’s formal treatment covers implications between relations that apply to the same tuple. Extending lifting to formulas with conjunction, disjunction, or negation is left for future work. This boundary comes from the derivation. It relies on writing a score difference against a common non-negative vector, so the difference reduces to a comparison between relation coordinates. Several premises, distinct arguments, or a more involved conclusion would require a new account of which representation constraints suffice.
The paper develops and tests the method with matrix factorization and dot-product scoring. The authors propose incorporating the ideas into other neural methods, and they discuss a teacher-based rule-training framework as a possible point of connection. The guarantee depends on the way the score uses the two representations. Applying the same coordinate penalty in a different architecture would require a score function that respects the prescribed order, or a new proof tailored to that architecture.
The authors also distinguish broader logical coverage from advantages for this narrower rule type. Their earlier comparison method handles more general formulas through grounding and uses a probability approximation that assumes independence between the constituent facts. Lifted rule injection can handle dependence for its prescribed score inequalities. It does so without specifying a general probability for complex logical formulas. The gain concerns a particular way of expressing an implication among scored facts.
Limits of the guarantee and the evaluation
The all-tuples result is conditional on the learned relation order. Given ordered relation coordinates and a non-negative vector, the dot-product inequality follows even for a fact absent during training. FSL encourages the order with a loss weighted against reconstruction and parameter regularization. A particular fitted system can retain violations if satisfying a rule conflicts with the other training terms. The direction experiment shows a change in average behavior, with the exact guarantee applying wherever the ordering conditions are attained.
An unseen fact can involve a known tuple paired with a relation for which it has no training observation. That is a natural case for this form of matrix factorization. A completely new tuple presents an additional representation problem. The proof covers any non-negative vector supplied for it, while the training setup gives learned tuple parameters to tuples in the observed data. The paper does not establish a procedure for constructing useful vectors for entirely new pairs or for new entities. Its zero-shot experiment removes Freebase supervision while preserving textual training evidence, so it tests transfer to structured relations through representations that can still be learned from the corpus.
The order also concerns compatibility scores. A higher score for the conclusion guarantees how the two scores compare. Turning that comparison into an assertion of truth would require a compatible decision rule. Independent thresholds for different relations, for example, could yield different acceptance decisions even when the scores have the required order. The paper’s main evaluation is about ranking candidate facts, and its sigmoid diagnostic is about relative scores. The strength of those results lies in the ranking and direction they measure.
The benchmark evidence for the tuple restriction is similarly specific. The FS result supports the authors’ claim that restricting tuple vectors can improve generalization on this task. It leaves open which rankings would require the extra flexibility of unrestricted vectors in other settings. The experiment also combines nonnegativity with bounded coordinates and a different parameterization, so it cannot identify the contribution of any one of those properties. The observations about attribute-like coordinates give a possible explanation for the result, with the comparison of rankings serving as the direct test.
The accuracy evidence for lexical rules uses the manually screened subset. The fact that both textual patterns occur in the corpus gives the candidate rule two usable endpoints, but occurrence alone leaves questions of meaning, context, and argument roles. The screening step is part of how the authors obtained rules suited to their experiment. The timing result for the full candidate set leaves its accuracy and directional behavior open. Also, the success of the screened set on the New York Times benchmark does not establish how readily the same selection procedure would supply useful rules for other corpora or domains.
The reported runtime is per epoch on the stated CPU configuration. It captures the cost of evaluating larger lifted rule sets with all their terms present in each batch. Total time to reach a chosen quality level also depends on how training progresses, and the timing figures do not answer that question. Similarly, the qualitative plots and the aggregate directional scores characterize the fitted representations in this experiment. They leave room for variation across rules, as the individual examples already show.
Finally, the few-fact comparison with R15-Joint supports the usefulness of the whole lifted setup in that regime. The authors’ explanation emphasizes the ranking objective. Since the systems use different objectives and different ways of representing rule satisfaction, the experiment does not isolate a causal contribution from the ranking loss alone. The exact zero-shot result and the curve with additional facts show where the systems perform differently, while the ablation among F, FS, and FSL gives the cleaner comparison for the effect of the screened rules.
What came after
The paper’s subsequent citations place it in discussions of knowledge graphs, differentiable proving, and the relationship between statistical learning and symbolic rules. These are different perspectives on the same design question. An implication can be applied when answering a particular query, or it can shape a learned representation during training. Lifted rule injection demonstrates the latter option for same-tuple implications. The later works can be situated alongside it by the questions their titles and scope identify.
The 2017 work on differentiable proving provides the closest point of comparison to the paper’s proposed extension beyond matrix factorization. Workshop research on using neural theorem provers to learn inference over knowledge bases is already cited in the earlier paper. The later work’s focus on end-to-end differentiable proving places the connection between rules and learned representations in a proving setting. In lifted rule injection, the principal operation is a relation comparison during training, whose effect can then be read out by scoring a pair. In a proving setting, the question concerns how the process of establishing a goal fits into differentiable learning. The citation connects those research directions. The choice of how a prover implements an implication is a separate question from the coordinate order established in the 2016 paper. End-to-End Differentiable Proving
The 2020 work on knowledge graphs places the paper in a wider setting where relations are represented and missing facts are inferred. One connection is the distinction between the facts recorded in a graph and the textual evidence used to rank candidate additions. Demeester and colleagues put structured labels and textual patterns in a common space, then show that an order imposed among patterns can affect predictions for the graph. That gives the broader discussion a concrete example of background knowledge entering during representation learning and influencing completion through the fitted scores. Knowledge Graphs
The 2021 survey on statistical relational and neurosymbolic artificial intelligence gives the paper a wider methodological context. The rule has a symbolic form and a declared direction. The predictor learns continuous vectors from observations. The link between those parts is a differentiable training penalty with a condition under which it enforces a symbolic implication at the score level. That combination illustrates one way to carry a first-order statement into a statistical relational system while preserving a precise account of what the statement constrains. From Statistical Relational to Neurosymbolic Artificial Intelligence: a Survey
Cite
Cite as Thomas Demeester, Tim Rocktäschel and Sebastian Riedel. 2016. Lifted Rule Injection for Relation Embeddings. Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{demeester2016lifted,
title = {{Lifted Rule Injection for Relation Embeddings}},
author = {Thomas Demeester, Tim Rocktäschel and Sebastian Riedel},
booktitle = {Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing},
year = {2016},
doi = {10.18653/v1/d16-1146},
url = {https://doi.org/10.18653/v1/d16-1146}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/demeester-2016-lifted-rule-injection-relation-embeddings/