Span-based Joint Entity and Relation Extraction with Attention-based Span-specific and Contextual Semantic Representations

Bin Ji, Jie Yu, Shasha Li, Jun Ma, Qingbo Wu, Yusong Tan, Huijun Liu

Joint Entity and Relation Extraction (JER) is a fundamental task in natural language processing, aiming to identify entities and their semantic relationships within a single pass. While joint models typically outperform pipelined approaches by reducing error propagation, many existing span-based models treat text spans as monolithic blocks. This paper, presented at COLING 2020, introduces a refined framework that leverages multi-layered attention mechanisms to capture both span-specific nuances and broader contextual clues.

Addressing the Limitations of Span-Based Models

The authors identify three primary weaknesses in conventional span-based JER systems:

  1. Uniform Token Weighting: Treating every word in a span as equally important ignores the fact that certain "headwords" (e.g., "youth" in "a Palestinian youth") are more indicative of entity types than others.
  2. Missing Local Context: The words between two entities often contain "trigger" words (e.g., "ownership") that define the relationship but are frequently overlooked by models focusing solely on the spans themselves.
  3. Ignoring Sentence-Level Clues: Relationships may depend on information found far outside the immediate vicinity of the target entities, requiring a global view of the sentence.

Methodology: Attention-Driven Representations

The proposed model utilizes BERT as its core encoder and introduces a sophisticated representation layer based on attention mechanisms.

The architecture of the proposed span-based joint extraction framework, highlighting the span-specific and contextual representation layers.

Span-Specific and Contextual Features

  • Span-Specific Representations: Instead of simple averaging or max-pooling, the model uses MLP attention to calculate a weighted sum of tokens within a span. This allows the model to "focus" on the most relevant headwords for entity classification.
  • Contextual Representations: The framework generates two types of context: Local Context (attention on tokens between entities to capture relation triggers) and Sentence-Level Context (attention on the entire sentence to provide global compensation information).
  • Multi-Head Attention: Among various attention mechanisms tested (Dot-Product, General, Additive), Multi-Head attention proved superior, likely due to its ability to capture diverse semantic relationships through multiple "heads" simultaneously.

The model is trained jointly using a weighted loss function and a dynamic negative sampling strategy to handle the massive number of non-entity spans found in typical sentences.

Experimental Results

The framework, designated as SPAN$_{Multi-Head}$, was evaluated on three major benchmarks: ACE2005, CoNLL2004, and the ADE (Adverse Drug Events) dataset.

Performance comparison of SPAN$_{Multi-Head}$ against other state-of-the-art methods on the ACE05, CoNLL04, and ADE datasets.

As shown in the results, the model achieved state-of-the-art (SOTA) performance across all datasets. On ACE2005, it reached an F1 score of 89.59% for entities and 65.24% for relations, surpassing previous benchmarks like DyGIE. Similar gains were observed on CoNLL2004 and ADE, confirming the robustness of the attention-based approach in both news and medical domains.

Key Insights and Future Directions

Ablation studies highlighted that span-specific attention is vital; removing it caused entity F1 scores to drop by over 1.3%. Furthermore, sentence-level context serves as a "safety net," providing supporting evidence when local triggers are ambiguous.

Despite these advancements, a gap remains between entity recognition and relation extraction performance. The authors suggest that future work should focus on further reducing initial span classification errors to prevent downstream impacts on relation prediction, potentially exploring even more advanced encoding methods for spans.

Summary updated

BibTeX
@inproceedings{ji2020span,
  author = {Bin Ji and Jie Yu and Shasha Li and Jun Ma and Qingbo Wu and Yusong Tan and Huijun Liu},
  title = {{Span-based Joint Entity and Relation Extraction with Attention-based Span-specific and Contextual Semantic Representations}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-main.8},
}
Figure