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:
- 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.
- 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.
- 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.
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.
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