Abstract
This paper presents a novel "one-pass" approach to Multiple-Relation Extraction (MRE) by enhancing the BERT architecture with entity-aware self-attention and a structured prediction layer. This method extracts all relations in a paragraph simultaneously, achieving state-of-the-art accuracy on the ACE 2005 benchmark while delivering up to a 3.5x speedup over traditional multi-pass methods.
Introduction
Relation Extraction (RE) involves identifying semantic links between entity pairs in text. Traditional methods often follow a Single-Relation Extraction (SRE) paradigm, processing each entity pair individually. In paragraphs with $M$ entities, this requires $O(M^2)$ passes, creating a significant computational bottleneck for deep models like BERT. This work proposes a "one-pass" solution that encodes the text once to extract all relations, significantly improving efficiency without sacrificing accuracy.
Methodology
The proposed architecture modifies the standard Transformer block to better handle the spatial relationships between entities.
Structured Prediction Layer
Instead of a standard classification head, the model uses a structured prediction layer. It encodes the paragraph to obtain hidden states for all tokens. For any entity pair $(e_i, e_j)$, the model applies average-pooling to the hidden states of tokens within each entity mention, concatenates these representations, and uses a linear classifier to predict the relationship.
Entity-Aware Self-Attention
The core innovation is the integration of relative distance features directly into the self-attention mechanism. Unlike standard BERT's absolute position embeddings, this "entity-centric" attention allows the model to learn how the distance from specific entity mentions to other words influences attention weights across all 12 layers. This mechanism uses clipped relative distance to focus on local context while maintaining global awareness.
Experimental Setup
The model was evaluated on three major benchmarks:
- ACE 2005: The primary MRE benchmark covering diverse domains like news, weblogs, and broadcast conversations.
- SemEval 2018 Task 7 (Sub-task 1.1): Focused on long-passage MRE.
- SemEval 2010 Task 8: A standard SRE benchmark used to verify the model's generalizability on simpler tasks.
Results and Discussion
The one-pass approach demonstrates superior performance and efficiency compared to multi-pass baselines.
Performance on ACE 2005
As shown in the results table below, the Entity-Aware BERT_SP model achieves a state-of-the-art average F1 score of 63.14 on ACE 2005, outperforming models that use complex domain adaptation techniques.
Efficiency and Insights
- Speedup: The one-pass model trains 3.5x faster than the SRE-based multi-pass equivalent and achieves a throughput of 126 relations per second, compared to just 23 for the baseline.
- Simplicity: Ablation studies revealed that simple linear heads perform as well as or better than complex MLP or Biaffine classifiers, suggesting that the entity-aware embeddings are already highly descriptive.
- Global Context: By processing all entities at once, the model retains full context, avoiding the information loss associated with masking entities in multi-pass approaches.
Conclusion
This work demonstrates that a one-pass approach with entity-aware attention is both more efficient and more accurate for relation extraction. Future work includes integrating end-to-end entity recognition and applying this entity-centric encoding to tasks like complex Question Answering.
Summary updated