Relational retrieval using a combination of path-constrained random walks

life


Written bytitledate
zhengchu1994Relational retrieval using a combination of path-constrained random walks2018-5-22 07:12:55

(提出的算法)PRRW:核心思想是利用连接两个实体的路径去预测他们之间是否有潜在的关系。

定义

  • An Entity-Relation graph G=(T,E,R) G = ( T , E , R ) , is
    • a set of entities types T={T} T = { T }
    • a set of entities E={e} E = { e } , Each entity is typed with TT T ∈ T
    • a set of relations R={R} R = { R }
  • input:查询节点(query nodes)和指定返回的类型(answer type)。
  • output:返回指定类型下,排好序(ordered by proximity to the query nodes)的节点。
  • R R :是二元关系,R(e,e) 表示实体 e e e 之间存在关系 R R
  • R(e){e:R(e,e)},即和 e e 存在关系R的所有实体集合。
  • dom(R) d o m ( R ) :关系 R R 的值域。
  • range(R):关系 R R 的排名。
  • P:查询下给出的关系路径 P={R1R2...Rl} P = { R 1 R 2 . . . R l } ,约束是
    i:1<i<l1range(Ri)=dom(Ri+1) ∀ i : 1 < i < l − 1 , r a n g e ( R i ) = d o m ( R i + 1 ) ,定义 dom(R1)=dom(P) d o m ( R 1 ) = d o m ( P ) range(Rl)=range(P) r a n g e ( R l ) = r a n g e ( P )

则对于路径 P={R1R2...Rl} P = { R 1 R 2 . . . R l }

T0R1...Rl...Tl T 0 → R 1 . . . → R l . . . T l

T0=dom(R1)=dom(P) T 0 = d o m ( R 1 ) = d o m ( P ) T1=range(R1)=dom(R2) T 1 = r a n g e ( R 1 ) = d o m ( R 2 ) 等。

  • Path Constrained Random Walk

    • Given a query q=(Eq,Tq) q = ( E q , T q )
    • Recursively define a distribution for each path:
  • P P 是empty path:

    (1)hs,P(e)={1, if e=s 0,otherwise

  • P P 是nonempty:

    (2)hs,P(e)=erange(P)hs,P(e)P(e|e;Rl)

    这里的 P(e|e;Rl)=Rl(e,e)|Rl(e,)| P ( e | e ′ ; R l ) = R l ( e ′ , e ) | R l ( e ′ , ⋅ ) | 是给定 Rl R l e e ′ ,一步随机游走到 e e 的概率。

    1. 这里的s是查询的节点, e e 是返回的最终节点。
  • 路径特征(path feature):把查询到的s e e 之间的各个路径P1,...,Pn ,即 hs,Pi(e) h s , P i ( e ) 都作为特征,整个查询的得分是:

    score(e;s)=PPlhs,P(e)θP(3) (3) score ( e ; s ) = ∑ P ∈ P l h s , P ( e ) θ P

    这里的 Pl P l 是长度小于 l l 的关系路径集合。

    1. 给出关系集合 R 和节点对集合 {(si,ti)} { ( s i , t i ) } ,构造训练集 D={(xi,ri)} D = { ( x i , r i ) } ;
      其中 xi x i (si,ti) ( s i , t i ) (查询节点,返回终点)的全部路径和一起的向量,比如 xi x i 的第 j j 个标量是 hsi,Pj(ti) , ri r i 表示关系 R(si,ti) R ( s i , t i ) 是否为真。

    2. 目标函数:

      O(θ)=ioi(θ)λ|θ|1λ2|θ|2,(4) (4) O ( θ ) = ∑ i o i ( θ ) − λ | θ | 1 − λ 2 | θ | 2 ,

oi(θ)=wi[rilnpi+(1yi)In(1pi)](5) (5) o i ( θ ) = w i [ r i ln ⁡ p i + ( 1 − y i ) I n ( 1 − p i ) ]

这里的 pi p i 是预测相关性:

p(ri=1|xi;θ)=exp(θTxi)1+exp(θTxi)(6) (6) p ( r i = 1 | x i ; θ ) = exp ⁡ ( θ T x i ) 1 + exp ⁡ ( θ T x i )

wi w i 衡量每个样本的重要性程度

  • 待补充:Low-Variance Sampling(LVS),附加查询限制条件,只为保证只有小部分负样本被用在目标函数的优化中。原因是KB中的关系类型很多,即时限制路径长度,得到的关系路径还是巨大且无用。

实践

在已有知识库如NELL上做预测,48条关系,对每个关系做给定 x x 预测y,正反预测共96个任务,训练集是
$$ each \ node \ x \ has \ relation\ R_i\ in \ KB \xrightarrow{R_i}any\ node \ y \$$
* $y$是正样本:如果$y$在KB中已经满足$R(x,y)$,
* $y$是负样本:不在上面都是负样本。

实验

结论

参考

http://www.cbdio.com/BigData/2016-08/30/content_5224578.htm
https://wenku.baidu.com/view/ddca21030166f5335a8102d276a20029bd64636e.html
《Relational retrieval using a combination of path-constrained random walks》
《Random Walk Inference and Learning in A Large Scale Knowledge Base》

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值