Introduction
Relation Extraction (RE) is a fundamental task in natural language processing, aimed at identifying semantic relationships between entities in text. To scale RE without the prohibitive cost of manual annotation, researchers often employ Distant Supervision (DS). This technique automatically labels sentences by aligning them with existing knowledge bases (KBs). However, DS is inherently noisy; it assumes that if a KB contains a fact (e.g., born_in(Obama, Hawaii)), any sentence containing those entities expresses that relationship. This leads to false positives, such as labeling "Obama visited Hawaii" as a "born_in" relation.
To mitigate this, the standard approach is Multi-Instance Learning (MIL), which groups sentences into "bags" and learns to identify the most representative instance. While effective at reducing noise, MIL is data-inefficient because it often ignores the rich signal present in the "abundant instances" that are not selected as the primary bag representative. The Contrastive Instance Learning (CIL) framework addresses this bottleneck by enabling the model to learn from every instance in the dataset through a novel contrastive objective.
The CIL Framework
CIL enhances the standard BERT-based MIL architecture by introducing a dual-objective training strategy that operates at both the bag and instance levels.
1. The Encoder Base
The model utilizes a BERT encoder equipped with entity-aware markers to generate high-quality sentence representations ($h$). These representations are then aggregated into a bag-level representation ($\tilde{B}$) using a soft attention mechanism, which weights instances based on their relevance to the target relation.
2. Contrastive Instance Learning (CIL)
The core innovation of CIL is its instance-level contrastive loss. For every instance $x_s$ in a bag, the model performs two key operations:
- Positive Pair Construction: To avoid the noise inherent in DS bags, CIL does not simply pair an instance with another from the same bag. Instead, it uses TF-IDF-based data augmentation to create a synthetic "clean" positive pair ($x_s^*$) by substituting low-importance words in the original sentence.
- Negative Anchor Selection: Rather than comparing against random sentences, CIL contrasts the instance against the bag representations ($\tilde{B}_t$) of other relations. These bag representations act as stable, de-noised centroids for their respective relations, providing a clearer signal for the contrastive objective.
3. Dynamic Training Objective
The framework employs a dynamic loss function that combines standard bag-level cross-entropy, the contrastive InfoNCE loss, and a Masked Language Modeling (MLM) loss. A dynamic weight $\lambda(t)$ is used to shift focus: early in training, the model prioritizes learning a robust bag encoder; as training progresses, it increases the weight of the contrastive instance learning to refine individual sentence representations.
Experimental Results
The authors evaluated CIL on three major benchmarks: NYT10, GDS, and KBP. The results demonstrate that CIL significantly outperforms existing state-of-the-art (SOTA) methods:
- NYT10-D: The Area Under Curve (AUC) improved from 42.2 to 50.8, representing a 20.4% relative improvement over the previous SOTA, DISTRE.
- Human Evaluation (KBP): On the manually annotated KBP dataset, CIL achieved a massive 36.2% improvement in AUC over baselines, proving its effectiveness in real-world scenarios.
- Precision at N: On the NYT10 dataset, CIL reached a P@100 of 90.1%, compared to 81.8% for the previous best model (RESIDE).
- Ablation Study: Removing the contrastive component led to an AUC drop from 50.8 to 40.3, confirming that instance-level learning is the primary driver of the framework's performance gains.
Conclusion
CIL represents a significant shift in distantly supervised relation extraction by moving from bag-level selection to instance-level learning. By leveraging data augmentation and using bag representations as negative anchors, CIL extracts significantly more information from noisy datasets than traditional MIL methods. This framework not only achieves new SOTA results but also provides a more data-efficient path for training relation extraction models on automatically labeled data.
Summary updated