目录

Compounding-Geometric-Operations-for-Knowledge-Graph-Completion论文笔记

Compounding Geometric Operations for Knowledge Graph Completion(论文笔记)

CCF等级:A

发布时间:2023年7月

25年3月10日交

一、简介

使用知识图谱嵌入模型,将三元组(h,r,t)中关系 r 转化为平移、旋转、缩放矩阵对头节点以及尾节点进行运算,判定三元组的真实性。

二、原理

1.整体

CompoundE评分函数:

https://latex.csdn.net/eq?f%28h%2Ct%29%3D%7C%7CT_r%5Ccdot%20R_r%5Ccdot%20S_r%5Ccdot%20h-%20%5Cwidehat%7BT_r%7D%20%5Ccdot%20%5Cwidehat%7BR_r%7D%20%5Ccdot%20%5Cwidehat%7BS_r%7D%20%5Ccdot%20t%7C%7C

其中 h , t 表示头部和尾部实体嵌入, https://latex.csdn.net/eq?T_rhttps://latex.csdn.net/eq?R_rhttps://latex.csdn.net/eq?S_R 表示头部实体嵌入的平移、旋转、缩放操作。 https://latex.csdn.net/eq?%5Cwidehat%7BT_r%7Dhttps://latex.csdn.net/eq?%5Cwidehat%7BR_r%7Dhttps://latex.csdn.net/eq?%5Cwidehat%7BS_r%7D 表示尾部实体嵌入的平移、旋转、缩放操作。由于矩阵乘法是不可交换的,不同计算顺序会产生不同性能的CompoundE,这个看附录B。

2.单个矩阵

二维平移矩阵可以写成

https://latex.csdn.net/eq?T%3D%5Cbegin%7Bbmatrix%7D%201%26%200%20%26v_x%20%5C%5C%200%20%26%201%20%26v_y%20%5C%5C%200%20%26%200%20%26%201%20%5Cend%7Bbmatrix%7D

二维旋转矩阵可以写成

https://latex.csdn.net/eq?R%3D%5Cbegin%7Bbmatrix%7D%20%5Ccos%28%5Ctheta%29%20%26%20-%5Csin%28%20%5Ctheta%29%20%260%20%5C%5C%20%5Csin%28%20%5Ctheta%29%20%26%20%5Ccos%28%5Ctheta%29%20%26%200%5C%5C%200%26%200%20%26%201%20%5Cend%7Bbmatrix%7D

二维缩放矩阵可以写成

https://latex.csdn.net/eq?S%3D%5Cbegin%7Bbmatrix%7D%20s_x%20%26%200%260%20%5C%5C%200%26%20s_y%20%260%20%5C%5C%200%26%200%20%26%201%20%5Cend%7Bbmatrix%7D

因此,复合矩阵可以表示为

https://latex.csdn.net/eq?T%20%5Ccdot%20R%20%5Ccdot%20S%3D%5Cbegin%7Bbmatrix%7D%20s_x%5Ccos%28%5Ctheta%29%26%20-s_y%5Csin%28%5Ctheta%29%20%26v_x%20%5C%5C%20s_x%5Csin%28%5Ctheta%29%26%20s_y%5Ccos%28%5Ctheta%29%20%26v_y%20%5C%5C%200%26%200%20%26%201%20%5Cend%7Bbmatrix%7D

https://latex.csdn.net/eq?s_x%3D0https://latex.csdn.net/eq?s_y%3D0 时,复合矩阵是可逆的。它可以写成

https://latex.csdn.net/eq?M%5E%7B-1%7D%3D%5Cbegin%7Bbmatrix%7D%20A%5E%7B-1%7D%26%20-A%5E%7B-1%7Dv%5C%5C%200%26%201%20%5Cend%7Bbmatrix%7D

3.与其他距离KGE模型的关系

文章中讲述可以使用CompoundE中特定形式的矩阵,从CompoundE的评分函数中派生出TransE、RotatE、LinearRE、PairRE的评分函数。

4.Compound的损失函数

损失函数可以写为

https://latex.csdn.net/eq?L_%7BKGE%7D%3D-%5Clog%20%5Csigma%20%28%5Czeta%20_1-f_r%28h%2Ct%29%29-%5Csum_%7Bi-1%7D%5E%7Bn%7D%5Crho%28h_%7Bi%7D%5E%7B%27%7D%2Cr%2Ct_%7Bi%7D%5E%7B%27%7D%29%20%5Clog%20%5Csigma%20%28f_r%28h_%7Bi%7D%5E%7B%27%7D%2Ct_%7Bi%7D%5E%7B%27%7D%29-%5Czeta%20_1%29

其中 https://latex.csdn.net/eq?%5Csigma 是sigmoid函数, https://latex.csdn.net/eq?%5Czeta_1 是一个固定边界超参数, https://latex.csdn.net/eq?%28h_%7Bi%7D%5E%7B%27%7D%2Cr%2Ct_%7Bi%7D%5E%7B%27%7D%29 是第 i 个负三元组, https://latex.csdn.net/eq?p%28h_%7Bi%7D%5E%7B%27%7D%2Cr%2Ct_%7Bi%7D%5E%7B%27%7D%29 是负三元组得到的概率。给正三元组 https://latex.csdn.net/eq?%28h_i%2Cr%2Ct_i%29 ,负采样分布为

https://latex.csdn.net/eq?p%28h_%7Bj%7D%5E%7B%27%7D%2Cr%2Ct_%7Bj%7D%5E%7B%27%7D%20%7C%20%5C%7B%20%28h_i%2Cr%2Ct_i%29%5C%7D%20%29%20%3D%20%5Cfrac%7B%20%5Cexp%20%5Calpha_1%20f_r%28h_%7Bj%7D%5E%7B%27%7D%2Ct_%7Bj%7D%5E%7B%27%7D%29%7D%7B%5Csum_i%20%5Cexp%20%5Calpha_1%20f_r%28h_%7Bi%7D%5E%7B%27%7D%2Ct_%7Bi%7D%5E%7B%27%7D%29%7D

https://latex.csdn.net/eq?%5Calpha_1 是采样温度。

三、实验性能

1.链接预测

https://i-blog.csdnimg.cn/direct/bfa6e054db434b0ca58b006a57c31184.png

表2

https://i-blog.csdnimg.cn/direct/c57a21eed9f64cae9b8fe279e1f54717.png

表3

表2表2表示CompoundE和其他嵌入模型在FB15k-237、为WN18RR和ogbl-wikikg2数据集上的性能比较。CompoundE是所在三个数据集中具有竞争力的模型。CompoundE的结果比以前的KGE模型更好,嵌入维度和模型则明显较低。意味着CompoundE的计算和内存成本更低。

https://i-blog.csdnimg.cn/direct/22c51767d07a435995c87fe882de4af1.png

表4

表4表示头部与尾部实体预测性能中CompoundE其他模型在1对1、1对多、多对1,多对多关系上的MRR分数。

2.路径查询应答

https://i-blog.csdnimg.cn/direct/700177199cb54f768a6a18a8b3251534.png

表6

表6表示在路径查询应答(PQA)中路径查询问答的性能对比。例如(米歇尔奥巴马的配偶住在哪里?)

3.复杂度分析

https://i-blog.csdnimg.cn/direct/72dc1e35ea754a9dab4390ac53059ff8.png

图3

设置了不同维度,不同模型在ogbl-wikikg2数据集上的MRR分数。即使在低维时,CompoundE也优于其他模型。

四、结论和未来工作

1.准备考虑CompoundE中更复杂的操作。例如,最近有一种趋势是将2D旋转扩展到3D旋转,用于基于旋转的嵌入。

2.探索更高维度的变换,如3D变换,并比较建模能力。