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.
翻译:知识图谱(KGs)已成为问答系统和推荐系统等众多下游任务的核心支撑。尽管作用显著,但知识图谱往往存在严重不完整性问题。为在未见过的、具有不同于预训练时关系词汇的知识图谱中执行零样本知识图谱补全,知识图谱基础模型(KGFMs)受到了广泛关注。现有KGFMs通常采用随机负三元组进行训练,这些负三元组通过将正三元组的头实体或尾实体替换为随机实体构建而成。然而,此类负三元组质量有限,无法为KGFM训练提供有效的监督信号。本文提出一种简单而有效的自适应负采样方法KMAS,用于增强现有KGFMs。KMAS通过从现有KGFM的关系编码器生成的更新关系嵌入中构建困难负三元组。为进一步与训练过程中KGFM不断演进的能力自适应对齐,KMAS在整个训练过程中动态调整困难负三元组的比例:经过预热阶段后,该比例呈线性递增再线性递减。我们在44个数据集上进行了大量实验。实验结果表明,所提出的负采样方法能够在无需显著增加额外时间或内存消耗的情况下,有效增强多种当前最优的KGFMs。