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

Andrei Catalin Coman, Christos Theodoropoulos, Marie‐Francine Moens, James Henderson2024

Abstract

Document-level relation extraction typically relies on text-based encoders and hand-coded pooling heuristics to aggregate information learned by the encoder. In this paper, we leverage the intrinsic graph processing capabilities of the Transformer model and propose replacing hand-coded pooling methods with new tokens in the input, which are designed to aggregate information via explicit graph relations in the computation of attention weights. We introduce a joint text-graph Transformer model and a graph-assisted declarative pooling (GADePo) specification of the input, which provides explicit and high-level instructions for information aggregation. GADePo allows the pooling process to be guided by domain-specific knowledge or desired outcomes but still learned by the Transformer, leading to more flexible and customisable pooling strategies. We evaluate our method across diverse datasets and models and show that our approach yields promising results that are consistently better than those achieved by the hand-coded pooling functions.

Introduction

Document-Level Relation Extraction (DocRE) involves identifying relationships between entities across multiple sentences in a document. A significant challenge in DocRE is that entities often appear as multiple mentions throughout the text. Traditional state-of-the-art models, such as ATLOP, rely on "pooling heuristics"—fixed mathematical functions like logsumexp—to aggregate these scattered mentions into a single entity-level representation. While effective, these procedural heuristics are rigid and do not allow the model to learn the optimal way to aggregate information for a specific task or dataset.

Methodology: Graph-Assisted Declarative Pooling

GADePo (Graph-Assisted Declarative Pooling) shifts the paradigm from procedural, hand-coded pooling to a declarative, learnable graph task. Instead of calculating entity representations after the encoding phase, GADePo integrates the pooling process directly into the Transformer's attention mechanism.

Comparison of the proposed GADePo architecture against previous pooling methods like ATLOP.

Architectural Innovations

  1. Specialized Tokens: The input sequence is extended with <ent> tokens (one for each unique entity) and <pent> tokens (one for each potential entity pair).
  2. Explicit Graph Relations: The model is provided with explicit graph edges connecting <ent> tokens to their corresponding mentions in the text.
  3. Joint Text-Graph Encoding: The Transformer's self-attention is modified to incorporate these graph relations. This "steers" the attention, instructing the <ent> tokens to aggregate information specifically from their mentions, and the <pent> tokens to aggregate from the relevant entity pairs.
  4. Learnable Aggregation: Because pooling occurs within the Transformer layers, the model learns the most effective aggregation strategy during the fine-tuning process, utilizing its full capacity as a graph processor.

Experimental Results

The performance of GADePo was evaluated on three major benchmarks: Re-DocRED, HacRED, and the original DocRED. Across all datasets, GADePo consistently outperformed the strong ATLOP baseline.

F1 performance of GADePo vs. ATLOP across varying training set sizes for Re-DocRED and HacRED datasets.

On Re-DocRED, GADePo achieved an $F_1$ score of 78.40. The gains were even more pronounced on HacRED, a dataset designed for complex reasoning, where GADePo reached 78.65 $F_1$ (compared to ATLOP's 77.59). This improvement was largely driven by a significant increase in recall, suggesting that the learnable pooling strategy is better at capturing "hard" relations that fixed heuristics often miss. Furthermore, GADePo demonstrated superior stability and data efficiency as training data volume increased.

Discussion and Conclusion

A key advantage of GADePo is its minimal parameter overhead, adding less than 0.04% to a BERT-base model. The primary limitation is the quadratic growth of <pent> tokens ($N^2$ relative to the number of entities), which can impact the 512-token limit of standard Transformers in entity-dense documents. Future work will explore pruning strategies to identify likely entity pairs beforehand, maintaining efficiency without sacrificing the benefits of declarative pooling. By treating Transformers as graph processors, GADePo provides a more flexible and powerful framework for complex information extraction tasks.

Summary updated

BibTeX
@misc{coman2024gadepo,
  author = {Andrei Catalin Coman and Christos Theodoropoulos and Marie‐Francine Moens and James Henderson},
  title = {{GADePo: Graph-Assisted Declarative Pooling Transformers for Document-Level Relation Extraction}},
  year = {2024},
  doi = {10.18653/v1/2024.knowledgenlp-1.1},
}
Figure