Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules
Paper · 2022 · Shengda Fan, Shasha Mo and Jianwei Niu
Summary
A document can make a relationship clear without putting all the relevant information in one sentence. It can also state some relationships directly and leave others for the reader to infer. Document-level relation extraction turns this kind of text into facts about named entities, such as who is married to whom or who is whose child. It is a form of information extraction. The paper asks whether extraction improves when a system accounts explicitly for how its answers about different entity pairs fit together.
The authors introduce MILR, a framework that learns rules from the relationships already annotated in a training collection. If the annotations repeatedly say that one person is another’s child whenever they record the parent relationship in the opposite direction, MILR can retain that pattern as a rule. The framework uses its rules twice. During training, an added loss penalizes scores that give a rule’s premises strong support while giving its conclusion too little. At prediction time, an integer program chooses which relationships to report across a document. It can add a conclusion that independent predictions would miss or withdraw a doubtful premise that would otherwise force a weak conclusion. Neither stage adds trainable parameters to the underlying extractor.
On the DWIE test split, the strongest extractor in the study, ATLOP, scores 75.13% F1 on its own and 76.51% with MILR. Its test Logic score, which checks predictions against separate human-written rules, rises from 88.62% to 93.16%. On the relabeled DocRED test split, ATLOP reaches 44.72% F1 with MILR, compared with 41.95% on its own and 42.73% with LogiRE, the earlier rule-based approach. The reported comparisons favor MILR across the backbones tested. On DWIE, removing either the training penalty or the global prediction stage lowers extraction scores relative to the full framework.
The findings depend on which relationships the training annotations capture. A missing annotation can make a useful rule look unreliable, and the final optimizer still relies on the extractor’s scores. MILR’s advance is to make the relationships among predictions explicit and give them a role in both learning and the final decision. The experiments measure the value of that design on the paper’s benchmarks, with additional computation at prediction time.
Deep dive: Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules
MILR mines logical rules from annotated documents and uses them in training and prediction to improve document-level relation extraction. · about 35 minutes to read
The problem and its context
A document contains several decisions about the same entities
Imagine reading the passage the authors use to introduce the task. Chusovitina is Alisher’s mother. The passage describes her moving with her husband, Bakhodir Kurpanov, and their son. The extraction task treats the people as entities and asks for the relationships the document supports between them. The relevant outputs include a spouse relation and parent or child relations. They also include a connection between Bakhodir and Alisher that the paper’s example extractor misses. An extractor can be right about the marriage and about Chusovitina’s relationship to Alisher while leaving the family structure incomplete.
An entity in this task is the person or other referent that the document talks about. A mention is an occurrence in the text that refers to that entity. The distinction matters because a document can refer to the same person in several places. The prediction concerns the pair of entities across the document. Mentions supply the evidence, and several mentions can contribute to one prediction. The paper formulates its task with the document’s named entities already available. The decision under study is which relation labels to attach to their pairs.
Each fact has a head entity, a relation, and a tail entity. The terms head and tail identify the places the entities occupy in the relationship. Reversing them can change the meaning. The assertion that Chusovitina is Alisher’s parent corresponds to an assertion with the child label when Alisher comes first. With the spouse label, the same relationship is expected in both directions. The paper’s example therefore involves several kinds of dependency even before it combines the marriage claim with a parent claim. A system can recognize a fact under one ordering and miss its counterpart under the other.
A rule can also connect facts about different pairs. The family example includes a pattern in which a spouse relation and a parent relation together support another parent relation. The middle person links the premises, while the conclusion connects the people at the ends. That is the kind of pattern that lets an extractor draw on relationships it has already identified, even when the words supporting the final pair are far apart. A use of the resulting facts is the construction of a knowledge graph, where such related assertions can be queried together. The authors also point to question answering as an application.
The family pattern also illustrates why the quality of the premises matters. An implication can guide the extractor only as well as the rule and the specific facts that activate it. A correct marriage prediction might be useful evidence in combination with a correct parent prediction. A mistaken marriage prediction could instead support a mistaken family connection. The design problem involves deciding when to fill in a missing fact and when to reconsider the apparent facts that led to it.
What earlier approaches tried to learn
The paper describes most previous work on document-level extraction as an effort to improve the representations from which the relationships are predicted. Attention can help an extractor use relevant parts of a document when scoring a pair. Graph-based approaches provide ways to pass information among connected elements of the document. Pretrained encoders supply contextual representations that can be used by the extraction system. With these approaches, information from one mention or entity can influence a prediction about another through the features the system learns. The degree to which the learned scores follow any particular relation rule is a separate question.
Some of the earlier graph-based work addressed the difficulty of looking beyond a sentence directly. The authors cite approaches based on graph LSTMs and document-level graph convolution, as well as an edge-oriented graph approach and the double-graph work behind GAIN. These are examples of building document structure into the machinery that produces the scores. MILR begins at the point where an extractor already has scores for candidate relationships. That choice explains why the authors can evaluate the same framework with different ways of representing a document. Document-level graph convolution · Edge-oriented graph extraction · Double Graph Based Reasoning
Earlier work also addressed the abundance of pairs with no annotated relation. If most candidate pairs lack a positive label, a system needs a way to decide when its evidence is strong enough to report a fact. The paper distinguishes a shared classification cutoff from adaptive thresholding, where the effective cutoff can depend on the prediction being made. This line of work changes how scores become labels, as well as the loss used to learn those scores in some systems. A threshold can account for how strong the evidence for a particular atom is. The extra question MILR asks is how that decision should interact with decisions about other atoms.
The authors situate their work alongside earlier uses of logic in neural systems and information extraction. These include work on rules for relation embeddings, rules for clinical temporal extraction, and methods that combine neural learning with logical constraints. In the extraction examples discussed alongside MILR, the rules were supplied by hand. MILR addresses the case where the training collection contains annotated relationships and no designated training inventory of rules. The annotated facts are the material from which the rules must be recovered. Logic rules in neural networks · Lifted Rule Injection · Clinical Temporal Relation Extraction
The closest comparison is about where rules enter
The nearest predecessor in the paper’s account is LogiRE. It learns rules from the outputs of an already trained extractor and uses additional trainable components to reason with them. The sequence of operations matters. In the published implementation that Fan and colleagues evaluate, the extractor has finished its own training before the rule-based components learn to use its outputs. The paper notes that joint optimization is possible in principle for LogiRE. The implemented version is the one the comparison addresses.
That separation creates a particular dependency on the initial scores. A high score can place a proposed fact on a path that supports another proposed fact. If the initial score is misleading, reasoning along the path can spread its effect. The authors propose putting rule information into the extractor’s training objective and giving the inference procedure a choice about which facts to keep in a path. Both changes work at the level of relationships. A rule expresses an identifiable pattern across scores or labels, so its effect can be examined separately from the features that led the extractor to score those labels in the first place.
The method, step by step
From annotated facts to coordinated predictions
MILR has a rule mining stage, a training stage, and an inference stage. Rule mining searches the training annotations for repeated patterns. A rule survives that search if its observed confidence meets a cutoff. During training, the retained rules encourage the extractor to assign compatible probabilities to premises and conclusions. During inference, an initial set of predictions identifies where rules are likely to matter. An optimizer then makes final choices using those rule instances and the extractor’s original scores.
The stages use different kinds of evidence. The miner counts occurrences in human annotations. The training loss uses the probabilities that the extractor currently assigns as it learns. The inference procedure works with possible binary decisions about what to report. Keeping these roles distinct helps explain why the paper uses confidence in several places but does not impose the same mathematical condition throughout. The miner estimates an empirical regularity, the loss expresses that regularity as a soft preference, and the optimizer imposes selected implications on the final labels.
How MILR learns rules and applies them
The steps in order.
The entities, labels, and starting scores
The document is denoted by d, and n is the number of named entities it contains. The entity at position i in that collection is eᵢ. The indices h and t pick the head and tail of an ordered pair, and the task considers pairs whose indices differ. The set ℛ contains the pre-defined relation labels. The paper also distinguishes NA, the case where there is no relation. An atom is the proposition that a given label holds between a head and a tail. Its truth value is 1 when the fact holds and 0 otherwise.
The underlying extractor, which the paper calls the backbone, assigns a logit to each candidate atom. A logit is a score before conversion to a probability. The method begins with the usual conversion.
P(r | eₕ, eₜ) = σ(Fᵣ(eₕ, eₜ))
Here r is a relation in ℛ, eₕ is the head entity, and eₜ is the tail entity. F denotes the backbone, and Fᵣ(eₕ, eₜ) is its logit for that atom. The function σ is the sigmoid, which maps the score to a probability value. P(r | eₕ, eₜ) is the resulting probability assigned to the relation for that pair. The vertical bar separates the relation being scored from the entities on which the score is conditioned.
The backbone ordinarily turns such a score into a prediction by checking its cutoff. MILR retains this operation to form the preliminary labels used during global inference.
Iᵣ(eₕ, eₜ) = 𝟙(P(r | eₕ, eₜ) > THᵣ(eₕ, eₜ))
Iᵣ(eₕ, eₜ) is the predicted binary label for relation r with head eₕ and tail eₜ. The indicator function 𝟙 returns 1 when the condition in parentheses is true and 0 when it is false. P is the probability produced by the sigmoid. THᵣ(eₕ, eₜ) is the threshold applicable to this atom, and > makes the comparison strict. The notation accommodates a cutoff shared across atoms and a cutoff that depends on the atom. The basic decision uses the score and threshold for the atom under consideration.
What counts as a rule
A candidate rule is built around a path of relation labels. Its body consists of the atoms along that path. Its head is the proposed relation between the path’s endpoints. When the body holds for particular entities, the rule proposes that the head hold for those same endpoints. The authors use this template.
r_head(v₀, vℓ) ← r₀(v₀, v₁) ∧ ⋯ ∧ r_(ℓ−1)(v_(ℓ−1), vℓ)
ℓ is the length of the rule, counted in body atoms. The v symbols with subscripts from 0 through ℓ are entity variables. A variable can be assigned a specific entity when the rule is used. r_head is the conclusion’s relation label. The indexed r symbols on the right are the relation labels along the body, ending with r_(ℓ−1). The subscripts in parentheses indicate indices, and ⋯ stands for the intervening atoms. The conjunction ∧ says that the body atoms must all hold. The arrow ← reads from the premises on its right to the conclusion on its left.
The labels in these rules come from an expanded inventory. For each original relation r, there is also a reverse form r⁻¹. A step written with r⁻¹ from one entity to another means a step with r back in the other direction. This lets the miner follow a path whose directions vary even though the rule template writes every body step in sequence. It also lets a rule refer to a reversed relation when there is no separate original label for it. The reverse form reuses the underlying atom. A rule about the symmetry of a named relation is a further claim about how the original label behaves.
To instantiate a rule is to replace its variables with entities in a document. The authors write ϕ(R) for such an instance of a rule R. If the instantiated premises all hold, the paper calls that instance a prediction drawn from the rule. During mining, the annotations decide which premises hold. Later, the algorithm will also use this operation with preliminary predicted facts to find instances worth constraining. A template can have no applications in a collection if its premises never occur together there.
Rules represent several different structures. A body with one atom can express that a parent label goes with a child label when the positions are exchanged. It can also support a symmetric relation, where the same original label applies under the opposite ordering. A longer body can connect entities through an intermediate entity, as in the family example. The identity of the middle entity is essential: it has to be the same in both premises for that composition to apply.
Estimating confidence from annotations
The miner evaluates candidate rules on the training annotations. It counts an application as supported when all the premises and the conclusion appear there. When the premises appear and the conclusion is absent, it counts a counterexample. This is the closed-world assumption. For the purposes of mining, an unannotated conclusion is treated as false. That makes the calculation possible without a separate collection of explicit negative facts.
conf = support(R) / (support(R) + counter(R))
R is the rule being scored. support(R) counts its true predictions in the training set, and counter(R) counts its false predictions under the closed-world convention. Their sum counts the instances in which all premises are annotated. The slash denotes division. The resulting conf is the observed fraction of those instances whose conclusion is also annotated. The paper assigns confidence 0 if the premises yield no applications.
The rule miner takes the training annotations, the expanded relation inventory, a maximum length maxL, and a minimum confidence minC. It enumerates body lengths up to maxL. For each length, it tries combinations of a head label and the labels at the successive body positions. It computes the confidence from the annotations and retains the candidate and its confidence when the candidate meets the cutoff in the algorithm. The chosen rule lengths in the experiments are limited by maxL = 2. The settings list 0.98 or 0.7 for minC, depending on the backbone.
The conditional frequency is a measure of how reliably a head accompanies a body in the annotated collection. It answers a different question from how common the head relation is overall. It can be high for an uncommon relation if the relevant premises reliably accompany that relation on the occasions when they occur. The filter also depends on the directional arrangement of the labels. Switching which facts are premises and which fact is the conclusion changes which instances count toward confidence.
The rule templates and their confidence values are then available to the next stages. No annotated inventory of rules has to be fitted to the extractor. DWIE does supply handwritten rules, but the authors reserve them for comparison with mined rules and for scoring logical consistency. The distinction is important because the reported Logic metric examines agreement with a rule set that the training and inference stages did not receive.
Training with a soft constraint
A logical implication is easiest to state with binary facts. The backbone is trained through probabilities, so MILR needs a condition that expresses the implication before those probabilities become final decisions. The authors multiply the predicted probabilities of the premises to obtain a soft measure of how strongly the whole body holds. They scale that product by the rule’s confidence and a factor that depends on its length. The scaled product sets the desired lower bound for the head probability.
P(r_head | v₀, vℓ) ≥ conf · ηℓ · ∏[i=0 to ℓ−1] P(rᵢ | vᵢ, vᵢ₊₁)
P is the backbone’s probability for the specified relation and pair. On the left, r_head connects the endpoint variables v₀ and vℓ. On the right, ∏ means to multiply the body probabilities over index i, starting at 0 and ending at ℓ−1. Each rᵢ connects adjacent variables vᵢ and vᵢ₊₁. The symbol · denotes multiplication. conf is the mined confidence, and ηℓ is the length-dependent slack factor in the interval [0, 1]. The symbol ≥ makes the right side a lower bound. To evaluate the condition, entities are substituted for the variables.
For a reverse label, the probability comes from swapping the entities in the original relation’s probability.
P(r⁻¹ | vᵢ, vᵢ₊₁) = P(r | vᵢ₊₁, vᵢ)
r⁻¹ denotes the reverse form of the original relation r. vᵢ and vᵢ₊₁ are the adjacent entity variables at body position i. The P on each side refers to the same probability function. The equality defines the reverse score by reading the original score in the opposite direction.
If the premises are all strongly supported and the rule is reliable, the lower bound is demanding. A weak premise reduces the product. A lower rule confidence or a smaller slack factor reduces the bound as well. The product is the paper’s chosen soft conjunction. It can be calculated from the individual probabilities supplied by the extractor. The condition places a floor under the head probability while leaving room for other evidence to make it higher, such as text that directly supports the head or a different rule with the same conclusion.
The consistency loss adds up violations in logarithmic form. For a particular instance, the authors compare the log of the lower bound with the log of the head probability. A violation contributes only when the former exceeds the latter.
L_cns = ∑[R ∈ rules] ∑[eᵢ ∈ d] max(0, log(ηℓ · conf) + ∑[i=0 to ℓ−1] log P(rᵢ | eᵢ, eᵢ₊₁) − log P(r_head | e₀, eℓ))
L_cns is the consistency loss of document d. The first ∑ goes over rules R in the mined inventory rules, and ∈ denotes membership. The second sum ranges over the entity assignments in d that instantiate the variables of the chosen rule. The inner sum goes over its ℓ body atoms, with i indexing their positions and eᵢ and eᵢ₊₁ denoting the corresponding document entities. rᵢ is the relation at that position, and r_head connects endpoint entities e₀ and eℓ. P supplies the predicted probabilities. ηℓ and conf scale the body product, and log takes a logarithm. The subtraction − compares the log head probability with the log of the scaled body product. The function max selects the larger of 0 and that violation.
A satisfied inequality contributes zero. If the conclusion probability is too low for the current premise scores, the penalty depends on the gap between the quantities in log space. During learning, that penalty can act through the score of the head or through the scores of the premises. The individual labels still supply supervision through the backbone’s classification loss. The relevant question for training is how to fit that supervision while reducing the tensions among scores that a rule exposes.
L = L_cls + λ · L_cns
L is the combined training objective. L_cls is the backbone’s existing classification loss, such as binary cross-entropy or adaptive thresholding loss. L_cns is the consistency loss, and λ is the hyper-parameter that weights its contribution. The multiplication · scales the penalty before the two losses are added.
The rule loss can therefore be attached to a system with a different encoder or classification loss without replacing either. Its inputs are the probabilities for document atoms and the retained rules. This is also where MILR differs from using rules exclusively after training. The classification and consistency losses act on the same backbone during optimization, so the scores passed on to the inference stage already reflect the training penalty.
Recasting thresholding as an optimization problem
Probabilities can satisfy the soft rule condition and still produce a violation when turned into binary decisions. A head can be strong enough for the soft inequality and fall below its classification cutoff. Several body atoms can individually clear their own cutoffs. The result is a discrete assignment that accepts the premises and rejects the conclusion. MILR addresses this possibility by making the last decision an optimization over labels for the document.
The authors first rewrite the backbone’s scores relative to their thresholds.
gᵣ(eₕ, eₜ) = σ(Fᵣ(eₕ, eₜ) − σ⁻¹(THᵣ(eₕ, eₜ)))
gᵣ(eₕ, eₜ) is the threshold-adjusted score for relation r between head eₕ and tail eₜ. Fᵣ(eₕ, eₜ) is its raw logit, and THᵣ(eₕ, eₜ) is its probability cutoff. The inverse sigmoid σ⁻¹ puts the cutoff on the logit scale. The subtraction − measures the logit relative to that cutoff, and the sigmoid σ maps the result back to a probability scale. At the cutoff, the adjusted score is 0.5, the value of the sigmoid at 0.
The paper’s starting objective gives each possible binary decision a cost. In this expression the adjusted scores are fixed, and the labels are the quantities to be chosen.
min over Iᵣ(eₕ, eₜ) ∈ {0, 1} −∑[h ≠ t] ∑[r ∈ ℛ] (Iᵣ(eₕ, eₜ) log gᵣ(eₕ, eₜ) + (1 − Iᵣ(eₕ, eₜ)) log(1 − gᵣ(eₕ, eₜ)))
min asks for the lowest objective value over all binary assignments. Iᵣ(eₕ, eₜ) is the decision variable for the atom with relation r, head eₕ, and tail eₜ. The braces give its allowed values 0 and 1. The sums range over distinct entity indices h and t, indicated by ≠, and over labels r in the original relation inventory ℛ. gᵣ is the adjusted score, and log is the logarithm. With Iᵣ set to 1, the first term inside the parentheses determines the cost. With Iᵣ set to 0, the second term does. The negative sign in front of the sums turns the log terms into costs to minimize.
The proof in the paper’s appendix relies on separability. Before any rule constraints are imposed, the terms for different atoms do not share decision variables. The objective for an individual atom is therefore enough to recover thresholding.
min over Iᵣ′(eₕ′, eₜ′) ∈ {0, 1} −Iᵣ′(eₕ′, eₜ′) log gᵣ′(eₕ′, eₜ′) − (1 − Iᵣ′(eₕ′, eₜ′)) log(1 − gᵣ′(eₕ′, eₜ′))
The primes identify an arbitrary fixed relation r′ and fixed, distinct head and tail indices h′ and t′. eₕ′ and eₜ′ are those entities. Iᵣ′ is this atom’s decision, and gᵣ′ is its adjusted score. The min ranges over the binary choices in braces. Each log term gives the cost contribution of one choice under the same convention as the summed objective.
I*ᵣ′(eₕ′, eₜ′) = 0 if 2gᵣ′(eₕ′, eₜ′) ≤ 1; 1 if 2gᵣ′(eₕ′, eₜ′) > 1
I*ᵣ′ denotes an optimal label for the chosen atom. gᵣ′ is the threshold-adjusted score, and 2gᵣ′ doubles it. The inequalities ≤ and > distinguish scores at or below the midpoint from those above it. At equality the two decisions have equal cost, and the displayed solution chooses 0, as strict thresholding does.
I*ᵣ′(eₕ′, eₜ′) = 0 if P(r′ | eₕ′, eₜ′) ≤ THᵣ′(eₕ′, eₜ′); 1 if P(r′ | eₕ′, eₜ′) > THᵣ′(eₕ′, eₜ′)
P is the original sigmoid probability and THᵣ′ is the threshold for relation r′ and the selected ordered pair. The asterisk denotes an optimum, and the inequality signs again give the two branches. Because the sigmoid is increasing, the comparison of the adjusted score with its midpoint is equivalent to comparing the original probability with the threshold. Taking this solution for every atom solves the objective before the addition of rule constraints.
Adding implications to the final decision
Global inference begins when the atom decisions are coupled. The optimization requires reverse labels to refer to the same decisions as their originals with the entity order swapped.
Iᵣ⁻¹(eₕ, eₜ) = Iᵣ(eₜ, eₕ)
Iᵣ⁻¹ is the decision for the reverse label of r on the pair with head eₕ and tail eₜ. Iᵣ on the right is the decision for the original label on the reversed pair. The equality ensures that both expressions refer to the same fact. It applies to the reverse labels introduced by expanding the original relation inventory.
The rule constraint then requires the head to be accepted whenever all the body atoms are accepted.
∑[i=0 to ℓ−1] Iᵣᵢ(eᵢ, eᵢ₊₁) − ℓ + 1 ≤ I_r_head(e₀, eℓ)
The sum counts the accepted body atoms in a rule instance of length ℓ. The index i runs over the premises, rᵢ is the relation at that position, and eᵢ and eᵢ₊₁ are the two entities in that body atom. I_r_head(e₀, eℓ) is the binary decision for the head relation between the endpoints. The adjustment − ℓ + 1 makes the left side equal to 1 when all body atoms are accepted. If any premise is rejected, the left side is at most 0, so the inequality ≤ allows either value for the head.
The mathematical consequence is that the optimizer has more than one way to resolve an apparent violation. It can accept the conclusion, preserving all the premises. It can also reject a premise, in which case that rule instance no longer requires the conclusion. Scores determine their respective costs. Since an atom can participate in several rule instances, a change can have consequences beyond the first rule that drew attention to it. This is where the procedure differs from treating each supplied premise as a settled fact and adding every conclusion it supports.
In the full formulation the constraints cover all rule instantiations in the document. The paper points to branch and bound and to a solver such as Gurobi as ways to solve the binary program. For the experiments, it prefers a smaller set of constraints. It starts with the labels obtained from independent thresholds and treats those provisional labels as facts while finding rule applications. It then imposes the implication only for instances whose premises all appear in those labels. The decisions about those atoms are still open in the optimizer.
The practical reason for this selection is that most entity pairs have no relation. Enumerating all assignments of entities to rule positions generates many constraints even where there is little initial evidence for the body. The simplified procedure identifies a much smaller set of places where the initial output would activate a rule, whether or not its head already holds. It is an approximation to the full constraint set. A body that becomes true as a result of a revision can have been absent from the initial selection.
The authors also modify the objective to account for the prevalence of negative predictions and the different frequencies of relation labels. The final objective is the following.
min over Iᵣ(eₕ, eₜ) ∈ {0, 1} −∑[h ≠ t] ∑[r ∈ ℛ] (Iᵣ(eₕ, eₜ) · log gᵣ(eₕ, eₜ) + (1 − Iᵣ(eₕ, eₜ)) · τ · (−log pᵣ)^k · log(1 − gᵣ(eₕ, eₜ)))
Iᵣ is the binary decision being optimized, and gᵣ is the fixed threshold-adjusted score. The sums go over distinct head and tail indices h and t and original relations r in ℛ. pᵣ is the frequency of relation r measured on the training set. τ and k are hyper-parameters, with τ multiplying the frequency factor and ^k raising the negative log frequency to the power k. The · signs indicate multiplication, and log is the logarithm. The extra factors affect the cost of choosing the negative label, where 1 − Iᵣ is 1. The positive decision keeps its original cost.
The final procedure combines this objective with the simplified constraints and the treatment of reverse relations. The rule confidence has already had a role in admitting rules and in weighting their training condition. The selected implication at inference is enforced as a binary constraint, so the optimizer pays for changing atom labels through the objective instead of choosing a graded violation of that implication. The authors make the implementation available under the name MILR.
Experiments and results
What the datasets test
DWIE is an annotated collection for document-level information extraction. It contains relation labels and a set of manually written rules used in constructing the dataset. The authors follow the earlier LogiRE preprocessing with a change that removes facts for which the head and tail are the same entity. DWIE has 602 training documents with 14,403 facts, 98 development documents with 2624 facts, and 99 test documents with 2459 facts. Training annotations support both extraction training and rule mining. The hand-written rules provide a separate way to inspect the predictions.
The authors assemble their DocRED splits around a previously relabeled portion of its development set. Earlier studies had identified missing positive facts in the original annotations. The paper keeps the original training set, with 3053 documents and 38,180 facts. It uses the remaining original development documents for development, with 904 documents and 11,109 facts. It evaluates on the 96 relabeled documents as its test split, where the revised annotations contain 3308 facts. The reported DocRED test scores therefore refer to this evaluation set and its denser relation labels.
This setup gives the two benchmarks different roles. DWIE supplies the rule set against which the authors can measure agreement with human-specified implications. Relabeled DocRED supplies a test in which more positive relations have been recorded while the training annotation source remains the original one. That arrangement is relevant to the motivation for consistency training. If an annotation omits a fact, a rule might still encourage a compatible score at training time, provided the pattern can be recovered elsewhere in the collection.
Baselines, metrics, and settings
On DWIE, the authors test LSTM, BiLSTM, GAIN, and ATLOP. The first pair gives sequence-based baselines. GAIN provides a graph-based backbone, and ATLOP provides the strongest starting extraction scores in the paper’s comparison. On DocRED the reported comparison uses GAIN and ATLOP. Each reported backbone is evaluated by itself and with the two rule-based approaches, LogiRE and MILR. The contrast is useful because the backbones differ both in how they form document representations and in how they are trained to classify relations.
The authors rerun the backbones using the recommended settings and report medians across five runs with different random seeds. GAIN and ATLOP use BERT-base-uncased. The authors note that this differs from the setup used in the LogiRE paper, so the relevant baseline scores are the ones rerun for this study. They implement the experiments in PyTorch and train on a Tesla V100 GPU. BERT · PyTorch
For the additional training loss, the paper reports a search over 1e-3, 3e-3, 5e-3, and 1e-2 for λ. For inference, the listed search values for τ are 0.5, 0.8, 1.0, and 2.0, and those for k are 0, 0.5, 1.0, 1.5, 1.8, and 2.0. The paper says it selects hyper-parameters by development F1. The appendix lists 1.5 for τ in the DocRED ATLOP setting, a value absent from the stated search list. The reported final settings are the more direct account of that run.
F1 summarizes precision and recall together. Precision asks how many reported facts agree with the annotations. Recall asks how many annotated facts the system retrieves. Ign F1 discounts facts that appear in both training and evaluation. It shows how well the extractor performs when such repeated facts are excluded from the comparison. Logic instead measures how well the output satisfies pre-defined rules. DWIE’s reference rules are held apart from MILR’s inputs, which means that improvement on Logic measures agreement with an independent rule inventory rather than simply agreement with the exact checklist given to the optimizer.
DWIE extraction and consistency
On the DWIE test split, MILR improves F1 over the plain backbone for each architecture. The ordering is also the same within each backbone’s comparison: the highest F1 is the MILR result, followed by LogiRE and then the plain extractor. The chart includes the recurrent baselines and the stronger GAIN and ATLOP comparisons. The spread between backbone families remains substantial after they receive the same kind of rule enhancement.
Test F1 with and without rule enhancement on DWIE
MILR gives the highest test F1 within every backbone group shown.
The numbers
| System or setting | F1 % |
|---|---|
| LSTM | 41.42 |
| LSTM + MILR (this paper) | 43.35 |
| BiLSTM | 43.54 |
| BiLSTM + MILR | 44.65 |
| GAIN | 67.45 |
| GAIN + LogiRE | 68.71 |
| GAIN + MILR | 69.23 |
| ATLOP | 75.13 |
| ATLOP + LogiRE | 75.67 |
| ATLOP + MILR | 76.51 |
For the recurrent test comparisons, LSTM with LogiRE scores 42.03% F1 and BiLSTM with LogiRE scores 43.95% F1. On the development split, ATLOP reaches 69.87% F1 by itself, 70.66% with LogiRE, and 72.05% with MILR. The development and test values are separate results for the same configuration. Both splits favor the addition of MILR in the reported comparisons.
The Ign F1 comparison gives a similar picture. On the DWIE test split, ATLOP has 67.29% Ign F1, LogiRE with ATLOP has 68.13%, and MILR with ATLOP has 69.84%. With GAIN on that split, the corresponding values are 61.36%, 61.58%, and 62.77%. The agreement between F1 and Ign F1 means that the favorable ordering remains after excluding facts shared between training and evaluation. The paper reports its highest DWIE test extraction scores with ATLOP and MILR.
Logic measures a different effect of adding rules. There is a larger change for some backbones that begin with lower consistency scores. The DWIE development Logic scores for BiLSTM are 52.24% on its own, 69.24% with LogiRE, and 74.62% with MILR. The corresponding development scores for ATLOP are 86.14%, 90.33%, and 94.85%. The test scores show the same ordering for ATLOP. For GAIN on the test split, LogiRE and MILR are close on Logic, even though MILR has the higher value.
Test Logic scores for GAIN and ATLOP on DWIE
Both rule-based approaches improve agreement with the reference rules, with MILR highest for each backbone.
The numbers
| System or setting | Logic % |
|---|---|
| GAIN | 86.85 |
| GAIN + LogiRE | 91.71 |
| GAIN + MILR (this paper) | 91.92 |
| ATLOP | 88.62 |
| ATLOP + LogiRE | 91.42 |
| ATLOP + MILR | 93.16 |
The Logic and F1 results answer complementary questions about the output. Higher Logic shows that more of the evaluated rule implications are satisfied. Higher F1 shows that the reported fact set agrees better with the benchmark labels. A change to an individual fact can affect both, but satisfying an implication can involve withdrawing a premise or adding a conclusion. The fact comparison is consequently needed to judge whether improved consistency comes with useful extraction decisions. On DWIE both metrics improve in the reported MILR comparisons.
Relabeled DocRED results
The DocRED comparison shows improvements in both reported extraction metrics for GAIN and ATLOP. The F1 chart uses the relabeled test split for all entries. With GAIN, the MILR score is above the scores from the plain extractor and from LogiRE with GAIN. ATLOP with MILR gives the highest F1 in the comparison. The raw scores describe performance against the revised targets on those documents.
Test F1 on the relabeled DocRED split
MILR achieves the highest F1 for both tested backbones on the relabeled documents.
The numbers
| System or setting | F1 % |
|---|---|
| GAIN | 41.68 |
| GAIN + LogiRE | 41.89 |
| GAIN + MILR (this paper) | 43.17 |
| ATLOP | 41.95 |
| ATLOP + LogiRE | 42.73 |
| ATLOP + MILR | 44.72 |
On the same DocRED test split, Ign F1 for GAIN is 41.26% alone, 41.53% with LogiRE, and 42.89% with MILR. For ATLOP, the Ign F1 scores are 41.67%, 42.47%, and 44.30%. Across the DocRED comparisons, the authors report an average MILR advantage over LogiRE of 1.60% in Ign F1 and 1.64% in F1. The paper’s explanation is that consistency regularization can help the extractor resist fitting missing positive labels as negatives. The experiment demonstrates the improvement under that training and test arrangement. It does not isolate a separate noise mechanism through a controlled change to the training labels.
What the miner found
The paper reports 90 mined rules for DWIE and 168 for DocRED. In DWIE, the miner recovers 40 of the 41 human-written rules. The missing rule would combine event_in1 and in0 into event_in0, but event_in1 does not occur in the training set. Its absence gives the miner no observed instance of the premises from which to estimate the rule. The recovery count therefore shows both how closely many annotated patterns matched the handwritten rules and how directly the method depends on the contents of the training annotations.
The DWIE examples include a rule connecting child_of to parent_of with the entities exchanged and a symmetry rule for the relation labeled vs. The compositional examples include a path from agent_of through in0 to a citizen_of conclusion, and a path from played_by through character_in to plays_in. The appendix reports a training confidence of 1.0 for each of the listed examples. They illustrate that the miner can recover direction changes and compositions using the same enumeration scheme. The displayed confidence describes the observed training instances of each specific rule.
What the ablations show
Training and inference each contribute
The main ablation holds the ATLOP backbone fixed on DWIE and removes one MILR component at a time. Removing consistency regularization leaves the rule-based inference stage. Removing global inference leaves the training penalty and returns prediction to ordinary thresholding. Plain ATLOP provides the reference without either addition. This comparison can show whether the benefit requires both components to be present or whether each can help on its own.
On the DWIE development split, the full system scores 72.05% F1 and 67.18% Ign F1. Without consistency regularization those scores are 70.27% F1 and 63.82% Ign F1. Without global inference they are 71.39% F1 and 66.74% Ign F1. Plain ATLOP has 69.87% F1 and 63.37% Ign F1. The training-only variant is better than the inference-only variant on both development measures, and global inference still adds value to the regularized system in that split.
On the DWIE test split, the full system scores 76.51% F1 and 69.84% Ign F1. The variant without the training penalty has 76.20% F1 and 68.87% Ign F1. The variant without global inference has 76.05% F1 and 69.29% Ign F1. Plain ATLOP has 75.13% F1 and 67.29% Ign F1. Test F1 favors the inference-only variant over the training-only variant, while test Ign F1 favors the training-only variant. Each component helps relative to the baseline on both test measures. The full combination leads on both measures across both splits in this ablation.
These comparisons matter because the two components operate on different decisions. Consistency regularization can change the underlying score, including whether it ends up near the threshold at all. Global inference can change the outcome after the scores have been computed. The results support keeping both available in this setting. The relative contribution of each depends on the split and metric even for the same backbone.
Distances, precision, and recall
The authors group evaluation pairs by the number of tokens between their nearest mentions. This is a measure of textual separation for a pair, since different occurrences of the entities can be at different distances. The distance analysis compares plain ATLOP with the LogiRE and MILR variants. Every system’s Ign F1 declines as the distance between mentions increases, and MILR leads in each reported distance group. For pairs in [200, 400) the paper reports a 9.00% Ign F1 enhancement with MILR, and for [400, inf) it reports 12.74%. Those numbers are the reported gains for the long-distance groups.
The pattern fits the design of the method. If nearby words supply clear evidence for a relation, the backbone can often assign that relation a useful score immediately. If the relevant names are far apart, the backbone has to use evidence distributed more widely. A relation path can express connections among entities that appear in separate parts of the document. Whether a path helps still depends on the quality of the facts supporting it and on whether the mined rules contain that pattern. The distance grouping shows where the methods differ empirically. It does not trace every improvement to a particular path.
The corresponding precision and recall analysis gives another view of the difference from LogiRE. The authors find somewhat higher recall for LogiRE and better precision for MILR. They relate this to how the systems use possible premises. LogiRE can raise the score of a missing conclusion by reasoning from the backbone’s predictions. A mistaken premise can lend support to an incorrect conclusion too. MILR’s optimizer can reject an initially reported premise when keeping it and accepting its conclusion would be more costly. That behavior offers a mechanism for preserving precision while recovering some facts missed by independent thresholding.
The case study concerns a report on a German Grand Prix involving Kimi Raikkonen and Fernando Alonso. In the authors’ analysis, the plain extractor produces correct facts supporting one rule and also a spurious fact involved in another. LogiRE adds the conclusions associated with both paths. One addition fills a gap and the other introduces a false positive. MILR fills the gap and removes the erroneous premise. The example makes clear why the authors distinguish a false negative in a rule’s head from a false positive in its body. The two errors call for different changes to the output, even though either can be involved in an apparent violation.
What is gained by limiting the constraints
The appendix compares simplified and full constraint selection with ATLOP on the DWIE development split. The comparison holds the other settings fixed. The simplified version averages 28.4 constraints across documents and takes 1.80 s/it in the reported runtime measure. The full formulation averages 4.1e+06 constraints and takes 1074 s/it. With the simplified version, the development scores are 72.05% F1 and 67.18% Ign F1. The full version reaches 72.26% F1 and 67.35% Ign F1. The comparison shows how much computation the rule-instance selection saves in that setting and records the extraction scores that go with the saving.
A separate efficiency comparison uses ATLOP to compare the additional costs of the two rule-based approaches. LogiRE introduces ∼5.8 M parameters. MILR adds no trainable parameters, with the consistency loss adding ∼2.8 minutes per training epoch. For LogiRE, the paper reports ∼104.8 minutes per iteration to train the additional components. Those timings use different units of training work, so each describes its own stage. At inference, the paper reports an overhead of ∼3.1 minutes per epoch for MILR and negligible additional time for LogiRE. The cost of learning a separate set of components and the cost of solving a document-level optimization appear at different points in the workflow.
Limitations
Limits identified by the authors
The authors’ first concern is the miner’s reliance on annotation coverage and accuracy. Under the closed-world convention, a complete body followed by an unannotated head counts against a rule. If the head is frequently omitted, an otherwise useful rule can fall below the confidence cutoff. Annotation mistakes can also make misleading patterns look reliable. These errors are consequential because the selected inventory guides both the training loss and the inference stage. The confidence score is only as informative as the observed instances from which it was estimated.
The framework also needs an external optimizer for global inference. The authors identify extra CPU use and computation time as limitations. The simplified constraint selection reduces the workload in the reported DWIE comparison, but solving the resulting program remains part of prediction. The parameter comparison records how much has to be learned and stored. The runtime comparison records work the system still has to do when it produces labels. The paper reports gains in parameter use alongside a measurable inference cost.
The authors also stress that inference depends on the quality of the backbone’s scores. An optimizer receives those scores as the evidence for keeping or rejecting atoms, and preliminary predictions determine which rule instances enter the smaller program. A wrong estimate can therefore influence both the constraints that are considered and the costs of satisfying them. The paper acknowledges that revisions can turn a correct positive label into a false negative or a correct negative decision into a false positive. Agreement with a rule can be achieved by more than one assignment, and the score-based objective can favor the wrong one.
The training setup uses a rule inventory mined before the rules are injected into the backbone. The authors see a limit in this one-way arrangement. The learned representations change in response to rule information, while the rules are obtained from the annotations in a separate mining step. The procedure does not alternate between improving the representations and revising the rules in response to what the extractor has learned. The paper names this interaction as an avenue for future work.
The authors additionally discuss privacy. Their experiments use public data that they describe as excluding private information. Document-level extraction can analyze relationships across large quantities of text, and the authors caution against applying the framework to information involving personal privacy.
Limits visible in the study design
The scope of the comparison is extraction with named entities already supplied. Its evidence concerns labeling ordered pairs from that entity inventory. The results do not measure error from finding entity mentions or determining which mentions refer to the same entity. In an end-to-end system, errors in the inventory would affect which atoms are available and which entity paths can be instantiated. This benchmark setup allows the paper to measure the rule framework’s effect on relation prediction with that earlier work held outside the task.
The rule search also has a specific expressive scope. It builds rules with a conjunctive path as the body and an endpoint relation as the head. Reverse labels expand the directional patterns it can express. The experiments cap the path length at 2, so the results establish how this restricted inventory behaves. They do not measure what happens when much longer chains are mined or when evidence has a different logical shape. Extending the length also expands the candidate search and increases the number of possible grounded constraints, which are already a substantial computational issue in the paper’s comparison.
The confidence threshold is a filter on the fraction of supporting applications. The algorithm as presented does not list a separate minimum support count. As a consequence, a confidence value alone does not say how frequently the rule was observed. A rule with sparse evidence and one with repeated evidence can reach the same fraction. DWIE’s substantial overlap with the handwritten inventory provides a check on some of the mined rules in that benchmark. It gives no direct measure of the accuracy of every additional mined pattern or of confidence calibration in a different collection.
The choice to simplify inference also narrows what a satisfying solution guarantees. The retained constraints cover rule bodies activated by the preliminary thresholded facts. The optimizer can accept a new fact that completes a body which was inactive at that preliminary step. The corresponding implication can then have no constraint in the solved program. This limitation follows from the construction of the simplified instance. The comparison with the full program measures its observed effect on extraction for the DWIE development setting. It does not establish that the simplified output satisfies every possible ground instance of the mined rules.
The error analysis distinguishes missing conclusions and incorrect premises because a violated implication can bring either to the optimizer’s attention. When the body is incomplete, the constraint leaves the head free. A spurious head can also be present even when the implication holds. The rule itself therefore supplies no direct repair for those cases. An atom can still be affected by another rule, and the frequency-adjusted objective can also alter labels. The paper’s error taxonomy describes what the implication exposes on its own, instead of a guarantee that every error of a given kind is recoverable.
Finally, the experimental comparisons establish joint benefits under the reported configurations. The main ablation changes consistency training and global inference as whole components. It gives no isolated estimate of the contribution of the frequency adjustment in the inference objective. The results on relabeled DocRED are consistent with the authors’ account that training with rules can temper the effects of missing labels, but the experiment keeps the original training annotations and does not vary their noise independently. DWIE’s Logic scores assess consistency with its reference rules, while DocRED’s reported comparison assesses extraction on its relabeled subset. These are separate tests of the method, with different evidence for the claims about consistency and robustness.
What came after
No later citing work is available for this account, so there is no documented follow-up to attribute to MILR. The paper itself leaves open whether repeated interaction between rule learning and representation learning would improve on its fixed rule inventory, and whether a faster inference procedure could retain the benefits of document-wide decisions.
Cite
Cite as Shengda Fan, Shasha Mo and Jianwei Niu. 2022. Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{fan2022boosting,
title = {{Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules}},
author = {Shengda Fan, Shasha Mo and Jianwei Niu},
booktitle = {Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing},
year = {2022},
doi = {10.18653/v1/2022.emnlp-main.704},
url = {https://doi.org/10.18653/v1/2022.emnlp-main.704}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/fan-2022-boosting-document-level-relation-extraction/