TransH 论文笔记

Knowledge Graph Embedding by Translating on Hyperplanes

- Abstract

TransH在TransE的基础上的改进,将关系映射到超平面,在超平面上进行平行操作。并提出更好的负例样本设计方式。

- Background

最开始的传统逻辑推理方式,不易于处理,也不具有健壮性。后发展到,将知识图谱嵌入到向量空间,关系r则是向量空间中的操作。
在这里插入图片描述
其中,TransE并不能很好的处理“reflexive, one-to-many, many-to-one, and many-to-many”。
在这里插入图片描述

- ALgorithm

在这里插入图片描述
In TransH, each relation is characterized by two vectors, the norm vector (wr) of the hyperplane, and the translation vector (dr ) on the hyperplane. For a golden triplet (h, r, t), that it is correct in terms of worldly facts, the projections of h and t on the hyperplane are expected to be connected by the translation vector dr with low error.
不是是实体的相同嵌入空间内操作,而是映射到超平面。
在这里插入图片描述
Wr.T * h = h · Wr( 点积),是h在单位向量Wr上的投影。再乘上Wr,则为hwr。
打分函数:
在这里插入图片描述在这里插入图片描述
最小化损失函数的限制:
在这里插入图片描述
非受限损失函数:
在这里插入图片描述
同时采用随机梯度下降算法。

降低错误的负例:
We tend to give more chance to replacing the head entity if the relation is one-to-many and give more chance to replacing the tail entity if the relation is many-to-one. In this way, the chance of generating false negative labels is reduced.
在这里插入图片描述tph -> 每头实体所对应的尾实体个数;
hpt -> 每尾实体所对应的头实体个数。

- Experiment

在这里插入图片描述
link prediction:
this task is to complete a triplet (h, r, t) with h or t missing, i.e., predict t given (h,r) or predict h given (r,t). Rather than requiring one best answer, this task emphasizes more on ranking a set of candidate entities from the knowledge graph.
Regarding the strategy of constructing negative labels, we use “unif” to denote the tra- ditional way of replacing head or tail with equal probability, and use “bern.” to denote reducing false negative labels by replacing head or tail with different probabilities.
在这里插入图片描述
even the naive baseline Unstructured (i.e., TransE without translation) outperform other approaches on WN18 in terms of the Mean metric. This may be because the number of relations in WN18 is quite small so that it is acceptable to ignore the different types of relations.
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
triplets classification:
This task is to confirm whether a given triplet (h, r, t) is cor- rect or not, i.e., binary classification on a triplet.
在这里插入图片描述
NTN:张量神经网络模型
FB13是稠密的图谱,具有强关连性。

relational fact extraction:
knowledge graph embedding is able to score a candidate fact, without observing any evidence from ex- ternal text corpus.
精确率和召回率的关系:https://www.zhihu.com/question/19645541
在这里插入图片描述
在这里插入图片描述
图a:结合Sm2r(文本侧提取法)的得分规则,计算出TransE、TransH的得分
图b:体现TransE、TransH的独立预测能力,以矢量嵌入为得分规则
Sm2r on this subset of candidates. TransH performs much better than TransE when recall is higher than 0.6.

- Conclusion

TransH overcomes the flaws of TransE concerning the reflexive/one-to-many/many-to-one/many-to-many rela- tions while inheriting its efficiency. Extensive experiments on the tasks of link prediction, triplet classification, and rela- tional fact extraction show that TransH brings promising im- provements to TransE. The trick of reducing false negative labels proposed in this paper is also proven to be effective.

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
TransH 是一种用于知识图谱嵌入学习的算法,它是由王垚等人在 2014 年提出的。TransH 算法主要思想是将实体和关系都嵌入到一个低维的空间中,并通过一定的方式计算它们之间的关系。该算法在处理一些复杂的知识图谱任务时表现良好。 TransH 算法的核心思想是将关系表示为一个超平面,即每个关系都有一个对应的超平面来刻画它。而实体则表示为在该超平面上的点。这样做的好处是可以将关系的语义进行更好的刻画,而不仅仅是简单地将实体和关系嵌入到同一个向量空间中。具体来说,TransH 算法将每个实体和关系都表示为一个向量,然后通过一定的方式计算它们之间的关系。 具体来说,对于一个三元组 $(h,r,t)$,其中 $h$ 表示头实体,$r$ 表示关系,$t$ 表示尾实体,TransH 算法的计算方式如下: 1. 对于一个头实体 $h$,将其表示为一个向量 $\textbf{h}$。 2. 对于一个关系 $r$,将其表示为一个超平面 $\textbf{r}$。 3. 对于一个尾实体 $t$,将其表示为一个向量 $\textbf{t}$。 4. 利用向量 $\textbf{h}$ 和超平面 $\textbf{r}$ 计算出一个向量 $\textbf{h}_r$,表示头实体 $h$ 在关系 $r$ 下的嵌入向量,具体计算方式为 $\textbf{h}_r = \textbf{h} - \textbf{r}^\top\textbf{h}\textbf{r}$。 5. 利用向量 $\textbf{t}$ 和超平面 $\textbf{r}$ 计算出一个向量 $\textbf{t}_r$,表示尾实体 $t$ 在关系 $r$ 下的嵌入向量,具体计算方式为 $\textbf{t}_r = \textbf{t} - \textbf{r}^\top\textbf{t}\textbf{r}$。 6. 计算两个向量 $\textbf{h}_r$ 和 $\textbf{t}_r$ 的相似度得分,得分越高表示两个实体越可能存在该关系,具体计算方式为 $\text{score}(h,r,t) = -\|\textbf{h}_r + \textbf{r} - \textbf{t}_r\|_2^2$。 TransH 算法的优点在于它可以更好地刻画关系的语义,从而提高知识图谱的表示效果。同时,TransH 算法也可以处理一些复杂的关系,例如多对多关系和自反关系等。缺点是计算量较大,同时在一些简单的任务上可能表现不如其他算法。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值