Few-shot Relation Extraction (FSRE) aims to extract relational facts from a sparse set of labeled corpora. Recent studies have shown promising results in FSRE by employing Pre-trained Language Models (PLMs) within the framework of supervised contrastive learning, which considers both instances and label facts. However, how to effectively harness massive instance-label pairs to encompass the learned representation with semantic richness in this learning paradigm is not fully explored. To address this gap, we introduce a novel synergistic anchored contrastive pre-training framework. This framework is motivated by the insight that the diverse viewpoints conveyed through instance-label pairs capture incomplete yet complementary intrinsic textual semantics. Specifically, our framework involves a symmetrical contrastive objective that encompasses both sentence-anchored and label-anchored contrastive losses. By combining these two losses, the model establishes a robust and uniform representation space. This space effectively captures the reciprocal alignment of feature distributions among instances and relational facts, simultaneously enhancing the maximization of mutual information across diverse perspectives within the same relation. Experimental results demonstrate that our framework achieves significant performance enhancements compared to baseline models in downstream FSRE tasks. Furthermore, our approach exhibits superior adaptability to handle the challenges of domain shift and zero-shot relation extraction. Our code is available online at https://github.com/AONE-NLP/FSRE-SaCon.
翻译:少样本关系抽取旨在从稀疏标注语料中提取关系事实。近年来,基于监督对比学习框架结合预训练语言模型的方法在该任务中取得了显著进展,该方法同时考虑了实例与标签事实。然而,如何有效利用海量实例-标签对以增强所学表征的语义丰富性仍未被充分探索。针对这一空白,我们提出了一种新颖的协同锚定对比预训练框架。该框架基于以下洞察:通过实例-标签对传递的不同视角能够捕获不完整但互补的内在文本语义。具体而言,我们的框架包含一个对称对比目标,融合了句子锚定对比损失和标签锚定对比损失。通过联合优化这两个损失,模型构建了一个鲁棒且统一的表征空间,该空间有效捕获了实例与关系事实间的特征分布互对齐,同时增强了同一关系内不同视角间的互信息最大化。实验结果表明,该框架在下游少样本关系抽取任务中相较于基线模型实现了显著性能提升。此外,我们的方法在应对领域迁移和零样本关系抽取挑战时展现出更强的适应性。相关代码已开源至 https://github.com/AONE-NLP/FSRE-SaCon。