Two are Better than One: Joint Entity and Relation Extraction with Table-Sequence Encoders

Jue Wang, Wei Lu · DOI

Abstract

Named entity recognition and relation extraction are two important fundamental problems. Joint learning algorithms have been proposed to solve both tasks simultaneously, and many of them cast the joint task as a table-filling problem. However, they typically focused on learning a single encoder (usually learning representation in the form of a table) to capture information required for both tasks within the same space. We argue that it can be beneficial to design two distinct encoders to capture such two different types of information in the learning process. In this work, we propose the novel table-sequence encoders where two different encoders -- a table encoder and a sequence encoder are designed to help each other in the representation learning process. Our experiments confirm the advantages of having two encoders over one encoder. On several standard datasets, our model shows significant improvements over existing approaches.

Introduction

In Information Extraction (IE), Named Entity Recognition (NER) and Relation Extraction (RE) are foundational tasks. NER identifies entities (e.g., "Minnesota"), while RE identifies the connections between them (e.g., "located in"). Traditionally, these tasks were handled sequentially in a pipeline, which often led to error propagation—mistakes in the NER step would inevitably compromise the RE step.

To address this, joint learning frameworks have emerged, often conceptualizing the problem as "table-filling." In this paradigm, a 2D grid represents the sentence, where diagonal cells correspond to entity tags and off-diagonal cells represent relations between word pairs.

The joint task of NER and RE formulated as a table-filling problem.

However, existing joint models typically rely on a single encoder to learn representations for both tasks. This often results in "feature confusion," as the optimal features for identifying entity boundaries (1D sequence information) differ significantly from those needed to identify complex relations (2D spatial information).

Methodology: Table-Sequence Encoders

The proposed framework introduces two distinct but interconnected encoders designed to capture specialized information for NER and RE respectively.

The Table Encoder

The table encoder utilizes Multi-Dimensional Recurrent Neural Networks (MD-RNN). Unlike standard 1D RNNs that move left-to-right, the MD-RNN traverses a 2D grid across rows and columns. This allows the model to capture spatial context within the table, recognizing structural patterns that signify relationships between entities.

The Sequence Encoder

The sequence encoder is a Transformer-based architecture enhanced with Table-Guided Attention. Instead of computing attention weights solely from the sequence, it incorporates information from the current state of the 2D table. This makes the sequence representations "aware" of potential relations identified in the table.

Architecture of an encoding layer showing the interaction between the table and sequence encoders.

Interaction and Iterative Refinement

The model is composed of multiple stacked layers. In each layer, the table encoder updates its grid based on sequence information, and the sequence encoder refines its word representations using table data. This bidirectional communication allows the encoders to mutually resolve ambiguities over successive layers. Additionally, the model "recycles" relational knowledge by feeding attention weights from a pre-trained BERT model into the table encoder.

Experimental Evaluation

The model was evaluated on four benchmark datasets: ACE04, ACE05, CoNLL04, and ADE. These datasets cover a range of domains, from news and forums to medical literature.

Key Results

The Table-Sequence Encoder achieved State-of-the-Art (SOTA) performance across all benchmarks. Notably, on the ACE05 dataset, the model improved the Relation Extraction F1 score by 4.2 points over previous bests. Ablation studies confirmed that removing either encoder significantly degraded performance, validating the "two are better than one" hypothesis. Furthermore, the architecture proved robust, delivering strong results even when paired with older language models like ELMo, proving the strength of the architecture itself.

Discussion and Conclusion

The success of this approach highlights the value of architectural specialization. By aligning the encoder structure (1D sequence vs. 2D table) with the nature of the task (NER vs. RE), the model avoids feature confusion. While the MD-RNN component adds computational complexity, its ability to capture spatial dependencies is crucial for high-accuracy relation extraction.

Future research may extend this multi-representation framework to other structured NLP tasks, such as dependency parsing or discourse analysis, exploring how different specialized encoders can best collaborate in a unified learning process.

Summary updated

BibTeX
@inproceedings{wang2020two,
  author = {Jue Wang and Wei Lu},
  title = {{Two are Better than One: Joint Entity and Relation Extraction with Table-Sequence Encoders}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.133},
}
Figure