Some of the most successful knowledge graph embedding (KGE) models for link prediction -- CP, RESCAL, TuckER, ComplEx -- can be interpreted as energy-based models. Under this perspective they are not amenable for exact maximum-likelihood estimation (MLE), sampling and struggle to integrate logical constraints. This work re-interprets the score functions of these KGEs as circuits -- constrained computational graphs allowing efficient marginalisation. Then, we design two recipes to obtain efficient generative circuit models by either restricting their activations to be non-negative or squaring their outputs. Our interpretation comes with little or no loss of performance for link prediction, while the circuits framework unlocks exact learning by MLE, efficient sampling of new triples, and guarantee that logical constraints are satisfied by design. Furthermore, our models scale more gracefully than the original KGEs on graphs with millions of entities.
翻译:一些最成功的知识图谱嵌入(KGE)模型——CP、RESCAL、TuckER、ComplEx——在链接预测任务中可被解释为基于能量的模型。在这种视角下,它们不适用于精确的最大似然估计(MLE)、采样,且难以整合逻辑约束。本研究将这些KGE的评分函数重新解释为电路——一种允许高效边缘化的受约束计算图。随后,我们设计了两种方法:通过限制其激活函数为非负或对输出进行平方,来获得高效的生成式电路模型。我们的解释在链接预测中性能几乎无损,同时电路框架解锁了通过MLE进行精确学习、新三元组的高效采样,并确保逻辑约束在设计上得以满足。此外,我们的模型在拥有数百万实体的图上比原始KGE更具扩展性。