目录
一、前言
在图神经网络出现之前,一般的神经网络只能对常规的欧式数据进行处理,其特点就是节点有固定的排列规则和顺序,如2维网格和1维序列。
近几年来,将深度学习应用到处理和图结构数据相关的任务中越来越受到人们的关注。图神经网络的出现使其在上述任务中取得了重大突破,比如在社交网络、自然语言处理、计算机视觉甚至生命科学等领域得到了非常广泛的应用。图神经网络可以把实际问题看作图中节点之间的连接和消息传播问题,对节点之间的依赖关系进行建模,从而能够很好地处理图结构数据。
近年来,CNN在图像识别、自然语言处理等多个领域应用广泛,但其只能高效地处理网格和序列等这样规则的欧氏数据,不能有效地处理像社交多媒体网络数据、化学成分结构数据、生物蛋白数据以及知识图谱数据等图结构的非欧氏数据。因为图的结构一般是极为不规则的,每一个节点的周围结构可能都是独一无二的,其邻居节点和连接的边各不相同,所以传统的CNN难以处理这类图结构数据。图卷积神经网络(Graph Convolution Network,GCN)是CNN在图结构的非欧氏数据上的应用,GCN 是图神经网络中一个重要分支,现有的大多数图算法模型基本上都是在GCN基础上变化推导而来。
二、GCN原理
对于一个图结构数据集![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图3 G](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图5 N](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图7 N*D](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图9 X](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图11 D](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图13 N*N](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图15 A](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图9 X](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图15 A](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图9 X](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图15 A](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
一个基于分层传播规则的![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图19 L](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
其中:
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图23 \tilde{A}=A+I_{N}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图25 I_{N}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图5 N](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图15 A](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图27 H](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图15 A](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图25 I_{N}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图29 \tilde{D}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图31 \tilde{A}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图33 \tilde{D}_{ii}={\sum}_{j}\tilde{A}_{ij}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图31 \tilde{A}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图27 H](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图31 \tilde{A}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图31 \tilde{A}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图35 \tilde{D}^{-\frac{1}{2}}\tilde{A}\tilde{D}^{-\frac{1}{2}}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图37 W^{(l)}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图39 l](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图41 \sigma (\cdot )](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图43 H^{(l)}\in \mathbb{R}^{N*D}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图39 l](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图45 H^{(0)}=X](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图47 H^{(L)}=Z](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
GCN的层(layers):
GCN的层数![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图19 L](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
当在第一层的基础上再叠加一层时,即重复聚合信息的过程,但这一次,邻居节点已经有了自己的邻居的信息(来自上一步),这使得层数成为每个节点可以走的最大跳步。但GCN作者通过实验表明,GCN层数不宜多,2-3层就足够了,过多的层数反而会适得其反。
三、GCN用于节点分类
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图51 图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]](https://img.bianchenghao.cn/app/bianchenghao_cn/3769df4e4d924effa95c77077277421c.png)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图19 L](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图9 X](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图53 Z](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图55 Y](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
假设我们构造一个两层的GCN,激活函数分别采用ReLU和Softmax,则整体的正向传播的公式为:
其中,![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图59 \hat{A}=\tilde{D}^{-\frac{1}{2}}\tilde{A}\tilde{D}^{-\frac{1}{2}}](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
然后,针对所有带标签的节点计算cross entropy损失函数:
这样就可以训练一个用于节点分类的GCN模型了,即使只有很少节点带有标签也能训练,作者称他们的方法为半监督分类(Semi-Supervised node classification)。除此之外,将损失函数变动一下,GCN也可以用来做链接预测等任务。
四、总结
GCN的提出在图任务处理领域具有里程碑式的意义,原作者的实验表明,即使使用随机初始化的参数![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图63 W](https://bianchenghao.cn/wp-content/uploads/2022/12/2022122605452522.jpg)
GCN其实是拉普拉斯平滑的特殊形式,GCN的主要思想是取所有邻居节点特征(包括自身节点)的加权平均值。度低的节点获得更大的权重,然后将得到的特征向量通过神经网络进行训练。在GCN中,节点特征的更新是靠不断聚合邻居节点特征实现的,这会使得相邻节点的相似性增强,从而使分类能力大大增强。但如果堆叠多层GCN网络,输出特征可能过度平滑,使来自不同簇的顶点可能变得不可区分,分类效果也就会下降。
另外,对于更复杂的图,如异构图、动态图、带权重的图,GCN还不能有效应对。对于含有大规模数量节点和边的图,也给GCN的计算带来挑战。在GCN提出之后,有不少工作针对其不足之处做出了改进,如R-GCN、GraphSAGE等模型。
参考文献:
1、Kipf T N, Welling M. Semi-supervised classification with graph convolutional networks[J]. arXiv preprint arXiv:1609.02907, 2016.
2、何时能懂你的心——图卷积神经网络(GCN) – 知乎
3、GCN图卷积网络入门详解
今天的文章图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/80049.html
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图1 图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]](https://img.bianchenghao.cn/app/bianchenghao_cn/fd81347f11b54875a3b3fb95046d880b.png)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图17 图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]](https://img.bianchenghao.cn/app/bianchenghao_cn/9ee1159c15ff4d89b474f9b400e0d1f4.png)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图49 图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]](https://img.bianchenghao.cn/app/bianchenghao_cn/d7ea7d6549be42ecba302f99256dfd6e.png)
![图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]插图61 图卷积网络和卷积神经网络的区别_卷积网络 加入自定义特征图[通俗易懂]](https://img.bianchenghao.cn/app/bianchenghao_cn/f1e3a60162a0464f9dad0fe344d117fc.png)