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

A sequence-to-sequence approach for document-level relation extraction

John M. Giorgi, Gary D. Bader, Bo Wang · DOI

Abstract

This paper introduces seq2rel, an end-to-end sequence-to-sequence (seq2seq) model designed for document-level relation extraction (DocRE). By linearizing complex structured relationships into a simple string format, the model jointly learns to identify entities, resolve coreferences, and extract multi-entity relations, often outperforming traditional pipeline-based systems.

Introduction

In Natural Language Processing (NLP), Relation Extraction (RE) involves identifying semantic links between entities, such as "Drug A causes Disease B." While sentence-level RE is well-established, Document-level RE (DocRE) presents significant challenges. Relations frequently span multiple sentences, and documents often contain coreferent mentions (different terms for the same entity) and discontinuous entity names.

Traditional DocRE methods typically employ a pipeline approach: one model identifies entities, and a subsequent model predicts relations. This structure is prone to error propagation and prevents feature sharing between tasks. Furthermore, pipeline models often struggle with n-ary relations—those involving more than two entities—which are prevalent in domains like biomedicine.

Methodology

The proposed seq2rel model treats DocRE as a translation task, converting raw text into a structured string of relations.

Linearization Schema

A core innovation of seq2rel is its linearization schema, which represents complex relations as strings. This format handles coreference using separators (e.g., ;) and naturally accommodates n-ary relations by listing multiple entities before a relation tag.

Examples of the linearization schema for complex relations, including discontinuous mentions, coreference, and n-ary relations.

Architecture

The model utilizes a standard Transformer encoder (such as PubMedBERT) paired with an autoregressive LSTM decoder. A key component is the copy mechanism, which allows the decoder to select words directly from the source text, mitigating the risk of "hallucinating" entity names.

The seq2rel architecture featuring a Transformer encoder, cross-attention, and a decoder with a copy mechanism.

Key Training Strategies

  • Entity Hinting: To enable fair comparison with pipeline models using gold-standard entities, the authors prepended known entities to the input text.
  • Relation Sorting: Sorting target relations by their appearance in the document provided a consistent signal during training, significantly improving performance.

Datasets and Evaluation

The model was evaluated on four benchmarks: Chemical-Induced Disease (CDR), Gene-Disease Associations (GDA), Drug-Gene-Mutation (DGM) relationships, and the general-domain DocRED dataset.

Results and Discussion

Performance Highlights

  • N-ary Relations: seq2rel achieved an F1-score of 84.4 on the DGM dataset, a substantial increase over the previous state-of-the-art (68.9).
  • Biomedical Benchmarks: The model was highly competitive on CDR (67.2 F1) and GDA, matching or exceeding specialized pipeline systems.
  • General Domain: On DocRED, it reached a 38.2 F1 (strict matching). While slightly below the task-specific JEREX model (40.4), seq2rel offers a much simpler architecture.

Insights

The success of seq2rel demonstrates that joint learning is superior for DocRE. By learning entities and relations simultaneously, the model can recover from errors that would typically derail a pipeline. Additionally, the seq2seq format is inherently scalable for n-ary relations, unlike binary classifiers. Ablation studies confirmed that pretraining and relation sorting are critical, with sorting contributing up to a 14.7% performance boost.

Conclusion and Future Work

While effective, seq2rel faces challenges with very long documents where target strings become lengthy, potentially taxing the LSTM decoder. Future work includes integrating "efficient transformers" (e.g., Longformer) to handle full-length scientific papers and exploring fully pretrained seq2seq models like T5 or BART to enhance the decoder's capabilities.

Summary updated

BibTeX
@inproceedings{giorgi2022sequence,
  author = {John M. Giorgi and Gary D. Bader and Bo Wang},
  title = {{A sequence-to-sequence approach for document-level relation extraction}},
  booktitle = {BioNLP @ ACL},
  year = {2022},
  doi = {10.18653/v1/2022.bionlp-1.2},
}
Figure