You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

9.4 KiB

title date updated tags categories keywords description top_img comments cover toc toc_number toc_style_simple copyright copyright_author copyright_author_href copyright_url copyright_info katex highlight_shrink aside
Variational Graph Auto-Encoders(差分图自动编码器) 2021-5-15 19:48:22 2021-6-14 13:12:09 [图神经网络 特征学习] 论文阅读笔记 <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> true <nil> <nil>

1 一种图结构数据的潜变量模型

我们介绍了变分图自动编码器(VGAE),这是一个基于变分自动编码器(VAE)的图结构数据的无监督学习框架[2,3]。该模型利用了潜在变量,能够学习无向图的可解释的潜在表示(见图1)。

我们用一个图形卷积网络(GCN)[4]编码器和一个简单的内积译码器演示了这个模型。我们的模型在引文网络中的链接预测任务上取得了有竞争力的结果。与大多数现有的基于图结构数据的无监督学习和链接预测模型[5,6,7,8]相比,我们的模型可以自然地加入节点特征,从而显著提高了在许多基准数据集上的预测性能。 image.png 图1:在CORA引文网络数据集上训练的无监督VGAE模型的潜在空间[1]。 灰色线条表示引用链接。颜色表示文档类别(培训期间未提供)。最好在屏幕上观看。

**定义 **我们得到一个无向、无权图$\mathcal{G}=(\mathcal{V}, \mathcal{E})$,其中$N=|\mathcal{V}|$个节点。我们引入了$\mathcal{G } \text { 的}\text {邻接矩阵} \mathbf{A}$(假设对角元素设为1,即每个结点都与其自身相连)和它的次数矩阵$\mathbf{D}$。进一步引入了随机潜变量$\mathbf{z}_{i}$,将其归纳为$N \times F$的矩阵$\mathbf{Z}$。$\text { 节点特征被归结为 } N \times D \text { 的矩阵 } \mathbf{X}$

**推理模型 **我们采用一个由两层GCN参数化的简单推理模型: $q(\mathbf{Z} \mid \mathbf{X}, \mathbf{A})=\prod_{i=1}^{N} q\left(\mathbf{z}{i} \mid \mathbf{X}, \mathbf{A}\right), \text { with } q\left(\mathbf{z}{i} \mid \mathbf{X}, \mathbf{A}\right)=\mathcal{N}\left(\mathbf{z}{i} \mid \boldsymbol{\mu}{i}, \operatorname{diag}\left(\boldsymbol{\sigma}{i}^{2}\right)\right)$ 这里,$\boldsymbol{\mu}=\mathrm{GCN}{\boldsymbol{\mu}}(\mathbf{X}, \mathbf{A})$是平均向量$\boldsymbol{\mu}{i}$的矩阵;类似的,$\log \sigma=\operatorname{GCN}{\sigma}(\mathbf{X}, \mathbf{A})$。 这两层$GCN$被定义为$\mathrm{GCN}(\mathbf{X}, \mathbf{A})=\tilde{\mathbf{A}} \operatorname{ReLU}\left(\tilde{\mathbf{A}} \mathbf{X} \mathbf{W}{0}\right) \mathbf{W}{1}$,具有权重矩阵$\mathbf{W}{i}$。$\operatorname{GCN}{\boldsymbol{\mu}}(\mathbf{X}, \mathbf{A}) \text { and } \mathrm{GCN}{\boldsymbol{\sigma}}(\mathbf{X}, \mathbf{A})$共享第一层参数$\mathbf{W}{0}$。$\operatorname{ReLU}(\cdot)=\max (0, \cdot) \text { 和 } \tilde{\mathbf{A}}=\mathbf{D}^{-\frac{1}{2}} \mathbf{A D}^{-\frac{1}{2}}$是对称正规化邻接矩阵。

**生成模型 **我们的生成模型是由潜在变量之间的内积给出的: $p(\mathbf{A} \mid \mathbf{Z})=\prod_{i=1}^{N} \prod_{j=1}^{N} p\left(A_{i j} \mid \mathbf{z}{i}, \mathbf{z}{j}\right), \text { with } p\left(A_{i j}=1 \mid \mathbf{z}{i}, \mathbf{z}{j}\right)=\sigma\left(\mathbf{z}{i}^{\top} \mathbf{z}{j}\right),$ 其中$A_{i j}$是$\mathbf{A}$的元素,$\sigma(\cdot)$是Logistic Sigmoid函数。

**学习 **我们优化了变分下界$\mathcal{L} \text { w.r.t. }$。变化参数$\mathbf{W}i$: $\mathcal{L}=\mathbb{E}{q(\mathbf{Z} \mid \mathbf{X}, \mathbf{A})}[\log p(\mathbf{A} \mid \mathbf{Z})]-\operatorname{KL}[q(\mathbf{Z} \mid \mathbf{X}, \mathbf{A}) | p(\mathbf{Z})]$ 其中$\mathrm{KL}[q(\cdot) | p(\cdot)]$是$q(\cdot) \text { and } p(\cdot)$之间的Kullback-Leibler散度。我们进一步取高斯先验$p(\mathbf{Z})=\prod_{i} p\left(\mathbf{z}{\mathbf{i}}\right)=\prod{i} \mathcal{N}\left(\mathbf{z}{i} \mid 0, \mathbf{I}\right)$。对于非常稀疏的$\mathbf{A}$,对$\mathcal{L}$中$A{i j}=1$的项或$A_{i j}=0$的子采样项重新加权可能是有益的。我们选择前者进行下面的实验。我们执行全批次梯度下降,并利用重新参数化技巧[2]进行训练。对于一种无特征的方法,我们只需放弃对$\mathbf{X}$的依赖,而用GCN中的单位矩阵替换$\mathbf{X}$。

**非概率图自动编码器(GAE)模型 **对于$\mathbf{VGAE}$模型的非概率变体,我们计算嵌入$\mathbf{Z}$和重构的邻接矩阵$\hat{\mathbf{A}}$,如下所示: $\hat{\mathbf{A}}=\sigma\left(\mathbf{Z} \mathbf{Z}^{\top}\right), \text { with } \quad \mathbf{Z}=\operatorname{GCN}(\mathbf{X}, \mathbf{A})$

2 关于链接预测的实验

我们在几个流行的引文网络数据上展示了VGAE和GAE模型在链接预测任务中学习有意义的潜在嵌入的能力[1]。这些模型是在这些数据集的不完整版本上训练的,其中部分引文链接(边)已被移除,而所有节点特征都被保留。我们从先前移除的边和相同数量的随机采样的未连接节点对(非边)形成验证和测试集。

我们根据模型正确区分有边和无边的能力对模型进行比较。验证和测试集分别包含5%和10%的引文链接。验证集用于优化超参数。我们比较了两个流行的基准:频谱聚类(SC)[5]和DeepWalk(DW)[6]。SC和DW都提供了节点嵌入$\mathbf{Z}$。我们使用公式4(左侧)计算重建邻接矩阵元素的分数。由于性能相当,我们省略了DW[7,8]的最新变体。SC和DW都不支持输入功能。

对于VGAE和GAE,我们按照[9]中所述初始化权重。我们使用Adam[10]训练了200次迭代,学习率为0.01。我们在所有的实验中都使用了32维的隐藏层和16维的潜变量。对于SC,我们使用[11]中的实现,嵌入维数为128。对于DW,我们使用[8]的作者提供的实现,使用他们论文中使用的标准设置,即嵌入维数为128,每个节点10个长度为80的随机游动,上下文大小为10,针对单个纪元进行训练。

**讨论 **引文网络中链接预测任务的结果汇总在表1中。GAE和VGAE表示不使用输入特征的实验,GAE和VGAE使用输入特征。我们报告测试集上每个模型的ROC曲线下面积(AUC)和平均精度(AP)分数。数字显示了对固定数据集拆分进行随机初始化的10次运行的平均结果和标准误差。

表1:引文网络中的链接预测任务。有关数据集的详细信息,请参见[1]。 image.png VGAE和GAE在这项平淡无奇的任务上都取得了有竞争力的结果。添加输入功能可显著提高数据集的预测性能。与内积解码器结合使用时,高斯先验可能是一个糟糕的选择,因为后者试图将嵌入推离零中心(参见图1)。然而,VGAE模型在CORA和Citeseer数据集上都实现了更高的预测性能。

未来的工作将研究更适合的先验分布,更灵活的生成模型,以及随机梯度下降算法的应用,以提高可扩展性。

References [1] P. Sen, G. M. Namata, M. Bilgic, L. Getoor, B. Gallagher, and T. Eliassi-Rad. Collective classification in network data. AI Magazine, 29(3):93–106, 2008. [2] D. P. Kingma and M. Welling. Auto-encoding variational bayes. In Proceedings of the International Conference on Learning Representations (ICLR), 2014. [3] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of The 31st International Conference on Machine Learning (ICML), 2014. [4] T. N. Kipf and M. Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. [5] L. Tang and H. Liu. Leveraging social media networks for classification. Data Mining and Knowledge Discovery, 23(3):447–478, 2011. [6] B. Perozzi, R. Al-Rfou, and S. Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pages 701–710. ACM, 2014. [7] J. Tang, M. Qu, M. Wang, M. Zhang, J. Yan, and Q. Mei. Line: Large-scale information network embedding. In Proceedings of the 24th International Conference on World Wide Web, pages 1067–1077. ACM, 2015. [8] A. Grover and J. Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2016. [9] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pages 249–256, 2010. [10] D. P. Kingma and J. L. Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. [11] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.