GADePo: Graph-Assisted Declarative Pooling Transformers for Document-Level Relation Extraction

Andrei C. Coman, Christos Theodoropoulos, Marie-Francine Moens, James HendersonarXiv 2023 · DOI

Abstract

Document-Level Relation Extraction (DocRE) requires identifying relationships between entities across multiple sentences. Traditional methods rely on rigid, hand-coded pooling heuristics to aggregate entity mentions. We present GADePo (Graph-Assisted Declarative Pooling), a novel approach that replaces these fixed formulas with a learnable, declarative mechanism. By introducing specialized pooling tokens and integrating graph-based instructions directly into the Transformer’s attention mechanism, GADePo allows the model to learn optimal data aggregation strategies. Our experiments on Re-DocRED and HacRED benchmarks demonstrate that GADePo matches or exceeds state-of-the-art performance with minimal parameter overhead.

Introduction

In Document-Level Relation Extraction (DocRE), the primary challenge is to discern relationships between entities—such as "Atari" and "Breakout"—that are mentioned multiple times throughout a text. Current state-of-the-art models typically follow a two-stage pipeline: first, encoding the text into vector representations, and second, "pooling" these representations to create a single embedding for each entity and entity pair.

Historically, this pooling step has relied on "hard" inductive biases—fixed mathematical formulas like logsumexp or localized context pooling. While effective, these hand-coded heuristics are often task-specific and assume that human-designed aggregation is superior to learned strategies. GADePo challenges this assumption by treating pooling as a declarative task, enabling the model to learn how to "squish" multiple mentions into meaningful representations dynamically.

Proposed Method: GADePo

The core innovation of GADePo is the transition from fixed calculations to a Joint Text-Graph Transformer architecture.

Comparison of the previous ATLOP method and the proposed GADePo architecture.

Declarative Pooling via Special Tokens

GADePo introduces two types of specialized tokens into the input sequence:

  1. <ent> tokens: Each token represents a unique entity in the document.
  2. <pent> tokens: Each token represents a potential pair of entities.

Graph-Integrated Attention

Instead of using external layers for aggregation, GADePo leverages the Transformer's intrinsic ability to process graphs. The model defines explicit graph relations (edges) between the <ent> tokens and their corresponding mentions in the text. By modifying the attention mechanism, these edges act as "instructions," guiding the model on which keys (mentions) are relevant to which queries (pooling tokens).

A key feature is the multiplicative interaction between queries, relations, and keys. This ensures that a mention is only aggregated into a pooling token if both the query and the key align on a specific graph relation, providing a more nuanced and flexible aggregation than simple additive methods.

Experimental Results

We evaluated GADePo on three major benchmarks: Re-DocRED (cleaned English Wikipedia), DocRED, and HacRED (a large-scale Chinese dataset featuring complex cross-sentence reasoning).

Performance comparison (F1 score) between ATLOP and GADePo on Re-DocRED and HacRED datasets across varying training data sizes.

GADePo consistently matched or outperformed the strong ATLOP baseline:

  • Re-DocRED: Achieved an $F_1$ score of 78.40, matching the performance of the reimplemented ATLOP.
  • HacRED: Demonstrated a significant improvement, reaching 78.65 $F_1$ (vs. ATLOP's 77.59). This gain was largely driven by a substantial increase in recall, suggesting GADePo is better at capturing complex, "hard" relationships.
  • Efficiency: The architectural changes are highly efficient, requiring only a 0.036% increase in parameters for a BERT-base backbone.

Discussion: Soft vs. Hard Bias

The success of GADePo highlights the benefit of "soft" inductive biases. While traditional pooling forces a specific mathematical structure, GADePo provides the structure of the entity-mention relationships but allows the model to learn the optimal weights for aggregation. This flexibility is particularly valuable in datasets like HacRED, where relationships are complex and require nuanced contextual reasoning.

Conclusion and Future Work

GADePo represents a shift toward more flexible, data-driven architectures for document-level extraction. However, the current implementation faces a scalability challenge: the number of <pent> tokens grows quadratically with the number of entities, which can consume significant sequence length in long documents.

Future research will focus on "pruning" strategies. By using a lightweight preliminary model to identify likely candidate pairs, GADePo could instantiate <pent> tokens only for relevant pairs, significantly improving scalability for documents with high entity density.

Summary updated

BibTeX
@misc{coman2023gadepo,
  author = {Andrei C. Coman and Christos Theodoropoulos and Marie-Francine Moens and James Henderson},
  title = {{GADePo: Graph-Assisted Declarative Pooling Transformers for Document-Level Relation Extraction}},
  year = {2023},
  eprint = {2308.14423},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.14423},
}
Figure