NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules

Shengda Fan, Shasha Mo, Jianwei Niu

Abstract

Document-Level Relation Extraction (DocRE) involves identifying semantic relations between all entity pairs within a document. Unlike sentence-level extraction, DocRE requires reasoning over multiple sentences where relations are often interdependent. We present MILR (Mining and Injecting Logical Rules), a framework that integrates logical constraints into the entire lifecycle of neural DocRE models. By automatically mining rules and enforcing them through consistency regularization and global inference, MILR achieves significant performance gains and improves logical consistency without increasing model parameters.

Introduction

In Document-Level Relation Extraction (DocRE), the challenge lies in capturing "relational complexes"—sets of interdependent relations. For instance, if a document identifies that "Alisher is Chusovitina’s son" and "Bakhodir is Chusovitina’s husband," a logical inference suggests that "Alisher is Bakhodir’s son." Standard neural models often fail to capture these patterns because they typically predict relations for entity pairs in isolation.

Example of a relational complex where logical rules (e.g., spouse and parent relations) help infer missing links.

Previous logic-based approaches often relied on disjointed reasoning modules that were computationally expensive and sensitive to noise. MILR addresses these issues by treating logic as a fundamental part of the training and inference process, ensuring that the neural backbone learns representations that are inherently more logical.

Methodology

The MILR framework consists of three primary components designed to bridge the gap between symbolic logic and neural learning:

1. Automated Rule Mining

To avoid the bottleneck of manual rule engineering, MILR employs a data-driven Rule Miner. It scans the training corpus to identify frequent logical patterns, such as symmetry (e.g., spouse_of(A,B) ↔ spouse_of(B,A)) and composition (e.g., parent_of(A,C) ← spouse_of(A,B) ∧ parent_of(B,C)). Each mined rule is assigned a confidence score based on its frequency and accuracy in the training data.

2. Consistency Regularization

During the training phase, MILR introduces a consistency loss term. This term penalizes the neural backbone when its predicted probability distributions violate the mined logical rules. This approach encourages the model to learn internal representations that are inherently consistent with "common sense" logic, acting as a form of informed supervision that requires no additional parameters.

3. Global Inference

At test time, MILR moves beyond simple thresholding. It formulates inference as an integer programming problem, searching for a global set of relation labels that maximizes the model's confidence while strictly adhering to high-confidence logical constraints. To maintain efficiency, a simplifying strategy is used to apply constraints only to entity pairs where the model shows initial uncertainty.

Experimental Setup and Results

The framework was evaluated on two benchmark datasets: DWIE, an entity-centric dataset with 65 relation types, and DocRED, the largest standard DocRE dataset. The researchers utilized a relabeled version of the DocRED test set to mitigate the impact of missing labels in the original version.

Key Performance Metrics

MILR demonstrated robust improvements across various neural architectures, including LSTMs and transformer-based models like ATLOP:

  • Accuracy Gains: F1 scores improved by 1.1% to 3.8% across different backbones.
  • Logical Consistency: MILR outperformed the state-of-the-art logic-based model, LogiRE, by over 4.5% in consistency metrics.
  • Computational Efficiency: Unlike previous methods that added significant training time, MILR's overhead is minimal, adding only approximately 2.8 minutes per training iteration compared to over 100 minutes for LogiRE.
  • Long-Range Relations: On the DWIE dataset, MILR achieved a 12.74% improvement in Ign F1 for entities separated by more than 400 tokens, highlighting the power of logic in bridging long-distance context where neural attention often falters.

Discussion and Conclusion

MILR proves that logical rules can serve as a powerful "teacher" for neural models. By injecting logic as a regularizer, the model learns to avoid errors rather than just correcting them post-hoc. Furthermore, the parameter-free nature of MILR makes it highly portable to any neural DocRE backbone.

While highly effective, the framework currently relies on a "closed-world assumption" during rule mining, which can be sensitive to sparse training data. Future work may explore interactive or multi-turn injection methods to further refine the synergy between neural embeddings and symbolic logic.

Summary updated

BibTeX
@inproceedings{fan2022boosting,
  author = {Shengda Fan and Shasha Mo and Jianwei Niu},
  title = {{Boosting Document-Level Relation Extraction by Mining and Injecting Logical Rules}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.704},
}
Figure