Abstract
Document-level relation extraction (DocRE) is essential for identifying relationships between entities across multiple sentences. However, existing models often struggle with the "long-tail" problem, where a few common relations dominate the training data, leading to poor performance on rare relations. We present ERA (Easy Relation Augmentation) and ERACL (ERA with Contrastive Learning) to address this imbalance. By augmenting relation representations directly through context perturbation and employing a momentum-based contrastive learning framework, our approach significantly improves performance on tailed relations without the computational overhead of text-level augmentation.
The Long-Tail Challenge in DocRE
Document-level relation extraction requires capturing complex dependencies across a whole document. While neural architectures like Transformers have improved baseline performance, they remain sensitive to data distribution. In datasets like DocRED, the distribution of relations is highly skewed.
Standard data augmentation techniques, such as word swapping, are often unsuitable for DocRE. Because a single document contains multiple entity pairs, altering the text to augment one relation might negatively impact the context for others. Furthermore, re-encoding long documents for every augmented sample is computationally prohibitive.
Proposed Methodology
To overcome these limitations, we propose a two-stage approach that operates at the representation level.
Easy Relation Augmentation (ERA)
Instead of modifying the input text, ERA applies augmentation to the relation representations. It utilizes a random Bernoulli mask on the "pooled context"—the attention scores linking entities to relevant words. By zeroing out parts of this context, the model generates multiple perturbed versions of a relation. This forces the model to learn robust features that are not overly dependent on specific context words, effectively simulating more data for rare relations without re-processing the document through the Transformer backbone.
ERACL: Contrastive Learning with Relation Queues
To further enhance robustness, we introduce ERACL, which integrates ERA into a contrastive learning framework. We adapt the Momentum Contrast (MoCo) approach to the DocRE task.
The framework maintains a "Relation Queue" for each relation type, storing representations from previous mini-batches. During training, the model pulls representations of the same relation closer together while pushing different relations apart. This is particularly beneficial for rare relations, as the queues provide a steady supply of negative examples, which are crucial for learning discriminative features in low-data regimes.
Experimental Results
We evaluated our methods on the DocRED (English) and HacRED (Chinese) benchmarks.
Performance on Tailed Relations
The primary strength of ERACL is its performance on infrequent relations. On the DocRED dataset, ERACL improved the Macro@100 metric (F1 score for relations with fewer than 100 instances) from a baseline of 18.76 to 22.31. This demonstrates that the combination of representation-level augmentation and contrastive learning effectively mitigates the impact of data scarcity.
Overall Efficiency and Generalization
ERACL also improved the standard F1 score on the DocRED development set by 0.71 over the state-of-the-art ATLOP baseline. In low-resource scenarios (e.g., using only 5% of training data), the performance gains were even more pronounced, highlighting the data efficiency of our approach. Results on HacRED confirmed that these benefits generalize across different languages and dataset scales.
Conclusion
ERA and ERACL provide a computationally efficient and effective solution to the long-tail problem in DocRE. By shifting augmentation from the text level to the representation level and leveraging contrastive learning, we enable models to learn more robust features for rare relations. Future work will explore integrating these techniques with distantly-supervised data to further bridge the gap in relation extraction performance.
Summary updated