GCN学习笔记

In the last couple of years, a number of papers re-visited this problem of generalizing neural networks to work on arbitrarily structured graphs (结构化图)

(Bruna et al., ICLR 2014; Henaff et al., 2015; Duvenaud et al., NIPS 2015; Li et al., ICLR 2016; Defferrard et al., NIPS 2016; Kipf & Welling, ICLR 2017),

some of them now achieving very promising results in domains that have previously been dominated by, e.g., kernel-based methods, graph-based regularization techniques and others.

Outline

  • Short introduction to neural network models on graphs
  • Spectral graph convolutions and Graph Convolutional Networks (GCNs)
  • Demo: Graph embeddings with a simple 1st-order GCN model                   使用简单的一阶GCN模型进行图形嵌入
  • GCNs as differentiable generalization of the Weisfeiler-Lehman algorithm   GCN是Weisfeiler-Lehman算法的可微分推广

If you're already familiar with GCNs and related methods, you might want to jump directly to Embedding the karate club network.

Recent literature相关文献

   Some recent papers introduce problem-specific specialized architectures (e.g. Duvenaud et al., NIPS 2015; Li et al., ICLR 2016; Jain et al., CVPR 2016),

   others make use of graph convolutions known from spectral graph theory1 (Bruna et al., ICLR 2014; Henaff et al., 2015) to define parameterized filters(参数滤波器) that are used in a multi-layer neural network model多层神经网络模型,类似于我们所知道和喜爱的“经典”CNN。

   More recent work focuses on bridging the gap between fast heuristics and the slow2,更原则性的谱方法。Defferrard et al. (NIPS 2016) approximate smooth filters in the spectral domain using Chebyshev shpolynomials with free parameters that are learned in a neural network-like model. They achieve convincing results on regular domains (like MNIST), closely approaching those of a simple 2D CNN model.Defferrard等人。 (NIPS 2016)使用Chebyshev shpolynomials在谱域中近似平滑滤波器,其中自由参数是在神经网络模型中学习的。它们在常规域(如MNIST)上取得令人信服的结果,与简单的2D CNN模型非常接近。

   In Kipf & Welling (ICLR 2017)采用了一种类似的方法,从光谱图卷积的框架开始,yet introduce simplifications (we will get to those later in the post) that in many cases allow both for significantly faster training times and higher predictive accuracy, reaching state-of-the-art classification results on a number of benchmark graph datasets.然后引入简化(我们将在后面的文章中介绍),在许多情况下允许两者显着加快训练时间 更高的预测准确性,在许多基准图数据集上达到最先进的分类结果。

GCNs Part I: Definitions

目前,大多数图形神经网络模型具有一些共同的通用架构。 我将这些模型称为图形卷积网络(GCN); 卷积,因为滤波器参数通常在图中的所有位置(或其子集,如 in Duvenaud et al., NIPS 2015)共享。

对于这些模型,目标是学习图G=(V,E)上的信号/特征函数,该函数作为输入:

  1.每个节点i的特征描述为xi;用N×D维特征矩阵X概括(N:节点数,D:输入特征数)

  2.矩阵形式的图结构的代表性描述,通常以邻接矩阵A(或其某些功能)的形式 aij=0为不相邻,aij=1为相邻

并产生一个节点级输出Z(N×F维特征矩阵),其中F是每个节点的输出特征数)。 图形级输出可以通过引入某种形式的池化操作来建模(参见,e.g. Duvenaud et al., NIPS 2015)。

然后可以将每个神经网络层写为非线性函数 

              

(或图表级输出的z),L是层数。 然后,具体模型的区别仅在于如何选择  f(⋅,⋅)和参数化

GCNs Part II: A simple example

作为一个例子,让我们考虑以下非常简单的分层传播规则形式:

      

        W(l)是第l个神经网络层的权重矩阵,σ(⋅)是一个像ReLU一样的非线性激活函数。尽管它很简单,但这个模型已经非常强大(我们马上就会谈到它)。

但首先,让我们解决这个简单模型的两个局限性:

1.乘以A意味着,对于每个节点(图的节点),我们总结所有相邻节点的所有特征向量,而不是节点本身(除非图中有自循环)我们可以通过在图中强制执行自循环来“修复”这个问题:我们只需将identity matrix身份矩阵添加到A.

2.第二个主要限制是,A通常不是归一化的,因此与A的相乘将完全改变特征向量的尺度(我们可以通过查看A的特征值来理解这一点)。归一化A使所有行和为1,即D-1A,其中D是diagonal node degree matrix角线节点度矩阵,从而消除了这个问题。与D-1A相乘现在对应于取相邻节点特征的平均值。在实践中,当我们使用对称归一化(即D-1/2AD-1/2)时,dynamics动力学变得更加有趣(因为这不再只是相邻节点的平均)。

结合这两个技巧,我们基本上得出了在Kipf & Welling (ICLR 2017)中引入的传播规则:

    

 

  

在下一节中,我们将仔细研究这种类型的模型如何在一个非常简单的示例图上运行:Zachary's karate club network   Zachary的空手道俱乐部网络(make sure to check out the Wikipedia article!))。

GCNs Part III: Embedding the karate club network

空手道俱乐部图表,颜色表示通过基于模块化的聚类获得的 communities社区

让我们来看看我们的简单GCN模型(参见上一节或Kipf & Welling, ICLR 2017)如何在著名的图形数据集上工作:Zachary的空手道俱乐部网络(见上图)。

我们采用随机初始化权重的3层GCN。 现在,在训练权重之前,我们只需将图的adjacency matrix邻接矩阵和X = I(即单位矩阵,因为我们没有任何节点特征)插入到模型中。 3层GCN现在前向传播期间执行三个传播步骤,并有效地卷积每个节点(图的节点)的3阶邻域(所有节点最多3“跳”)该模型生成了这些节点的嵌入,这些节点非常类似于图的社区结构(参见下图)。 请记住,我们已经完全随机地初始化了权重,并且尚未执行任何训练更新(到目前为止)!

用于空手道俱乐部网络中节点的GCN嵌入(随机权重)。

 

   

猜你喜欢

转载自www.cnblogs.com/ranup/p/10914494.html
GCN