论文阅读笔记: Modeling Relational Data with Graph Convolutional Networks

arXiv:1703.06103v4

1.Introduction

主要贡献如下:

  • 第一个证明GCN框架可以应用于关系数据建模的工具,特别是链接预测和实体分类任务的工具。
  • 介绍了用于参数共享和实施稀疏性约束的技术,并使用它们将R-GCN应用于具有大量关系的多图。
  • 展示了以DistMult为例的分解模型的性能,可以通过在关系图中执行多个信息传播步骤的编码器模型来丰富它们,从而显着提高其性能。

2.神经关系建模(Neural relational modeling)

定义有向标签多图(directed and labeled multi-graphs)为 G = ( V , E , R ) G = (\mathcal{V}, \mathcal{E}, \mathcal{R}) G=(V,E,R),包含顶点 v i ∈ V v_i \in \mathcal{V} viV,和有标签的边(关系) ( v i , r , v j ) ∈ E (v_i, r, v_j) \in \mathcal{E} (vi,r,vj)E,其中的 r ∈ R r \in \mathcal{R} rR是一类关系类型。

R-GCN模型如下图:

在这里插入图片描述

2.1 关系图卷积网络(Relational graph convolutional networks)

一般的图卷积神经网络层结构:
h i ( l + 1 ) = σ ( ∑ m ∈ M i g m ( h i ( l ) , h j ( l ) ) ) h_i^{(l+1)} = \sigma \left( \sum_{m \in \mathcal{M}_i} g_m(h_{i}^{(l)}, h_{j}^{(l)}) \right) hi(l+1)=σ(mMigm(hi(l),hj(l)))
其中 M i \mathcal{M}_i Mi是顶点 v i v_i vi的消息输入顶点集合。 g m ( . , . ) g_m(.,.) gm(.,.)通常选择一个类似于神经网络函数,比如简单线性变换 g m ( h i , h j ) = W h j g_m(h_i, h_j) = Wh_j gm(hi,hj)=Whj

论文提出的图卷积神经网络层结构:
h i ( l + 1 ) = σ ( ∑ r ∈ R ∑ j ∈ N i r 1 c i , r W r ( l ) h j ( l ) + W r 0 ( l ) h j ( l ) ) . h_i^{(l+1)} = \sigma \left( \sum_{r \in \mathcal{R}} \sum_{j \in \mathcal{N}_i^r} \frac{1}{c_{i,r}} W_{r}^{(l)} h_{j}^{(l)} + W_{r0}^{(l)} h_{j}^{(l)} \right). hi(l+1)=σrRjNirci,r1Wr(l)hj(l)+Wr0(l)hj(l).
其中 N i r \mathcal{N}_i^r Nir是在关系 r ∈ R r \in \mathcal{R} rR下顶点 v i v_i vi的邻居顶点, c i , r c_{i,r} ci,r是归一化因子,可以取 c i , r = ∣ N i r ∣ c_{i,r}=|\mathcal{N}_i^r| ci,r=Nir

为图中的每个顶点添加自连接。

To ensure that the representation of a node at layer l + 1 l + 1 l+1 can also be informed by the corresponding representation at layer l l l, we add a single self-connection of a special relation type to each node in the data.

2.2 正则化(Regularization)

R-GCN的两种分离的正则化方法:basis-decomposition 和 block-diagonal-decomposition.

basis-decomposition :
W r ( l ) = ∑ b = 1 B a r , b ( l ) V b ( l ) , V b ( l ) ∈ R d ( l + 1 ) × d ( l ) . W_{r}^{(l)} = \sum_{b=1}^{B} a_{r,b}^{(l)} V_{b}^{(l)}, \qquad V_{b}^{(l)} \in \mathbb{R}^{d^{(l+1)} \times d^{(l)}}. Wr(l)=b=1Bar,b(l)Vb(l),Vb(l)Rd(l+1)×d(l).
a r , b ( l ) a_{r,b}^{(l)} ar,b(l)是只依赖于 r r r的因子。
W r ( l ) W_{r}^{(l)} Wr(l)是由 V b ( l ) V_{b}^{(l)} Vb(l)线性组合。

block-diagonal decomposition
W r ( l ) = ⨁ b = 1 B Q b , r ( l ) , Q b , r ( l ) ∈ R d ( l + 1 ) B × d ( l ) B . W_{r}^{(l)} = \bigoplus_{b=1}^{B} Q_{b,r}^{(l)}, \qquad Q_{b,r}^{(l)} \in \mathbb{R}^{ \frac{d^{(l+1)}}{B} \times\frac{d^{(l)}}{B} }. Wr(l)=b=1BQb,r(l),Qb,r(l)RBd(l+1)×Bd(l).
W r ( l ) W_{r}^{(l)} Wr(l)是由 V b ( l ) V_{b}^{(l)} Vb(l)组成的块对角矩阵 d i a g ( Q 1 , r ( l ) , ⋯   , Q B , r ( l ) ) diag(Q_{1,r}^{(l)}, \cdots, Q_{B,r}^{(l)}) diag(Q1,r(l),,QB,r(l))

basis-decomposition可以看作是不同关系类型之间有效权重共享的一种形式,而block-diagonal decomposition可以看作是每种关系类型对权重矩阵的稀疏约束。 块分解结构编码的直觉是,可以将潜在特征分组为变量集,这些变量在组内比在组之间更紧密地耦合。 两种分解都减少了学习高度多关系数据(例如,现实的知识库)所需的参数数量。 同时,我们期望基本参数化可以缓解稀疏关系的过度拟合,因为稀疏关系和更频繁关系之间共享参数更新。

3.实体分类(Entity classification)

最后一层采用 s o f t m a x ( . ) softmax(.) softmax(.)激活函数,在有标签顶点上使用cross-entropy loss:
L = − ∑ i ∈ Y ∑ k = 1 K t i , k ln ⁡ h i , k L . \mathcal{L} = - \sum_{i \in \mathcal{Y}} \sum_{k=1}^{K} t_{i,k} \ln h_{i,k}^{L}. L=iYk=1Kti,klnhi,kL.
其中 Y \mathcal{Y} Y是有标签顶点集, t i , k t_{i,k} ti,k是ground-truth。

4.链接预测(Link prediction)

Link prediction的任务 知识库由一般用有向有标签图 G ( V , E , R ) G(\mathcal{V}, \mathcal{E},\mathcal{R}) G(V,E,R)表示,一般提供一个不完全的边子集 E ^ \hat{\mathcal{E}} E^,需要找到一个分数函数 f ( s , r , o ) f(s,r,o) f(s,r,o)将边 ( s , r , o ) (s,r,o) (s,r,o)预测为某类的分数。

采用自动编码机模型:

Encoder 将每个实体 v i ∈ V v_i \in \mathcal{V} viV 映射到一个实值向量 e ⃗ i ∈ R d \vec{e}_i \in \mathbb{R}^d e iRd

Decoder 解码器根据顶点表示重建图的边,将(subject, relation, object)三元组映射一个实数分数,即 s : R d × R × R d → R s:\mathbb{R}^d \times \mathcal{R} \times \mathbb{R}^d \rightarrow \mathbb{R} s:Rd×R×RdR

使用DistMult[ang et al. 2014]做解码器,每个关系 r r r对应一个对角阵 R r ∈ R d × d R_r \in \mathbb{R}^{d \times d} RrRd×d,元组 ( s , r , o ) (s,r,o) (s,r,o)的分数为:
f ( s , r , o ) = e s T R r e 0 . f(s,r,o) = e_s^T R_r e_0. f(s,r,o)=esTRre0.

使用负样本训练模型采样。 对于每个观察到的示例,我们进行采 w w w个负样本。通过随机破坏每个正面示例的主题或对象来进行采样。 针对交叉熵损失进行了优化,以使模型的可观察三元组得分高于负三元组:
L = − 1 ( 1 + w ) ∣ E ^ ∣ ∑ ( s , r , o , y ) ∈ T y log ⁡ l ( f ( s , r , o ) ) + ( 1 − y ) log ⁡ ( 1 − l ( f ( s , r , o ) ) ) . \mathcal{L} = - \frac{1}{(1+w)|\hat{\mathcal{E}}|} \sum_{(s,r,o,y)\in \mathcal{T}} y \log l(f(s,r,o)) + (1-y) \log \left( 1-l(f(s,r,o)) \right). L=(1+w)E^1(s,r,o,y)Tylogl(f(s,r,o))+(1y)log(1l(f(s,r,o))).
其中 T \mathcal{T} T是总的样本数(含真实的与破坏得到的负样本), l l l是logistic sigmoid函数, y y y是指示函数,真样本是取值为1,否则为0。

5.对该方法的实验评估

关系抽取实验

数据集:WordNet(WN18),Freebase(FB15K)

baseline:LinkFeat,DistMult,CP,TransE,HolE,ComplEx

评价准则:MRR(mean reciprocal rank)(Raw,Filtered),Hits @(1,3,10)

结果如下图:

在这里插入图片描述

实体分类实验
数据集:AIFB、MUTAG、BGS、AM

baseline:Feat、WL、RDF2Vec

评价准则:准确率

结果如下图:

在这里插入图片描述

参考文献

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Implement natural language processing applications with Python using a problem-solution approach. This book has numerous coding exercises that will help you to quickly deploy natural language processing techniques, such as text classification, parts of speech identification, topic modeling, text summarization, text generation, entity extraction, and sentiment analysis. Natural Language Processing Recipes starts by offering solutions for cleaning and preprocessing text data and ways to analyze it with advanced algorithms. You’ll see practical applications of the semantic as well as syntactic analysis of text, as well as complex natural language processing approaches that involve text normalization, advanced preprocessing, POS tagging, and sentiment analysis. You will also learn various applications of machine learning and deep learning in natural language processing. By using the recipes in this book, you will have a toolbox of solutions to apply to your own projects in the real world, making your development time quicker and more efficient. What You Will Learn • Apply NLP techniques using Python libraries such as NLTK, TextBlob, spaCy, Stanford CoreNLP, and many more • Implement the concepts of information retrieval, text summarization, sentiment analysis, and other advanced natural language processing techniques. • Identify machine learning and deep learning techniques for natural language processing and natural language generation problems Who This Book Is For Data scientists who want to refresh and learn various concepts of natural language processing through coding exercises.

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值