Knowledge Graph Embeddings (KGE) aim to map entities and relations to low dimensional spaces and have become the \textit{de-facto} standard for knowledge graph completion. Most existing KGE methods suffer from the sparsity challenge, where it is harder to predict entities that appear less frequently in knowledge graphs. In this work, we propose a novel framework KRACL to alleviate the widespread sparsity in KGs with graph context and contrastive learning. Firstly, we propose the Knowledge Relational Attention Network (KRAT) to leverage the graph context by simultaneously projecting neighboring triples to different latent spaces and jointly aggregating messages with the attention mechanism. KRAT is capable of capturing the subtle semantic information and importance of different context triples as well as leveraging multi-hop information in knowledge graphs. Secondly, we propose the knowledge contrastive loss by combining the contrastive loss with cross entropy loss, which introduces more negative samples and thus enriches the feedback to sparse entities. Our experiments demonstrate that KRACL achieves superior results across various standard knowledge graph benchmarks, especially on WN18RR and NELL-995 which have large numbers of low in-degree entities. Extensive experiments also bear out KRACL's effectiveness in handling sparse knowledge graphs and robustness against noisy triples.
翻译:知识图谱嵌入旨在将实体和关系映射到低维空间,并已成为知识图谱补全的事实标准。现有大部分知识图谱嵌入方法面临稀疏性挑战,即对知识图谱中出现频率较低的实体预测更为困难。本文提出KRACL框架,通过图上下文与对比学习缓解知识图谱中普遍存在的稀疏性问题。首先,我们提出知识关系注意力网络,通过同时将邻域三元组投影到不同潜在空间并利用注意力机制联合聚合消息来利用图上下文。KRAT既能捕获不同上下文三元组的细微语义信息和重要性,也能利用知识图谱中的多跳信息。其次,我们提出知识对比损失,通过将对比损失与交叉熵损失结合,引入更多负样本以增强对稀疏实体的反馈。实验表明,KRACL在多个标准知识图谱基准上实现了优越性能,尤其在具有大量低入度实体的WN18RR和NELL-995数据集上表现突出。大量实验还证实了KRACL在处理稀疏知识图谱和抵抗噪声三元组方面的有效性。