Abstract
Knowledge Graph (KG) and attention mechanism have been demonstrated effective in introducing and selecting useful information for weakly supervised methods. However, only qualitative analysis and ablation study are provided as evidence. In this paper, we contribute a dataset and propose a paradigm to quantitatively evaluate the effect of attention and KG on bag-level relation extraction (RE). We find that (1) higher attention accuracy may lead to worse performance as it may harm the model's ability to extract entity mention features; (2) the performance of attention is largely influenced by various noise distribution patterns; (3) KG-enhanced attention indeed improves RE performance, while not through enhanced attention but by incorporating entity prior; and (4) attention mechanism may exacerbate the issue of insufficient training data. Based on these findings, we show that a straightforward variant of RE model (BRE+CE) can achieve significant improvements on real-world datasets.
Introduction
In Natural Language Processing (NLP), Distant Supervision is a common technique for training relation extraction models without manual labeling. By aligning a Knowledge Graph (KG)—e.g., "Paris is the capital of France"—with a corpus, any sentence containing "Paris" and "France" is assumed to express the "capital" relationship. However, this assumption introduces significant noise, as many such sentences may not explicitly describe the relation. To mitigate this, researchers typically employ Attention Mechanisms to select valid sentences within a "bag" and KG Embeddings to provide external context.
Despite their popularity, the actual mechanisms by which attention and KGs improve performance have remained largely unquantified. This paper provides a deep dive into these components, challenging common assumptions about their roles.
Methodology
The authors propose a new evaluation paradigm using a controlled environment with synthesized noise. This allows for precise measurement of attention accuracy and the impact of noise distribution patterns.
Datasets
- BagRel-Wiki73K: A new benchmark derived from FewRel and Wikidata, designed for quantitative analysis. Every sentence has a ground-truth "valid/noise" label.
- NYT-FB60K & GIDS-FB8K: Standard real-world datasets used for validation.
- KG-73K: A Knowledge Graph constructed from Wikidata to provide entity priors.
The BRE+CE Model
The researchers introduced BRE+CE (BERT-based Relation Extraction + Concatenated Embeddings). This model avoids complex attention layers. Instead, it:
- Encodes sentences using BERT.
- Concatenates KG entity embeddings (TransE) directly to the sentence representation.
- Averages predictions across the bag.
Key Findings
The Attention Paradox
A counter-intuitive finding is that higher attention accuracy—the ability to pick the "correct" sentence—does not always improve performance. As shown in Figure 4, when the model is forced to put high weights on valid sentences, its performance on noisy bags (AUCN) can actually degrade. This suggests that models with high attention accuracy may become "lazy," over-relying on sentence context while ignoring essential entity features, making them less robust to noise.
KGs as Entity Priors
The study reveals that KGs improve performance not by making attention "smarter," but by providing a strong "entity prior." In some tests, adding KG information actually decreased attention accuracy while increasing overall RE performance. The KG allows the model to make correct predictions even when sentence context is missing or misleading.
Data Sparsity and Noise Patterns
Attention mechanisms can exacerbate data sparsity issues by effectively discarding information from down-weighted sentences. Furthermore, the performance of attention is highly sensitive to noise distribution patterns, such as "disturbing bags" where all sentences are either valid or noisy.
Results
The simple BRE+CE model, which uses averaging instead of complex in-bag attention, achieved state-of-the-art results on real-world datasets. On NYT-FB60K, it reached an AUC of 0.630, significantly outperforming complex baselines like SeG (0.451) and RELE (0.497).
On GIDS-FB8K, BRE+CE achieved an AUC of 0.917, proving its effectiveness across different data distributions.
Conclusion
This research demonstrates that simple concatenation of KG embeddings is highly effective for relation extraction, often outperforming complex attention-based models. The findings suggest that future work should focus on more robust ways to incorporate KG knowledge and develop attention mechanisms that can handle "disturbing bags" and low-data scenarios without sacrificing robustness.
Summary updated