JoinER-BART: Joint Entity and Relation Extraction With Constrained Decoding, Representation Reuse and Fusion

Hongyang Chang, Hongfei Xu, Josef van Genabith, Deyi Xiong, Hongying Zan

Abstract

Joint Entity and Relation Extraction (JERE) is a critical task in information extraction, often complicated by overlapping triplets within sentences. This paper introduces JoinER-BART, a generative framework that reformulates JERE as a sequence-to-sequence task using a pre-trained BART model. By incorporating constrained decoding, representation reuse from the encoder, and multi-layer feature fusion, JoinER-BART effectively handles complex overlapping scenarios. Experimental results on the NYT and WebNLG datasets demonstrate that JoinER-BART achieves new state-of-the-art performance, significantly outperforming traditional tagging-based methods.

1. Introduction

Extracting structured information from unstructured text involves identifying entities and the semantic relations that connect them, typically represented as triplets: <subject, relation, object>. A significant challenge in this field is the presence of overlapping triplets. These occur in two primary forms: Single Entity Overlap (SEO), where one entity is involved in multiple relations, and Entity Pair Overlap (EPO), where a pair of entities shares multiple distinct relations.

Example of overlapping triplets (SEO and EPO) in a sentence.

Traditional approaches often rely on complex tagging schemes and multi-stage BERT-based classifiers to handle these overlaps. However, these methods can be computationally expensive and difficult to design. JoinER-BART proposes a simpler generative approach, where the model sequentially "writes out" the triplets, naturally bypassing the need for intricate tagging.

2. Methodology

JoinER-BART leverages the BART transformer architecture, a pre-trained model optimized for sequence generation. The framework introduces three primary innovations to enhance extraction accuracy and efficiency.

The JoinER-BART architecture featuring representation reuse and multi-layer fusion.

2.1 Constrained Decoding

To prevent the model from generating irrelevant text or "hallucinating" entities not present in the source, JoinER-BART employs constrained decoding. During the generation process, the decoder's vocabulary is restricted to tokens that appear in the input sentence or the set of predefined relation types (e.g., /location/country/capital).

2.2 Representation Reuse

Rather than using a randomly initialized weight matrix for the final classification layer, JoinER-BART reuses the hidden states from the BART encoder as the weights for the classifier. This technique allows the model to leverage the deep, context-aware representations learned during pre-training directly in the extraction process, which is particularly beneficial for smaller datasets.

2.3 Multi-Layer Representation Fusion

Transformer models capture different linguistic features across their layers. Probing experiments conducted by the authors revealed that middle layers (specifically layer 9) are highly effective for entity identification, while the final layer (layer 12) excels at capturing relational context. JoinER-BART uses "Hard Fusion"—averaging the outputs of these specific layers—to provide the decoder with a more comprehensive feature set.

3. Experiments and Results

The model was evaluated on two benchmark datasets: the New York Times (NYT) dataset, which contains approximately 56,000 training sentences and 24 relation types, and the WebNLG dataset, which has roughly 5,000 training sentences but a much higher density of 246 relation types.

JoinER-BART established new state-of-the-art (SOTA) benchmarks for exact match evaluation:

  • NYT Dataset: Achieved an F1 score of 92.91, a 0.9-point improvement over the previous best model, TPLinker.
  • WebNLG Dataset: Achieved an F1 score of 91.37, representing a significant +4.67 point increase over previous benchmarks.

Crucially, the model demonstrated superior performance in handling SEO and EPO cases, outperforming specialized tagging models. The generative nature of the model allows it to handle overlaps by simply repeating entities in subsequent triplets as needed.

4. Discussion and Conclusion

JoinER-BART simplifies the JERE task by treating it as a generative sequence-to-sequence problem. Its $O(n)$ decoding complexity makes it more scalable than some $O(n^2)$ tagging models. The success of representation reuse and multi-layer fusion highlights the importance of effectively utilizing pre-trained transformer knowledge. Future work may involve extending this framework to cross-lingual extraction or integrating it with larger language models to further enhance performance.

Summary updated

BibTeX
@article{chang2023joiner,
  author = {Hongyang Chang and Hongfei Xu and Josef van Genabith and Deyi Xiong and Hongying Zan},
  title = {{JoinER-BART: Joint Entity and Relation Extraction With Constrained Decoding, Representation Reuse and Fusion}},
  journal = {IEEE ACM Trans. Audio Speech Lang. Process.},
  year = {2023},
  doi = {10.1109/taslp.2023.3310879},
}
Figure