Relational retrieval using a combination of path-constrained random walks

life


Written by title date
zhengchu1994 Relational retrieval using a combination of path-constrained random walks 2018-5-22 07:12:55

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

定义

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

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

T 0 R 1 . . . R l . . . T l

T 0 = d o m ( R 1 ) = d o m ( P ) T 1 = r a n g e ( R 1 ) = d o m ( R 2 ) 等。

  • Path Constrained Random Walk

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

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

  • P 是nonempty:

    (2) h s , P ( e ) = e r a n g e ( P ) h s , P ( e ) P ( e | e ; R l )

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

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

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

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

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

    2. 目标函数:

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

(5) o i ( θ ) = w i [ r i ln p i + ( 1 y i ) I n ( 1 p i ) ]

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

(6) p ( r i = 1 | x i ; θ ) = exp ( θ T x i ) 1 + exp ( θ T x i )

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

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

实践

在已有知识库如NELL上做预测,48条关系,对每个关系做给定 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》

猜你喜欢

转载自blog.csdn.net/nockinonheavensdoor/article/details/80788764