This paper, "Enriched Attention for Robust Relation Extraction," addresses a persistent headache in Natural Language Processing: how to accurately extract relationships between entities in long, messy sentences. While neural networks have pushed the state-of-the-art in Relation Extraction (RE), they often stumble when a sentence contains multiple entities and complex overlapping contexts.
TL;DR
The authors propose "enriched attention," a mechanism that injects linguistic features (like dependency paths) and external knowledge (like entity types and Wikipedia embeddings) directly into the attention layer of a neural network. This allows the model to dynamically refocus on relevant parts of a sentence for specific entity pairs, significantly improving robustness in long, entity-dense text.
What Problem Does This Paper Address?
Relation extraction is the task of identifying the semantic link between two "query entities" in a sentence (e.g., identifying that "Barack Obama Sr." is the parent of "Barack Obama").
The core challenge is robustness. Standard attention mechanisms often fail when sentences are long or contain "distractor" entities. Consider the example in Figure 1:
In this sentence, a model trying to find the relation for the pair ("Barack Obama Sr.", "1936") might get distracted by the intervening entity "Barack Obama" and incorrectly predict that the son, not the father, was born in 1936. The authors argue that models need a way to "filter" the sentence context based specifically on the two entities currently being queried.
Methods
The authors build upon a standard Bi-LSTM architecture but replace the vanilla attention layer with an enriched attention mechanism. The key innovation is calculating attention scores using a mix of hidden states and auxiliary features:
- Local Features (Token-level): These help the model understand the linguistic structure relative to the query entities.
- Dependency Distance: The distance of each token to the query entities in a dependency parse tree.
- Shortest Path Flag: A binary indicator of whether a token lies on the shortest dependency path (SDP) between the two entities.
- Global Features (Sentence-level): These provide high-level context for the specific entity pair.
- SDP Representation: The entire shortest dependency path is encoded via a separate LSTM.
- Entity Types: Embeddings representing the categories of the query entities (e.g., PERSON, DATE).
- Wikipedia Embeddings: Pre-trained embeddings for the specific entities to leverage external world knowledge.
The model was tested using both additive attention (Bahdanau-style) and dot-product attention (Transformer-style), proving that these features can be integrated into various architectures.
Datasets
The researchers evaluated their approach on two major benchmarks:
- TACRED: A large-scale dataset with over 106,000 instances and 42 relation types.
- ACE 2005: A manually labeled dataset known for its complexity and high class imbalance (many "no_relation" instances).
Key Insights and Ideas
- Attention as a Knowledge Sink: Rather than just using linguistic features as inputs to the main LSTM, the authors found that using them to guide attention is highly effective. This allows the model to "ignore" noisy parts of the sentence that might be relevant to other entity pairs but not the current one.
- Soft Constraints via SDP: Previous work often used the Shortest Dependency Path (SDP) as the only input. This is risky because parsers make mistakes. By using the SDP as an attention feature instead, the model can treat it as a strong hint while still having access to the full sentence context if the parse is noisy.
- Dynamic Contextualization: As shown in Figure 3 (below), the enriched attention mechanism successfully shifts its focus depending on which entities are being queried within the same sentence.
Key Results
- State-of-the-Art Performance: On the ACE 2005 dataset, the model set a new state-of-the-art for both gold and predicted entities, outperforming previous models by a significant margin (e.g., achieving an F1 of 75.1 on the test set with ELMo).
- Improved Robustness: Quantitative analysis showed that while all models struggle as sentence length and entity count increase, the enriched attention model degrades much more slowly. It is significantly more stable in "crowded" sentences than the baseline.
- Feature Synergy: Ablation studies (Table 4 in the paper) revealed that combining all features—dependency info, entity types, and Wikipedia embeddings—yielded the best results, suggesting these different knowledge sources are complementary.
Limitations and Future Work
- Transformer Integration: The authors primarily used LSTM-based architectures. While they experimented with Transformers, they found that training them from scratch without massive pre-training was less effective. A natural next step is integrating enriched attention into pre-trained models like BERT or RoBERTa.
- Preprocessing Overhead: The method relies on external tools for dependency parsing and entity linking. Errors in these upstream tasks can propagate, and the extra steps add computational cost to the pipeline.
- Task Generalization: While focused on Relation Extraction, the authors suggest that the concept of "enriching" attention with task-specific structural features could be applied to other NLP tasks like coreference resolution or event extraction.
Summary updated