Paper Information

Title:《How Powerful are Graph Neural Networks?》
Authors:Keyulu Xu, Weihua Hu, J. Leskovec, S. Jegelka
Sources:2019, ICLR
Paper:Download
Code:Download
Others:2421 Citations, 45 References


Abstract

  GNN 目前主流的做法是递归迭代聚合一阶邻域表征来更新节点表征,如 GCN 和 GraphSAGE,但这些方法大多是经验主义,缺乏理论去理解 GNN 到底做了什么,还有什么改进空间。

1 Introduction

  GNN 的变体均是遵循两个步骤:邻居聚合(neighborhood aggregation) 和 图池化(graph-level pooling)。  

  GNN 广泛遵循递归邻域聚合(或消息传递)方案,其中每个节点聚合其邻居的特征向量来计算其新的特征向量。经过 $k$ 次聚合迭代后,一个节点由其转换后的特征向量表示,该特征向量捕获该节点的 $k$ 跳邻域内的结构信息。然后,可以通过池化来获得整个图的表示,例如,通过将图中所有节点的表示向量相加。

  目前研究现状:新 GNN 的设计大多基于经验直觉、启发式和实验试验模式。目前对 GNN 的性质和局限性的理论理解很少,对 GNN 的表征能力的形式化分析也有限。

  本文框架受 GNNs 和 WL 图同质测试,(Weisfeiler-Lehman (WL) graph isomorphism test )[ Weisfeiler & Lehman, 1968]  的启发。与 GNNs 类似,WL test 通过聚合其网络邻居的特征向量来迭代更新给定节点的特征向量。使 WL test 如此强大的是它的内射聚合更新,它将不同的节点邻域映射到不同的特征向量。我们的关键见解是,如果GNN的聚合方案具有很高的表达性,并且可以建模内射函数,那么 GNN 就可以具有与 WL test 一样大的鉴别能力。

  本文贡献:

    • 证明了GNN最多只和 Weisfeiler-Lehman (WL) test 一样有效,即 WL test 是GNN性能的上限;
    • 建立了邻域聚合(neighbor aggregation)和图读出函数(graph readout functions)的条件,在这些条件下,得到的 GNN 与 WL test 一样强大;
    • 识别了无法被流行的 GNN 变体区分的图结构,如 GCN 和 GraphSAGE ,并且精确地描述了基于 GNN 的模型可以捕获的图结构类型;
    • 开发了一个简单的神经结构,图同构网络(Graph Isomorphism Network——GIN),并证明了它的判别、表征能力等于 WL test 的能力;

2 Preliminaries

2.1 GNN steps

  GNN 常见的两步走:1、聚合邻居信息;2、更新节点学习

  GNN 的 第 $k$ 层 表达式:

    $a_{v}^{(k)}=\text { AGGREGATE }^{(k)}\left(\left\{h_{u}^{(k-1)}: u \in \mathcal{N}(v)\right\}\right)$

    $h_{v}^{(k)}=\operatorname{COMBINE}^{(k)}\left(h_{v}^{(k-1)}, a_{v}^{(k)}\right)$

  AGGREGATE 比较典型的例子是 GraphSAGE:

  GraphSAGE 的 AGGREGATE 被定义为:

    $a_{v}^{(k)}=\operatorname{MAX}\left(\left\{\operatorname{ReLU}\left(W \cdot h_{u}^{(k-1)}\right), \forall u \in \mathcal{N}(v)\right\}\right)$

  这里的 $MAX $ 代表的是 element-wise max-pooling 。

  GraphSAGE 的 COMBINE 为 :

    $W \cdot\left[h_{v}^{(k-1)}, a_{v}^{(k)}\right]$

  而在 GCN(Kipf & Welling, 2017) 中,AGGREGATE 和 COMBINE 集成为:

    $h_{v}^{(k)}=\operatorname{ReLU}\left(W \cdot \operatorname{MEAN}\left\{h_{u}^{(k-1)}, \forall u \in \mathcal{N}(v) \cup\{v\}\right\}\right)$

  对于 node classification 任务,node representation $h_{v}^{(K)}$ 将作为预测的输入;对于 graph classification 任务,READOUT 函数聚合了最后一次迭代输出的节点表示$h_{v}^{(K)}$ ,并生成 graph's representation $h_{G}$ :

    $ h_{G}=\operatorname{READOUT}\left(\left\{h_{v}^{(K)} \mid v \in G\right\}\right)$

  其中:READOUT 可以是简单的 permutation invariant function,比如:summation,或者是更加复杂的 graph-level pooling function 。

2.2 Weisfeiler-Lehman test

  图同构问题( graph isomorphism problem):询问这两个图在拓扑结构上是否相同。

  WL test  为了辨别多标签图,具体步骤如下:[ 参考《Weisfeiler-Lehman(WL) 算法和WL Test》 ]

    • 迭代地聚合节点及其邻域的标签;
    • 将聚合后的标签散列为唯一的新标签。如果在某次迭代中,两个图之间的节点标签不同,则该算法判定两个图是非同构的;

  基于 WL test 的多图相似性判别算法 WL subtree kernel 也被提出,图示如下:

    

  图示分析:如果有两层聚合,无论是 GCN 还是 WL test,以蓝色节点为例,先由其二阶邻居信息聚合得到一阶邻居节点信息,再由一阶邻居信息聚合得到自己。

    • 中间图:表示有根的子树结构,WL测试使用它来区分不同的图;
    • 右图:如果 GNN 的聚合函数捕获了邻居的 full multiset,那么 GNN 可以以递归的方式捕获有根的子树,其功能与WL测试一样强大;
    • 上图中蓝色节点进行2次WL测试后的标签可以用以蓝色节点为根节点的2层子树来表示;

3 Theoretical framework:overview

  Definition 1 (Multiset). A multiset is a generalized concept of a set that allows multiple instances for its elements. More formally, a multiset is a 2-tuple  $X=(S, m)$  where  $S$  is the underlying set of  $X$  that is formed from its distinct elements, and  $m: S \rightarrow \mathbb{N}_{\geq 1}$  gives the multiplicity of the elements.

  个人理解:思考 Multiset ,某节点 $v$ 及其邻居集合 $\mathcal{N} (v)$ ,假设节点 $v$ 的 label 是 1 ,其 $\mathcal{N} (v)$ 对应的 label 是 1、1、2、3、4,可以把邻居集合看成一个 Multiset 。[ 我们的目标是使得 $v$ 的表示和 邻居集合中label 为 1 的邻居表示相似。]

4 Building powerful graph neural networks

  作者提出 Lemma 2. 说明 WL test 是GNN性能的上限。

  Lemma 2. Let  $G_{1}$  and  $G_{2}$  be any two non-isomorphic graphs. If a graph neural network  $\mathcal{A}: \mathcal{G} \rightarrow \mathbb{R}^{d}$  maps  $G_{1}$  and  $G_{2}$  to different embeddings, the Weisfeiler-Lehman graph isomorphism test also decides  $G_{1}$  and  $G_{2}$  are not isomorphic.

  作者提出 Theorem 3:如果 GNN 中 Aggregate、Combine 和 Readout 函数是单射,GNN 可以和 WL test 一样强大。

  Theorem 3. Let  $\mathcal{A}: \mathcal{G} \rightarrow \mathbb{R}^{d}$  be a  GNN . With a sufficient number of GNN layers,  $\mathcal{A}$  maps any graphs  $G_{1}$  and  $G_{2}$  that the Weisfeiler-Lehman test of isomorphism decides as non-isomorphic, to different embeddings if the following conditions hold:

   a) A aggregates and updates node features iteratively with

    $h_{v}^{(k)}=\phi\left(h_{v}^{(k-1)}, f\left(\left\{h_{u}^{(k-1)}: u \in \mathcal{N}(v)\right\}\right)\right)$

       where the functions $f$,  which operates on multisets, and $\phi$ are injective(单射).

  b)  $\mathcal{A}$'s graph-level readout, which operates on the multiset of node features $\left\{h_{v}^{(k)}\right\}$ , is injective.

4.1 Graph isomorphism network(GIN)

  为建模邻居聚合的单射多集函数。下述 Lemma 5.  和 Corollary 6.  为阐述 sum aggregators 是单射的:

  Lemma 5. Assume $\mathcal{X}$ is countable. There exists a function $f: \mathcal{X} \rightarrow \mathbb{R}^{n}$ so that $h(X)=\sum_{x \in X} f(x)$ is unique for each multiset $X \subset \mathcal{X}$ of bounded size. Moreover, any multiset function g can be decomposed as $g(X)=\phi\left(\sum\limits _{x \in X} f(x)\right)$ for some function $\phi $.

  Lemma 5.  阐明在 "deep multiset" 和 set 上的一个重要区别是,某些在 set 上是单射的函数并不在 multist 上是单射的 ,如平均聚合器。下面 Corollary 6. 设想表示一个节点及其邻居的通用函数的聚合方案,从而满足 Theorem 3 中的注入条件(a)。

  Corollary 6. Assume  $\mathcal{X}$  is countable. There exists a function  $f: \mathcal{X} \rightarrow \mathbb{R}^{n}$  so that for infinitely many choices of  $\epsilon$ , including all irrational numbers,  $h(c, X)=(1+\epsilon) \cdot f(c)+\sum\limits _{x \in X} f(x)$  is unique for each pair  $(c, X)$ , where  $c \in \mathcal{X}$  and  $X \subset \mathcal{X}$  is a multiset of bounded size. Moreover, any function $g$ over such pairs can be decomposed as $ g(c, X)=\varphi\left((1+\epsilon) \cdot f(c)+\sum\limits_{x \in X} f(x)\right)$  for some function  $\varphi $.

  对于 Corollary 6. 引入多层感知机MLP,去学习 $\varphi$ 和 $f$ ,以保证单射性。最终得到基于 MLP+SUM 的 GIN 框架:

    $h_{v}^{(k)}=\operatorname{MLP}^{(k)}\left(\left(1+\epsilon^{(k)}\right) \cdot h_{v}^{(k-1)}+\sum\limits _{u \in \mathcal{N}(v)} h_{u}^{(k-1)}\right)$

  为什么引入 MLP ,理由:MLP 可以拟合任意函数,故可以拟合出单射函数。

  在第一次迭代中,如果输入特征是一个 one-hot,那么我们不需要在求加前使用 MLP,因为它们的 SUM 是单射的。

4.2 Graph-level readout of GIN

  通过 GIN 学习的 Node embeddings 可以用于类似于节点分类、连接预测这样的任务。对于图分类任务,文中提出了一个“Readout”函数:给定独立的节点的embeddings,生成整个图的 embedding。

  Readout 模块使用 concat+sum,对每次迭代得到的所有节点特征求和得到图的特征,然后拼接起来。

    $h_{G}=\operatorname{CONCAT}\left(\operatorname{READOUT}\left(\left\{h_{v}^{(k)} \mid v \in G\right\}\right) \mid k=0,1, \ldots, K\right)$

  即

    $h_{G}=\operatorname{CONCAT}\left(\operatorname{sum}\left(\left\{h_{v}^{(k)} \mid v \in G\right\}\right) \mid k=0,1, \ldots, K\right)$

5 Less powerful but still interesting GNNs

  本文研究不满足 Theorem 3 的 GraphSAGE 和 GCN,做了两个消融实验:

    • 1-layer perceptrons instead of MLPs .  
    • mean or max-pooling instead of the sum.  

5.1 1-layer perceotrons are not sufficient

  Lemma 5 中的 $f$ 将不同的 multiset 映射成唯一的 embedding。尽管如此,许多现有的 GNN 反而使用 1-layer perceptron $\sigma \circ W$ ,一个线性映射,然后是一个非线性激活函数,如ReLU。Lemma 7 表明,确实存在一些网络邻域(multisets),而具有一层感知器的模型永远无法区分。

  Lemma 7. There exist finite multisets  $X_{1} \neq X_{2}$  so that for any linear mapping  $W $,  $\sum\limits_{x \in X_{1}} \operatorname{ReLU}(W x)=\sum\limits_{x \in X_{2}} \operatorname{ReLU}(W x)$.

  Lemma 7. 的主要思想是,1-layer perceptrons 表现得很像线性映射,因此 GNN 层退化为对邻域特征的简单求和。本文的证明建立在线性映射中缺乏偏差项这一事实之上。有了偏差项和足够大的输出维数,1-layer perceptrons 可能能够区分不同的 multiset。

5.2 Structures that confuse mean and max-pooling

  现在考虑将 $h(X)=\sum\limits _{x \in X} f(x)$ 中的 sum 替换为 Mean-pooling 和 Max-pooling 将产生什么问题。

  Mean-pooling 和 max-pooling aggregators 在某种程度上是一种好的 multiset functions [ 具有平移不变性 ],但是他们不是单射的。

  Figure 2 根据三个 aggregators 的表示能力进行了排序。

    

  三种不同的 Aggregate:

    • sum:学习全部的标签以及数量,可以学习精确的结构信息(不仅保存了分布信息,还保存了类别信息);[ 蓝色:4个;红色:2 个  ]
    • mean:学习标签的比例(比如两个图标签比例相同,但是节点有倍数关系),偏向学习分布信息;[ 蓝色:$4/6=2/3$ 的比例;红色:$2/6=1/3$ 的比例  ]
    • max:学习最大标签,忽略多样,偏向学习有代表性的元素信息;[ 两类(类内相同),所以各一个  ]

  Figure 3 说明了mean-pooling aggregators 和 max-pooling aggregators 无法区分的结构对。

    

  在 Figure 3a 中:Every node has the same feature $a$ and $f(a)=h_a$ is the same across all nodes.

    • mean:左 $\frac{1}{2}(h_a+h_a)=h_a$ ,右:$\frac{1}{3}(h_a+h_a+h_a)=h_a$,无法区分;
    • max:左 $h_a$ , 右 $h_a$ 无法区分;
    • sum:左 $2h_a$ , 右 $3h_a$ , 可以区分;

  在 Figure 3b 中:Let $h_{\text {color }}(r \text { for red, } g \text { for green })$ denote node features transformed by $f $.

    • mean: 左 $ \frac{1}{2}(h_r+h_g)$ ,右: $\frac{1}{3}(h_g+2h_r) $ ,可以区分;
    • max : 左 $max (h_r, h_g) $ ,右: $max (h_g, h_r, h_r) $ ,无法区分;
    • sum: 左 $sum(h_r+h_g)$ , 右 $sum(2 h_r+h_g)$ , 可以区分;

  在 Figure 3c 中:

    • mean:左 $\frac{1}{2}(h_r+h_g) $ ,右:$\frac{1}{4}(2 h_g+2 h_r) $ ,无法区分;
    • max:左 $\max (h_g, h_g, h_r, h_r)$ ,右:$\max (h_g, h_r)$ ,无法区分;
    • sum:左 $h_r+h_g$ ,右:$2 h_r+2 h_g$ ,可以区分;

5.3 Mean learns distrubutions

  旨在说明等比例 nodes ,使用 mean 是无法区分的。

  Corollary 8. Assume  $\mathcal{X}$  is countable. There exists a function  $f: \mathcal{X} \rightarrow \mathbb{R}^{n}$  so that for  $h(X)=   \frac{1}{|X|} \sum\limits _{x \in X} f(x), h\left(X_{1}\right)=h\left(X_{2}\right)$  if and only if multisets  $X_{1}$  and  $X_{2}$  have the same distribution. That is, assuming  $\left|X_{2}\right| \geq\left|X_{1}\right| , we have  X_{1}=(S, m)$  and  $X_{2}=(S, k \cdot m)$  for some $k \in \mathbb{N}_{\geq 1}$ .

5.4 Max-pooling learns sets with distinct elements

  Figure 3 中的示例说明了最大池化考虑的是一个节点与只有一个节点具有相同特性的多个节点(即,将一个 multiset 视为一个集合)。

  Corollary 9. Assume  $\mathcal{X}$  is countable. Then there exists a function  $f: \mathcal{X} \rightarrow \mathbb{R}^{\infty}$  so that for  $h(X)=\underset{x \in X}{max} f(x), h\left(X_{1}\right)=h\left(X_{2}\right)$  if and only if  $X_{1}$  and  $X_{2}$  have the same underlying set.

6 Experiments

6.1 Training set performance of GINs

    

  在训练中,GIN 和WL test 一样,可以拟合所有数据集,这表说了 GIN 表达能力达到了上限

6.2 Generalization ability of GNNs

    

    • GIN-0 比GIN-eps 泛化能力强:可能是因为更简单的缘故;
    • GIN 比 WL test 效果好:因为GIN进一步考虑了结构相似性,即WL test 最终是one-hot输出,而GIN是将WL test映射到低维的embedding;
    • max 在无节点特征的图(用度来表示特征)基本无效;

7 Conclusion

  本文主要 基于对 graph分类,证明了 sum 比 mean 、max 效果好,但是不能说明在node 分类上也是这样的效果,另外可能优先场景会更关注邻域特征分布, 或者代表性, 故需要都加入进来实验。

论文解读(GIN)《How Powerful are Graph Neural Networks》的更多相关文章

  1. 论文解读 - Composition Based Multi Relational Graph Convolutional Networks

    1 简介 随着图卷积神经网络在近年来的不断发展,其对于图结构数据的建模能力愈发强大.然而现阶段的工作大多针对简单无向图或者异质图的表示学习,对图中边存在方向和类型的特殊图----多关系图(Multi- ...

  2. 论文解读(LA-GNN)《Local Augmentation for Graph Neural Networks》

    论文信息 论文标题:Local Augmentation for Graph Neural Networks论文作者:Songtao Liu, Hanze Dong, Lanqing Li, Ting ...

  3. 论文解读(PPNP)《Predict then Propagate: Graph Neural Networks meet Personalized PageRank》

    论文信息 论文标题:Predict then Propagate: Graph Neural Networks meet Personalized PageRank论文作者:Johannes Gast ...

  4. 论文解读(KP-GNN)《How Powerful are K-hop Message Passing Graph Neural Networks》

    论文信息 论文标题:How Powerful are K-hop Message Passing Graph Neural Networks论文作者:Jiarui Feng, Yixin Chen, ...

  5. 论文解读(soft-mask GNN)《Soft-mask: Adaptive Substructure Extractions for Graph Neural Networks》

    论文信息 论文标题:Soft-mask: Adaptive Substructure Extractions for Graph Neural Networks论文作者:Mingqi Yang, Ya ...

  6. 论文解读(ChebyGIN)《Understanding Attention and Generalization in Graph Neural Networks》

    论文信息 论文标题:Understanding Attention and Generalization in Graph Neural Networks论文作者:Boris Knyazev, Gra ...

  7. 论文解读(SelfGNN)《Self-supervised Graph Neural Networks without explicit negative sampling》

    论文信息 论文标题:Self-supervised Graph Neural Networks without explicit negative sampling论文作者:Zekarias T. K ...

  8. 论文解读(DAGNN)《Towards Deeper Graph Neural Networks》

    论文信息 论文标题:Towards Deeper Graph Neural Networks论文作者:Meng Liu, Hongyang Gao, Shuiwang Ji论文来源:2020, KDD ...

  9. 论文解读(GraphSMOTE)《GraphSMOTE: Imbalanced Node Classification on Graphs with Graph Neural Networks》

    论文信息 论文标题:GraphSMOTE: Imbalanced Node Classification on Graphs with Graph Neural Networks论文作者:Tianxi ...

随机推荐

  1. golang中的pair

    package main import "fmt" type Reader interface { ReadBook() } type Writer interface { Wri ...

  2. MySQL技术内幕(一)

    MySQL技术内幕 2. InnoDB存储引擎 2.1 InnoDB存储引擎概述 特点:行锁设计.支持MVCC.支持外键.提供一致性非锁定读 2.2 InnoDB体系架构 2.2.1 后台线程 Inn ...

  3. 寻找写代码感觉(十六)之 集成Validation做参数校验

    写在前面 今天是大年初五了... 不知不觉,又要上班了,美好的假期只剩一天了,有点不舍呢! 也不知道为什么,总感觉像在做梦一样,像没睡醒一样,并不是因为眼睛小,更多应该是自寻烦恼,想得多罢了. 参数校 ...

  4. 简单说说ES6新特性

    ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,已经在 2015 年 6 月正式发布了. 它的目标,是使得 JavaScript 语言可以用来编写复杂的大型 ...

  5. new JSONObject 无异常卡顿【Maven+Idea 导包不更新的小坑】

    问题描述 今天在使用JSONObject过程中出现了一个非常不可思议的现象,我Junit测试没有问题,但是就是打开服务器运行的时候,结果就是出不来,经过多次测试发现代码竟然卡在了new JSONObj ...

  6. github中,一些涉及到用户配置的文件怎么处理(比如数据库用户名/密码)?

    感谢问题回答者:Livid 问题地址:https://www.v2ex.com/t/74245 加密方式参考:http://www.manongjc.com/detail/12-bmntimjowei ...

  7. 常用汉字大全:汉字读音表GB2312版(共7809个汉字)

    转载请注明来源:https://www.cnblogs.com/hookjc/ 常用汉字:a1:阿啊呵腌吖锕a2:啊呵嗄a3:啊呵a4:啊呵ai1:哀挨埃唉哎捱锿ai2:呆挨癌皑捱ai3:矮哎蔼霭嗳a ...

  8. Collections与Arrays

    集合框架中的工具类:特点:该工具类中的方法都是静态的. Collections:常见方法: 1, 对list进行二分查找: 前提该集合一定要有序. int binarySearch(list,key) ...

  9. shell——并发工具parallel

    官方文档:https://www.gnu.org/software/parallel/parallel_tutorial.html 安装 (wget -O - pi.dk/3 || curl pi.d ...

  10. 浅谈Java之反射

    反射 四种获取Class实例的方法 定义测试结构 获取属性结构 获取方法结构 获取构造器结构(包括父类泛型) 获取实现的接口 获取所在包 获取注解 获取并创建指定构造器 获取指定属性 获取并运行指定方 ...