美文网首页
Graph Attention Networks

Graph Attention Networks

作者: 哒丑鬼 | 来源:发表于2019-03-18 22:41 被阅读0次

作者:Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Yoshua Bengio

来源: ICLR 2018

链接: link

研究机构:Department of Computer Science and Technology;Centre de Visi´o per Computador, UAB;Montreal Institute for Learning Algorithms

源码链接: source code


这篇文章主要利用Attention机制计算Graph中节点的表示。通常在Graph中,节点的属性与其邻近节点的关系非常密切,打个比方,判断一篇论文的研究方向,除了可以通过论文本身来判断,还可以根据其引用的参考文献来大致判断。

Background

GAT architechture

令Graph attentional layer的输入是\mathbf{h}=\left\{\vec{h}_{1}, \vec{h}_{2}, \ldots, \vec{h}_{N}\right\}, \vec{h}_{i} \in \mathbb{R}^{F},其中N是节点数,F是每个节点特征数。同时令输出为\mathbf{h}^{\prime}=\left\{\vec{h}_{1}^{\prime}, \vec{h}_{2}^{\prime}, \ldots, \vec{h}_{N}^{\prime}\right\}, \vec{h}_{i}^{\prime} \in \mathbb{R}^{F^{\prime}}
与普通的self-attention类似,Graph Attention也是计算节点与节点之间的注意力权重,通过加权和得到输出。考虑一个问题:如果按照普通self-attention的方式来处理Graph attentional layer的输入,那么处理流程就与普通序列无异,导致丢失所有的图结构信息。考虑到图结构中,与目标节点距离越大,意味着关联性越小,因此作者在计算attention的时候仅考虑与目标节点相邻的节点。在这篇文章中,仅考虑一阶邻近的节点。
假设目标节点是i,其一阶邻近节点集合表示为\mathcal{N}_ {i}。对于j \in \mathcal{N}_ {i}i,j之间的score function表示为e_{ij},计算方法如下:
e_{ij} = \text { LeakyReLU }\left(\vec{\mathbf{a}}^{T}\left[\mathbf{W} \vec{h}_{i} \| \mathbf{W} \vec{h}_{j}\right]\right)
其中,\mathbf{W} \in \mathbb{R}^{F^{\prime} \times F}, \vec{\mathbf{a}} \in \mathbb{R}^{2 F^{\prime}}\|表示向量拼接。
最后,\vec h^{\prime}_ i可以表示为:
\begin{aligned} \vec{h}_{i}^{\prime}&=\sigma\left(\sum_{j \in \mathcal{N}_{i}} \alpha_{i j} \mathbf{W} \vec{h}_{j}\right)\\ &=\sigma\left(\sum_{j \in \mathcal{N}_{i}} \operatorname{softmax}_{j}\left(e_{i j}\right) \mathbf{W} \vec{h}_{j}\right) \end{aligned}

当然了,Graph attentional layer可以是multi-head的,文章提供了两种multi-head graph attention的aggregation方法,分别是向量拼接和平均(如图所示)。假设有K个独立的graph attention模块,那么这两种aggregation下的输出可以表示为:
\vec{h}_{i}^{\prime}=\prod_{k=1}^{K} \sigma\left(\sum_{j \in \mathcal{N}_{i}} \alpha_{i j}^{k} \mathbf{W}^{k} \vec{h}_{j}\right)
\vec{h}_{i}^{\prime}=\sigma\left(\frac{1}{K} \sum_{k=1}^{K} \sum_{j \in \mathcal{N}_{i}} \alpha_{i j}^{k} \mathbf{W}^{k} \vec{h}_{j}\right)

Evaluation

作者将GAN应用到了两个任务:Transductive learning和Inductive learning,前者选取了3个数据集,后者1个数据集。最终GAN能够取得超过或者持平SOAT的结果。

相关文章

网友评论

      本文标题:Graph Attention Networks

      本文链接:https://www.haomeiwen.com/subject/grbimqtx.html