Both graph structures and textual information play a critical role in Knowledge Graph Completion (KGC). With the success of Pre-trained Language Models (PLMs) such as BERT, they have been applied for text encoding for KGC. However, the current methods mostly prefer to fine-tune PLMs, leading to huge training costs and limited scalability to larger PLMs. In contrast, we propose to utilize prompts and perform KGC on a frozen PLM with only the prompts trained. Accordingly, we propose a new KGC method named PDKGC with two prompts -- a hard task prompt which is to adapt the KGC task to the PLM pre-training task of token prediction, and a disentangled structure prompt which learns disentangled graph representation so as to enable the PLM to combine more relevant structure knowledge with the text information. With the two prompts, PDKGC builds a textual predictor and a structural predictor, respectively, and their combination leads to more comprehensive entity prediction. Solid evaluation on two widely used KGC datasets has shown that PDKGC often outperforms the baselines including the state-of-the-art, and its components are all effective. Our codes and data are available at https://github.com/genggengcss/PDKGC.
翻译:图结构与文本信息在知识图谱补全(KGC)中均扮演关键角色。随着BERT等预训练语言模型(PLM)的成功应用,它们已被用于KGC的文本编码。然而,现有方法大多倾向于微调PLM,导致训练成本高昂且难以扩展至更大的PLM。相反,我们提出利用提示(prompts),仅在冻结的PLM上训练提示来完成KGC。据此,我们提出一种名为PDKGC的新型KGC方法,包含两种提示:一是硬任务提示,用于将KGC任务适配至PLM的令牌预测预训练任务;二是解耦结构提示,通过学习解耦的图表示,使PLM能够将更多相关结构知识与文本信息结合。借助这两种提示,PDKGC分别构建了文本预测器和结构预测器,二者的组合实现了更全面的实体预测。在两个广泛使用的KGC数据集上的严格评估表明,PDKGC通常优于包括最先进方法在内的基线模型,且其各组件均有效。我们的代码和数据已公开于https://github.com/genggengcss/PDKGC。