Knowledge graphs (KGs) have become the core backbone of numerous downstream tasks such as question answering and recommender systems. However, despite all this, KGs are often very incomplete. To perform zero-shot knowledge graph completion in unseen KGs, which have different relational vocabularies from those used for pre-training, KG foundation models (KGFMs) receive a wide range of attention. Existing KGFMs often perform training using random negative triples, which are constructed by replacing the head or tail entity of a positive triple with a random entity. However, these negative triples are often constructed with limited quality, providing weak supervision for KGFM training. In this paper, we propose a simple yet effective adaptive negative sampling approach, KMAS, to enhance existing KGFMs. KMAS constructs hard negative triples through the updated relation embeddings generated from the existing KGFM's relation encoder. To further adaptively align with the evolving capability of the KGFM during the training process, KMAS adjusts the ratio of hard negative triples dynamically throughout the whole training process: after a warmup phrase, it increases the ratio linearly and then decreases linearly. Extensive experiments are conducted over 44 data sets. Experimental results demonstrate that our proposed negative sampling method can enhance many SOTA KGFMs without requiring excessive additional time or memory consumption.
翻译:知识图谱已成为问答、推荐系统等众多下游任务的核心支撑。然而尽管如此,知识图谱通常非常不完整。为了在未见过的知识图谱(这些图谱的关系词汇与预训练所用不同)中执行零样本知识图谱补全,知识图谱基础模型受到了广泛关注。现有知识图谱基础模型通常使用随机负三元组进行训练,这些负三元组通过替换正三元组的头实体或尾实体为随机实体构建而成。然而,这些负三元组质量有限,为知识图谱基础模型训练提供的监督信号较弱。本文提出一种简单而有效的自适应负采样方法KMAS,用于增强现有知识图谱基础模型。KMAS通过从现有知识图谱基础模型关系编码器生成的更新关系嵌入构建困难负三元组。为进一步自适应地配合训练过程中知识图谱基础模型不断演进的能力,KMAS在整个训练过程中动态调整困难负三元组的比例:经过预热阶段后,该比例先线性增加再线性减少。我们在44个数据集上开展了广泛实验。实验结果表明,所提出的负采样方法能在不显著增加额外时间或内存消耗的情况下增强多种最先进知识图谱基础模型。