summaries: Graph neural networks (GNNs) have become de facto methods for integrating the input graph structure and node features to learn effective node representations. However, in some domains (such as brain signals, particle reconstruction, etc.), there is access to only node features (but not the underlying graph structure). Motivated by the fact that GNNs tend to perform poorly in the absence of the graph structure, the paper This paper proposes to tackle jointly learning graph structures and GNN parameters without accessing the original graph structure. Specifically, the proposed method adopts a self-supervised auxiliary task, i.e., parallel training using the supervision of node labels and a self-supervised task using de-noised auto-encoding. The latent graph structure is generated through a fully-parameterized adjacency matrix or a KNN construction subsequent to passing node features to an MLP. Experimental results and corresponding analyses demonstrate the effectiveness of the proposed model. This paper considers the problem of nodes classification with few labeled data and missing graph structures. The proposed solution is expected to infer unobserved graph structure as well as the parameters of the classification model. The main contribution of this paper is proposing adding a denoise autoencoder layer which provides more supervision to the learning. The model compares favorably with other states of art models in several benchmark graph data sets.
abstractText: Graph neural networks (GNNs) work well when the graph structure is provided. However, this structure may not always be available in real-world applications. One solution to this problem is to infer a task-specific latent structure and then apply a GNN to the inferred graph. Unfortunately, the space of possible graph structures grows super-exponentially with the number of nodes and so the taskspecific supervision may be insufficient for learning both the structure and the GNN parameters. In this work, we propose the Simultaneous Learning of Adjacency and GNN Parameters with Self-supervision, or SLAPS, a method that provides more supervision for inferring a graph structure through self-supervision. A comprehensive experimental study demonstrates that SLAPS scales to large graphs with hundreds of thousands of nodes and outperforms several models that have been proposed to learn a task-specific graph structure on established benchmarks.
authors.name: Bahare Fatemi
authors.name: Layla El Asri
authors.name: Seyed Mehran Kazemi
references.authors: Réka Albert Albert-László Barabási
references.title: Statistical mechanics of complex networks
references.venue: Reviews of modern physics,
references.authors: Albert-László Barabási Réka Albert
references.title: Emergence of scaling in random networks. science
references.authors: Mikhail Belkin Partha Niyogi Vikas Sindhwani
references.title: Manifold regularization: A geometric framework for learning from labeled and unlabeled examples
references.venue: JMLRR, 7(Nov):2399–2434,
references.authors: Ines Chami Sami Abu-El-Haija Bryan Perozzi Christopher Ré Kevin Murphy
references.title: Machine learning on graphs: A model and comprehensive taxonomy
references.venue: arXiv preprint arXiv:2005.03675,
references.authors: Deli Chen Yankai Lin Wei Li Peng Li Jie Zhou Xu Sun
references.title: Measuring and relieving the over-smoothing problem for graph neural networks from the topological view
references.venue: In Proceedings of the AAAI Conference on Artificial Intelligence,
references.authors: Yu Chen Lingfei Wu Mohammed J. Zaki
references.title: Deep iterative and adaptive learning for graph neural networks
references.venue: In Neural Information Processing Systems (NeurIPS),
references.authors: Krzysztof Choromanski Valerii Likhosherstov David Dohan Xingyou Song Andreea Gane Tamas Sarlos Peter Hawkins Jared Davis Afroz Mohiuddin Lukasz Kaiser
references.title: Rethinking attention with performers
references.authors: Luca Cosmo Anees Kazi Seyed-Ahmad Ahmadi Nassir Navab Michael Bronstein
references.title: Latent patient network learning for automatic diagnosis
references.venue: arXiv preprint arXiv:2003.13620,
references.authors: Hanjun Dai Hui Li Tian Tian Xin Huang Lin Wang Jun Zhu Le Song
references.title: Adversarial attack on graph structured data
references.venue: arXiv preprint arXiv:1806.02371,
references.authors: James Fox Sivasankaran Rajamanickam
references.title: How robust are graph neural networks to structural noise
references.venue: arXiv preprint arXiv:1912.10206,
references.authors: Luca Franceschi Mathias Niepert Massimiliano Pontil Xiao He
references.title: Learning discrete structures for graph neural networks
references.venue: In ICML,
references.authors: Victor Garcia Joan Bruna
references.title: Few-shot learning with graph neural networks
references.venue: arXiv preprint arXiv:1711.04043,
references.authors: Spyros Gidaris Nikos Komodakis
references.title: Generating classification weights with gnn denoising autoencoders for few-shot learning
references.venue: In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition,
references.authors: Jonathan Halcrow Alexandru Mosoi Sam Ruth Bryan Perozzi
references.title: Grale: Designing networks for graph learning
references.venue: In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining,
references.authors: Weihua Hu Matthias Fey Marinka Zitnik Yuxiao Dong Hongyu Ren Bowen Liu Michele Catasta Jure Leskovec
references.title: Open graph benchmark: Datasets for machine learning on graphs
references.authors: Weihua Hu Bowen Liu Joseph Gomes Marinka Zitnik Percy Liang Vijay Pande Jure Leskovec
references.title: Strategies for pre-training graph neural networks
references.venue: In ICLR,
references.authors: Ziniu Hu Yuxiao Dong Kuansan Wang Kai-Wei Chang Yizhou Sun
references.title: Gpt-gnn: Generative pre-training of graph neural networks
references.venue: In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining,
references.authors: Soobeom Jang Seong-Eun Moon Jong-Seok Lee
references.title: Brain signal classification via learning connectivity structure
references.venue: arXiv preprint arXiv:1905.11678,
references.authors: Bo Jiang Ziyan Zhang Doudou Lin Jin Tang Bin Luo
references.title: Semi-supervised learning with graph learning-convolutional networks
references.venue: In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition,
references.authors: Bo Jiang Ziyan Zhang Doudou Lin Jin Tang Bin Luo
references.title: Semi-supervised learning with graph learning-convolutional networks
references.venue: In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition,
references.authors: Wei Jin Tyler Derr Haochen Liu Yiqi Wang Suhang Wang Zitao Liu Jiliang Tang
references.title: Self-supervised learning on graphs: Deep insights and new direction
references.authors: Wei Jin Yao Ma Xiaorui Liu Xianfeng Tang Suhang Wang Jiliang Tang
references.title: Graph structure learning for robust graph neural networks
references.venue: arXiv preprint arXiv:2005.10203,
references.authors: Daniel D Johnson Hugo Larochelle Daniel Tarlow
references.title: Learning graph structure with a finite-state automaton layer
references.venue: arXiv preprint arXiv:2007.04929,
references.authors: Seyed Mehran Kazemi Rishab Goel Kshitij Jain Ivan Kobyzev Akshay Sethi Peter Forsyth Pascal Poupart
references.title: Representation learning for dynamic graphs: A survey
references.authors: Anees Kazi Luca Cosmo Nassir Navab Michael Bronstein
references.title: Differentiable graph module (dgm) for graph convolutional networks
references.venue: arXiv preprint arXiv:2002.04999,
references.authors: Thomas N. Kipf Max Welling
references.title: Semi-supervised classification with graph convolutional networks
references.venue: In ICLR,
references.authors: Yann LeCun Corinna Cortes CJ Burges
references.title: Mnist handwritten digit database
references.venue: ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist,
references.authors: Qimai Li Zhichao Han Xiao-Ming Wu
references.title: Deeper insights into graph convolutional networks for semi-supervised learning
references.venue: In AAAI,
references.authors: Ruoyu Li Sheng Wang Feiyun Zhu Junzhou Huang
references.title: Adaptive graph convolutional neural networks
references.venue: arXiv preprint arXiv:1801.03226,
references.authors: Renjie Liao Yujia Li Yang Song Shenlong Wang Charlie Nash William L Hamilton David Duvenaud Raquel Urtasun Richard S Zemel
references.title: Efficient graph generation with graph recurrent attention
references.authors: Jenny Liu Aviral Kumar Jimmy Ba Jamie Kiros Kevin Swersky
references.title: Graph normalizing flows
references.venue: In NeurIPS,
references.authors: Wei Liu Junfeng He Shih-Fu Chang
references.title: Large graph construction for scalable semi-supervised learning
references.venue: In ICML,
references.authors: Vinod Nair Geoffrey E Hinton
references.title: Rectified linear units improve restricted boltzmann machines
references.venue: In Icml,
references.authors: Kenta Oono Taiji Suzuki
references.title: Graph neural networks exponentially lose expressive power for node classification
references.venue: In ICLR,
references.authors: Fabian Pedregosa Gaël Varoquaux Alexandre Gramfort Vincent Michel Bertrand Thirion Olivier Grisel Mathieu Blondel Peter Prettenhofer Ron Weiss Vincent Dubourg
references.title: Scikitlearn: Machine learning in python
references.authors: Bryan Perozzi Rami Al-Rfou Steven Skiena
references.title: Deepwalk: Online learning of social representations
references.venue: In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining,
references.authors: Shah Rukh Qasim Jan Kieseler Yutaro Iiyama Maurizio Pierini
references.title: Learning representations of irregular particle-detector geometry with distance-weighted graph networks
references.venue: The European Physical Journal C,
references.authors: Sam T Roweis Lawrence K Saul
references.title: Nonlinear dimensionality reduction by locally linear embedding
references.authors: Franco Scarselli Marco Gori Ah Chung Tsoi Markus Hagenbuchner Gabriele Monfardini
references.title: The graph neural network model
references.venue: IEEE Transactions on Neural Networks,
references.authors: Prithviraj Sen Galileo Namata Mustafa Bilgic Lise Getoor Brian Galligher Tina Eliassi- Rad
references.title: Collective classification in network data
references.venue: AI magazine,
references.authors: Otilia Stretcu Krishnamurthy Viswanathan Dana Movshovitz-Attias Emmanouil Platanios Sujith Ravi Andrew Tomkins
references.title: Graph agreement models for semi-supervised learning
references.venue: In NeurIPS,
references.authors: Mohammed Suhail Leonid Sigal
references.title: Mixture-kernel graph attention network for situation recognition
references.venue: In Proceedings of the IEEE International Conference on Computer Vision,
references.authors: Joshua B Tenenbaum Vin De Silva John C Langford
references.title: A global geometric framework for nonlinear dimensionality reduction
references.authors: Petar Veličković Guillem Cucurull Arantxa Casanova Adriana Romero Pietro Lio Yoshua Bengio
references.title: Graph attention networks
references.venue: In ICLR,
references.authors: Pascal Vincent Hugo Larochelle Yoshua Bengio Pierre-Antoine Manzagol
references.title: Extracting and composing robust features with denoising autoencoders
references.venue: In ICML,
references.authors: Yue Wang Yongbin Sun Ziwei Liu Sanjay E Sarma Michael M Bronstein Justin M Solomon
references.title: Dynamic graph cnn for learning on point clouds
references.venue: Acm Transactions On Graphics (tog),
references.authors: Xuan Wu Lingxiao Zhao Leman Akoglu
references.title: A quest for structure: Jointly learning the graph structure and semi-supervised classification
references.venue: In CIKM,
references.authors: Liang Yang Zesheng Kang Xiaochun Cao Di Jin Bo Yang Yuanfang Guo
references.title: Topology optimization based graph convolutional network
references.venue: In IJCAI,
references.authors: Jiaxuan You Rex Ying Xiang Ren William L Hamilton Jure Leskovec
references.title: Graphrnn: Generating realistic graphs with deep auto-regressive models
references.venue: arXiv preprint arXiv:1802.08773,
references.authors: Yuning You Tianlong Chen Zhangyang Wang Yang Shen
references.title: When does self-supervision help graph convolutional networks
references.venue: arXiv preprint arXiv:2006.09136,
references.authors: Donghan Yu Ruohong Zhang Zhengbao Jiang Yuexin Wu Yiming Yang
references.title: Graph-revised convolutional network
references.venue: In ECML PKDD,
references.authors: Jiani Zhang Xingjian Shi Junyuan Xie Hao Ma Irwin King Dit-Yan Yeung
references.title: Gaan: Gated attention networks for learning on large and spatiotemporal graphs
references.venue: arXiv preprint arXiv:1803.07294,
references.authors: Jiawei Zhang Haopeng Zhang Congying Xia Li Sun
references.title: Graph-bert: Only attention is needed for learning graph representations
references.venue: arXiv preprint arXiv:2001.05140,
references.authors: Tong Zhao Yozen Liu Leonardo Neves Oliver Woodford Meng Jiang Neil Shah
references.title: Data augmentation for graph neural networks
references.venue: arXiv preprint arXiv:2006.06830,
references.authors: Hao Zhu Yankai Lin Zhiyuan Liu Jie Fu Tat-seng Chua Maosong Sun
references.title: Graph neural networks with generated parameters for relation extraction
references.authors: Jiong Zhu Yujun Yan Lingxiao Zhao Mark Heimann Leman Akoglu Danai Koutra
references.title: Beyond homophily in graph neural networks: Current limitations and effective designs
references.venue: Advances in Neural Information Processing Systems,
references.authors: Qikui Zhu Bo Du Pingkun Yan
references.title: Self-supervised training of graph convolutional networks
references.venue: arXiv preprint arXiv:2006.02380,
references.authors: Xiaojin Zhu Zoubin Ghahramani
references.title: Learning from labeled and unlabeled data with label propagation
references.authors: Yanqiao Zhu Weizhi Xu Jinghao Zhang Qiang Liu Shu Wu Liang Wang
references.title: Deep graph structure learning for robust representations: A survey
references.venue: arXiv preprint arXiv:2103.03036,
sections.heading: 1 Introduction
sections.text: Graph representation learning has grown rapidly and found applications in domains where a natural graph of the data points is available [4, 25]. Graph neural networks (GNNs) [40] have been a key component to the success of the research in this area. Specifically, GNNs have shown promising results for semi-supervised classification when the available graph structure exhibits a high degree of homophily (i.e. connected nodes often belong to the same class) [57].
  We study the applicability of GNNs to (semi-supervised) classification problems where a graph structure is not readily available. The existing approaches for this problem either fix a similarity graph between the nodes or learn the GNN parameters and a graph structure simultaneously (see Related Work). In both cases, one main goal is to construct or learn a graph structure with a high degree of homophily with respect to the labels to aid the GNN classification. The latter approach is sometimes called latent graph learning and often results in higher predictive performance compared to the former approach (see, e.g., [12]).
  We identify a supervision starvation problem in latent graph learning approaches in which the edges between pairs of nodes that are far from labeled nodes receive insufficient supervision; this results in learning poor structures away from labeled nodes and hence poor generalization. We propose a solution for this problem by adopting a multi-task learning framework in which we supplement the classification task with a self-supervised task. The self-supervised task is based on the hypothesis
  ∗Work was done when authors were at Borealis AI.
  35th Conference on Neural Information Processing Systems (NeurIPS 2021).
  that a graph structure that is suitable for predicting the node features is also suitable for predicting the node labels. It works by masking some input features (or adding noise to them) and training a separate GNN aiming at updating the adjacency matrix in such a way that it can recover the masked (or noisy) features. The task is generic and can be combined with several existing latent graph learning approaches.
  We develop a latent graph learning model, dubbed SLAPS, that adopts the proposed self-supervised task. We provide a comprehensive experimental study on nine datasets (thirteen variations) of various sizes and from various domains and perform thorough analyses to show the merit of SLAPS.
  Our main contributions include: 1) identifying a supervision starvation problem for latent graph learning, 2) proposing a solution for the identified problem through self-supervision, 3) developing SLAPS, a latent graph learning model that adopts the self-supervised solution, 4) providing comprehensive experimental results showing SLAPS substantially outperforms existing latent graph learning baselines from various categories on various benchmarks, and 5) providing an implementation for latent graph learning that scales to graphs with hundreds of thousands of nodes.
sections.heading: 2 Related work
sections.text: Existing methods that relate to this work can be grouped into the following categories. We discuss selected work from each category and refer the reader to [60] for a full survey.
  Similarity graph: One approach for inferring a graph structure is to select a similarity metric and set the edge weight between two nodes to be their similarity [39, 44, 3]. To obtain a sparse structure, one may create a kNN similarity graph, only connect pairs of nodes whose similarity surpasses some predefined threshold, or do sampling. As an example, in [14] a (fixed) kNN graph using the cosine similarity of the node features is created. In [47], this idea is extended by creating a fresh graph in each layer of the GNN based on the node embedding similarities in that layer. Instead of choosing a single similarity metric, in [15] several (potentially weak) measures of similarity are fused. The quality of the predictions of these methods depends heavily on the choice of the similarity metric(s).
  Fully connected graph: Another approach is to start with a fully connected graph and assign edge weights using the available meta-data or employ the GNN variants that provide weights for each edge via an attention mechanism [45, 53]. This approach has been used in computer vision [e.g., 43], natural language processing [e.g., 56], and few-shot learning [e.g., 13]. The complexity of this approach grows rapidly making it applicable only to small-sized graphs. Zhang et al. [54] propose to define local neighborhoods for each node and only assume that these local neighborhoods are fully connected. Their approach relies on an initial graph structure to define the local neighborhoods.
  Latent graph learning: Instead of a similarity graph based on the initial features, one may use a graph generator with learnable parameters. In [30], a fully connected graph is created based on a bilinear similarity function with learnable parameters. In [12], a Bernoulli distribution is learned for each possible edge and graph structures are created through sampling from these distributions. In [49], the input structure is updated to increase homophily based on the labels and model predictions. In [6], an iterative approach is proposed that iterates over projecting the nodes to a latent space and constructing an adjacency matrix from the latent representations multiple times. A common approach in this category is to learn a projection of the nodes to a latent space where node similarities correspond to edge weights or edge probabilities. In [48], the nodes are projected to a latent space by learning weights for each of the input features. In [38, 21, 8], a multi-layer perceptron is used for projection. In [52, 55], a GNN is used for projection; it uses the node features and an initial graph structure. In [26], different graph structures are created in different layers by using separate GNN projectors, where the input to the GNN projector in a layer is the projected values and the generated graph structure from the previous layer. In our experiments, we compare with several approaches from this category.
  Leveraging domain knowledge: In some applications, one may leverage domain knowledge to guide the model toward learning specific structures. For example, in [24], abstract syntax trees and regular languages are leveraged in learning graph structures of Python programs that aid reasoning for downstream tasks. In [23], the structure learning is guided for robustness to adversarial attacks through the domain knowledge that clean adjacency matrices are often sparse and low-rank and exhibit feature smoothness along the connected nodes. Other examples in this category include
  [19, 38]. In our paper, we experiment with general-purpose datasets without access to domain knowledge.
  Proposed method: Our model falls within the latent graph learning category. We supplement the training with a self-supervised objective to increase the amount of supervision in learning a structure. Our self-supervised task is inspired by, and similar to, the pre-training strategies for GNNs [17, 18, 22, 51, 58] (specifically, we adopt the multi-task learning framework of You et al. [51]), but it differs from this line of work as we use self-supervision for learning a graph structure whereas the above methods use it to learn better (and, in some cases, transferable) GNN parameters.
sections.heading: 3 Background and notation
sections.text: We use lowercase letters to denote scalars, bold lowercase letters to denote vectors and bold uppercase letters to denote matrices. I represents an identity matrix. For a vector v, we represent its ith element as vi. For a matrixM , we represent the ith row asMi and the element at the ith row and jth column as Mij . For an attributed graph, we use n, m and f to represent the number of nodes, edges, and features respectively, and denote the graph as G = {V,A,X} where V = {v1, . . . , vn} is a set of nodes,A ∈ Rn×n is an adjacency matrix withAij indicating the weight of the edge from vi to vj (Aij = 0 implies no edge), andX ∈ Rn×f is a matrix whose rows correspond to node features. Graph convolutional networks (GCNs) [27] are a powerful variant of GNNs. For a graph G = {V,A,X} with a degree matrix D, layer l of the GCN architecture can be defined as H(l) = σ(ÂH(l−1)W (l)) where Â represents a normalized adjacency matrix,H(l−1) ∈ Rn×dl−1 represents the node representations in layer l-1 (H(0) = X), W (l) ∈ Rdl−1×dl is a weight matrix, σ is an activation function such as ReLU [34], and H(l) ∈ Rn×dl is the updated node embeddings. For undirected graphs where the adjacency is symmetric, Â = D− 1 2 (A + I)D− 1 2 corresponds to a row-and-column normalized adjacency with self-loops, and for directed graphs where the adjacency is not necessarily symmetric, Â =D−1(A+ I) corresponds to a row normalized adjacency matrix with self-loops. Here,D is a (diagonal) degree matrix for (A+ I) defined asDii = 1 + ∑ jAij .
sections.heading: 4 Proposed method: SLAPS
sections.text: SLAPS consists of four components: 1) generator, 2) adjacency processor, 3) classifier, and 4) self-supervision. Figure 1 illustrates these components. In the next three subsections, we explain the first three components. Then, we point out a supervision starvation problem for a model based only on these components. Then we describe the self-supervision component as a solution to the supervision starvation problem and the full SLAPS model.
sections.heading: 4.1 Generator
sections.text: The generator is a function G : Rn×f → Rn×n with parameters θG which takes the node features X ∈ Rn×f as input and produces a matrix Ã ∈ Rn×n as output. We consider the following two generators and leave experimenting with more sophisticated graph generators (e.g., [50, 32, 31]) and models with tractable adjacency computations (e.g., [7]) as future work.
  Full parameterization (FP): For this generator, θG ∈ Rn×n and the generator function is defined as Ã = GFP (X;θG) = θG. That is, the generator ignores the input node features and directly optimizes the adjacency matrix. FP is similar to the generator in LDS [12] except that the generator of LDS treats each element of Ã as the parameter of a Bernoulli distribution and samples graph structures from these distributions. FP is simple and flexible for learning any adjacency matrix but adds n2 parameters which limits scalability and makes the model susceptible to overfitting.
  MLP-kNN: Here, θG corresponds to the weights of a multi-layer perceptron (MLP) and Ã = GMLP(X;θG) = kNN(MLP(X)), where MLP : Rn×f → Rn×f ′ is an MLP that produces a matrix with updated node representations X ′; kNN : Rn×f ′ → Rn×n produces a sparse matrix. The implementation details for the kNN operation is provided in the supplementary material.
  Initialization and variants of MLP-kNN: Let AkNN represent an adjacency matrix created by applying a kNN function on the initial node features. One smart initialization for θG is to initialize it
  in a way that the generator initially generatesAkNN (i.e. Ã = AkNN before training starts). This can be trivially done for the FP generator by initializing θG toAkNN . For MLP-kNN, we consider two variants. In one, hereafter referred to simply as MLP, we keep the input dimension the same throughout the layers. In the other, hereafter referred to as MLP-D, we consider MLPs with diagonal weight matrices (i.e., except the main diagonal, all other parameters in the weight matrices are zero). For both variants, we initialize the weight matrices in θG with the identity matrix to ensure that the output of the MLP is initially the same as its input and the kNN graph created on these outputs is equivalent to AkNN (alternatively, one may use other MLP variants but pre-train the weights to output AkNN before the main training starts.). MLP-D can be thought of as assigning different weights to different features and then computing node similarities.
sections.heading: 4.2 Adjacency processor
sections.text: The output Ã of the generator may have both positive and negative values, may be non-symmetric and non-normalized. We let A = 12D − 12 (P(Ã) + P(Ã)T )D− 1 2 . Here P is a function with a non-negative range applied element-wise on its input – see supplementary material for details. The sub-expression 12 (P(Ã) + P(Ã)
  T ) makes the resulting matrix P(Ã) symmetric. To understand the reason for taking the mean of P(Ã) and P(Ã)T , assume Ã is generated by GMLP. If vj is among the k most similar nodes to vi and vice versa, then the strength of the connection between vi and vj will remain the same. However, if, say, vj is among the k most similar nodes to vi but vi is not among the top k for vj , then taking the average of the similarities reduces the strength of the connection between vi and vj . Finally, once we have a symmetric adjacency with non-negative values, we normalize 1 2 (P(Ã) + P(Ã) T ) by computing its degree matrixD and multiplying it from left and right toD− 1 2 .
sections.heading: 4.3 Classifier
sections.text: The classifier is a function GNNC : Rn×f × Rn×n → Rn×|C| with parameters θGNNC . It takes the node featuresX and the generated adjacencyA as input and provides for each node the logits for each class. C corresponds to the classes and |C| corresponds to the number of classes. We use a twolayer GCN for which θGNNC = {W (1),W (2)} and define our classifier as GNNC(A,X;θGNNC) = AReLU(AXW (1))W (2) but other GNN variants can be used as well (recall thatA is normalized). The training loss LC for the classification task is computed by taking the softmax of the logits to produce a probability distribution for each node and then computing the cross-entropy loss.
sections.heading: 4.4 Using only the first three components leads to supervision starvation
sections.text: One may create a model using only the three components described so far corresponding to the top part of Figure 1. As we will explain here, however, this model may suffer severely from supervision starvation. The same problem also applies to many existing approaches for latent graph learning, as they can be formulated as a combination of variants of these three components.
  Consider a scenario during training where two unlabeled nodes vi and vj are not directly connected to any labeled nodes according to the generated structure. Then, since a two-layer GCN makes predictions for the nodes based on their two-hop neighbors, the classification loss
  (i.e. LC) is not affected by the edge between vi and vj and this edge receives no supervision2. Figure 2 provides an example of such a scenario. Let us call the edges that do not affect the loss function LC (and consequently do not receive supervision) as starved edges. These edges are problematic because although they may not affect the training loss, the predictions at the test time depend on these edges and if their values are learned without enough supervision, the model may make poor predictions at the test time. A natural question concerning the extent of the problem caused by such edges is the proportion of starved edges. The following theorem formally establishes the extent of the problem for Erdős-Rényi graphs [10]; in the supplementary, we extend this result to the Barabási–Albert model [1] and scale-free networks [2]. An Erdős-Rényi graph with n nodes and m edges is a graph
  chosen uniformly at random from the collection of all graphs which have n nodes and m edges.
  Theorem 1 Let G(n,m) be an Erdős-Rényi graph with n nodes and m edges. Assume we have labels for q nodes selected uniformly at random. The probability of an edge being a starved edge with a two-layer GCN is equal to (1− qn )(1− q n−1 ) ∏2q i=1(1−
  m−1 (n2)−i ).
  We defer the proof to the supplementary material. To put the numbers from the theorem in perspective, let us consider three established benchmarks for semi-supervised node classification namely Cora, Citeseer, and Pubmed (the statistics for these datasets can be found in the Appendix). For an Erdős-Rényi graph with similar statistics as the Cora dataset (n = 2708, m = 5429, q = 140), the probability of an edge being a starved edge is 59.4% according to the above theorem. For Citeseer and Pubmed, this number is 75.7% and 96.7% respectively. While Theorem 1 is stated for Erdős-Rényi graphs, the identified problem also applies to natural graphs. For the original structures of Cora, Citeseer, and Pubmed, for example, 48.8%, 65.2%, and 91.6% of the edges are starved edges.
sections.heading: 4.5 Self-supervision
sections.text: One possible solution to the supervision starvation problem is to define a prior graph structure and regularize the learned structure toward it. This leads the starved edges toward the prior structure as opposed to neglecting them. The choice of the prior is important as it determines the inductive bias incorporated into the model. We define a prior structure based on the following hypothesis:
  Hypothesis 1 A graph structure that is suitable for predicting the node features is also suitable for predicting the node labels.
  We first explain why the above hypothesis is reasonable for an extreme case that is easy to understand and then extend the explanation to the general case. Consider an extreme scenario where one of the node features is the same as the node labels. A graph structure that is suitable for predicting this feature exhibits homophily for it. Because of the equivalence between this feature and the labels, the graph structure also exhibits homophily for the labels, so it is also suitable for predicting the labels. In the general (non-extreme) case, there may not be a single feature that is equivalent to the labels but a subset of the features may be highly predictive of the labels. A graph structure that is suitable for predicting this subset exhibits homophily for the features in the subset. Because this subset is highly
  2While using more layers may somewhat alleviate this problem, deeper GCNs typically produce inferior results, e.g., due to oversmoothing [29, 35] – see the supplementary material for empirical evidence.
  predictive of the labels, the structure also exhibits a high degree of homophily for the labels, so it is also suitable for predicting the node labels.
  Next, we explain how to design a suitable graph structure for predicting the features and how to regularize toward it. One could design such a structure manually (e.g., by handcrafting a graph that connects nodes based on the collective homophily between their individual features) and then penalize the difference between this prior graph and the learned graph. Alternatively, in this paper, we take a learning-based approach based on self-supervision where we not only use the learned graph structure for the classification task, but also for denoising the node features. The self-supervised task encourages the model to learn a structure that is suitable for predicting the node features. We describe this approach below and provide comparisons to the manual approach in the supplementary material.
  Our self-supervised task is based on denoising autoencoders [46]. Let GNNDAE : Rn×f × Rn×n → Rn×f be a GNN with parameters θGNNDAE that takes node features and a generated adjacency as input and provides updated node features with the same dimension as output. We train GNNDAE such that it receives a noisy version X̃ of the features X as input and produces the denoised features X as output. Let idx represent the indices corresponding to the elements of X to which we have added noise, andXidx represent the values at these indices. During training, we minimize:
  LDAE = L(Xidx,GNNDAE(X̃,A;θGNNDAE)idx) (1)
  whereA is the generated adjacency matrix and L is a loss function. For datasets where the features consist of binary vectors, idx consists of r percent of the indices of X whose values are 1 and rη percent of the indices whose values are 0, both selected uniformly at random in each epoch. Both r and η (corresponding to the negative ratio) are hyperparameters. In this case, we add noise by setting the 1s in the selected mask to 0s and L is the binary cross-entropy loss. For datasets where the input features are continuous numbers, idx consists of r percent of the indices of X selected uniformly at random in each epoch. We add noise by either replacing the values at idx with 0 or by adding independent Gaussian noises to each of the features. In this case, L is the mean-squared error loss.
  Note that the self-supervised task in equation 1 is generic and can be added to different GNNs as well as latent graph learning models. It can be also combined with other techniques in the literature that encourage learning more homophilous structures or increase the amount of supervision. In our experiments, we test the combination of our self-supervised task with two such techniques namely self-training [29] and AdaEdge [5]. Self-training helps the model “see” more labeled nodes and AdaEdge helps iteratively create graph structure with higher degrees of homophily. We refer the reader to the supplementary material for descriptions of self-training and AdaEdge.
sections.heading: 4.6 SLAPS
sections.text: Our final model is trained to minimize L = LC +λLDAE where LC is the classification loss, LDAE is the denoising autoencoder loss (see Equation 1), and λ is a hyperparameter controlling the relative importance of the two losses.
sections.heading: 5 Experiments
sections.text: In this section, we report our key results. More empirical comparisons, experimental analyses, and ablation studies are presented in the supplementary material.
  Baselines: We compare our proposal to several baselines with different properties. The first baseline is a multi-layer perceptron (MLP) which does not take the graph structure into account. We also compare against MLP-GAM* [42] which learns a fully connected graph structure and uses this structure to supplement the loss function of the MLP toward predicting similar labels for neighboring nodes. Our third baseline is label propagation (LP) [59], a well-known model for semi-supervised learning. Similar to [12], we also consider a baseline named kNN-GCN where we create a kNN graph based on the node feature similarities and feed this graph to a GCN; the graph structure remains fixed in this approach. We also compare with prominent existing latent graph learning models including LDS [12], GRCN [52], DGCNN [47], and IDGL [6]. In [6], another variant named IDGL-ANCH is also proposed that reduces time complexity through anchor-based approximation [33]. We compare against the base IDGL model because it does not sacrifice accuracy for time complexity, and because anchor-based approximation is model-agnostic and could be combined with other models too. We
  feed a kNN graph to the models requiring an initial graph structure. We also explore how adding self-training and AdaEdge impact the performance of kNN-GCN as well as SLAPS.
  Datasets: We use three established benchmarks in the GNN literature namely Cora, Citeseer, and Pubmed [41] as well as the ogbn-arxiv dataset [16] that is orders of magnitude larger than the other three datasets and is more challenging due to the more realistic split of the data into train, validation, and test sets. For these datasets, we only feed the node features to the models and not their original graph structure. Following [12, 6], we also experiment with several classification (non-graph) datasets available in scikit-learn [36] including Wine, Cancer, Digits, and 20News. Furthermore, following [20], we also provide results on MNIST [28]. The dataset statistics can be found in the supplementary. For Cora and Citeseer, the LDS model uses the train data for learning the parameters of the classification GCN, half of the validation for learning the parameters of the adjacency matrix (in their bi-level optimization setup, these are considered as hyperparameters), and the other half of the validation set for early stopping and tuning the other hyperparameters. Besides experimenting with the original setups of these two datasets, we also consider a setup that is closer to that of LDS: we use the train set and half of the validation set for training and the other half of validation for early stopping and hyperparameter tuning. We name the modified versions Cora390 and Citeseer370 respectively where the number proceeding the dataset name shows the number of labels from which gradients are computed. We follow a similar procedure for the scikit-learn datasets.
  Implementation: We defer the implementation details and the best hyperparameter settings for our model on all the datasets to the supplementary material.
sections.heading: 5.1 Comparative results
sections.text: The results of SLAPS and the baselines on our benchmarks are reported in Tables 1 and 2. We start by analyzing the results in Table 1 first. Starting with the baselines, we see that learning a fully connected graph in MLP-GAM* makes it outperform MLP. kNN-GCN significantly outperforms MLP on Cora and Citeseer but underperforms on Pubmed and ogbn-arxiv. Furthermore, both self-training and AdaEdge improve the performance of kNN-GCN. This shows the importance of the similarity metric and the graph structure that is fed into GCN; a low-quality structure can harm model performance. LDS outperforms MLP but the fully parameterized adjacency matrix of LDS results in memory issues for Pubmed and ogbn-arxiv. As for GRCN, it was shown in the original paper that GRCN can revise a good initial adjacency matrix and provide a substantial boost in performance. However, as evidenced by the results, if the initial graph structure is somewhat poor, GRCN’s performance becomes on par with kNN-GCN. IDGL is the best performing baseline.
  In addition to the aforementioned baselines, we also experimented with GCN, GAT, and Transformer (encoder only) architectures applied on fully connected graphs. GCN always learned to predict the majority class. This is because after one fully connected GCN layer, all nodes will have the same embedding and become indistinguishable. GAT also showed similar behavior. We believe this is because the attention weights are (almost) random at the beginning (due to random initialization of the model parameters) resulting in nodes becoming indistinguishable and GAT cannot escape from that state. The skip connections of Transformer helped avoid the problem observed for GCN and GAT and we were able to achieve better results (∼ 40% accuracy on Cora). However, we observed severe overfitting, even with small models and with high dropout probabilities.
  SLAPS consistently outperforms the baselines in some cases by large margins. Among the generators, the winner is dataset-dependent with MLP-D mostly outperforming MLP on datasets with many features and MLP outperforming on datasets with small numbers of features. Using the software that was publicly released by the authors, the baselines that learn a graph structure fail on ogbn-arxiv; our implementation, on the other hand, scales to such large graphs3. Adding self-training helps further improve the results of SLAPS. Adding AdaEdge, however, does not seem effective, probably because the graph structure learned by SLAPS already exhibits a high degree of homophily (see Section 5.4).
  In Table 2, we only compared SLAPS with the best performing baselines from Table 1 (kNN-GCN, LDS and IDGL). We also included an MLP baseline for comparison. On three out of four datasets, SLAPS outperforms the LDS and IDGL baselines. For the Digits dataset, interestingly kNN-GCN outperforms the learning-based models. This could be because the initial kNN structure for this dataset is already a good structure. Among the datasets on which we can train SLAPS with the FP generator, 20news has the largest number of nodes (9,607 nodes). On this dataset, we observed that an FP generator suffers from overfitting and produces weaker results compared to other generators due to its large number of parameters.
  Jiang et al. [21] show that learning a latent graph structure of the input examples can help with
  semi-supervised image classification. In particular, they create three versions of the MNIST dataset each consisting of a randomly selected subset with 10,000 examples in total. The first version contains 1000 labels for training, the second contains 2000, and the third version contains 3000 labels for training. All three variants use an extra 1000 labels for validation. The other examples are used as test examples. Here, we conduct an experiment to measure the performance of SLAPS on these variants of the MNIST dataset. We compare against GLCN [21] as well as the baselines in the GLCN paper including manifold regularization [3], label propagation,
  deep walk [37], graph convolutional networks (GCN), and graph attention networks (GAT).
  The results are reported in Table 3. From the results, it can be viewed that SLAPS outperforms GLCN and all the other baselines on the 3 variants. Compared to GLCN, on the three variants SLAPS
  3We note that IDGL-ANCH also scales to ogbn-arxiv.
  reduces the error by 7%, 5%, and 2% respectively, showing that SLAPS can be more effective when the labeled set is small and providing more empirical evidence for Theorem 1.
  5.2 The effectiveness of self-supervision
  Learning a structure only using self-supervision: To provide more insight into the value provided by the self-supervision task and the generalizability of the adjacency learned through this task, we conduct experiments with a variant of SLAPS named SLAPS2s that is trained in two stages. We first train the GNNDAE model by minimizing LDAE described in in Equation 1. Recall that LDAE depends on the parameters θG of the generator and the parameters θGNNDAE of the denoising autoencoder. After every t epochs of training, we fix the adjacency matrix, train a classifier with the fixed adjacency matrix, and measure classification accuracy on the validation set. We select the epoch that produces the adjacency providing the best validation accuracy for the classifier. Note that in SLAPS2s, the adjacency matrix only receives gradients from the self-supervised task in Equation 1.
  Figure 3 shows the performance of SLAPS and SLAPS2s on Cora and compares them with kNNGCN. Although SLAPS2s does not use the node labels in learning an adjacency matrix, it outperforms kNN-GCN (8.4% improvement when using an FP generator). With an FP generator, SLAPS2s even achieves competitive performance with SLAPS; this is mainly because FP does not leverage the supervision provided by GCNC toward learning generalizable patterns that can be used for nodes other than those in the training set. These results corroborate the effectiveness of the self-supervision task for learning an adjacency matrix. Besides, the results show that learning the adjacency using both self-supervision and the task-specific node labels results in higher predictive accuracy.
  The value of λ: Figure 4 shows the performance of SLAPS4 on Cora and Citeseer with different values of λ. When λ = 0, corresponding to removing self-supervision, the model performance is somewhat poor. As soon as λ becomes positive, both models see a large boost in performance showing that self-supervision is crucial to the high performance of SLAPS. Increasing λ further provides larger boosts until it becomes so large that the self-supervision loss dominates the classification loss and the performance deteriorates. Note that with λ = 0, SLAPS with the MLP generator becomes a variant of the model proposed in [8], but with a different similarity function.
  Is self-supervision actually solving the supervision starvation problem? In Fig 4, we showed that self-supervision is key to the high performance of SLAPS. Here, we examine if this is because self-supervision indeed addresses the supervision starvation problem. For this purpose, we compare SLAPS with
  and without self-supervision on two groups of test nodes on Cora: 1) those that are not connected to any labeled nodes after training, and 2) those that are connected to at least one labeled node after training. The nodes in group one have a high chance of having starved edges. We observed that adding self-supervision provides 38.0% improvement for the first group and only 8.9% improvement for the latter. Since self-supervision mainly helps with nodes in group 1, this provides evidence that self-supervision is an effective solution to the supervision starvation problem.
  The effect of the training set size: According to Theorem 1, a smaller q (corresponding to the training set size) results in more starved edges in each epoch. To explore the effect of self-supervision as a function of q, we compared SLAPS with and without supervision on Cora and Citeseer while reducing the number of labeled nodes per class from 20 to 5. We used the FP generator for this experiment. With 5 labeled nodes per class, adding self-supervision provides 16.7% and 22.0%
  4The generator used in this experiment is MLP; other generators produced similar results.
  improvements on Cora and Citeseer respectively, which is substantially higher than the corresponding numbers when using 20 labeled nodes per class (10.0% and 7.0% respectively). This provides empirical evidence for Theorem 1. Note that the results on Cora390 and Citeseer 370 datasets provide evidence that the self-supervised task is effective even when the label rate is high.
  5.3 Experiments with noisy graphs
  The performance of GNNs highly depends on the quality of the input graph structure and deteriorates when the graph structure is noisy [see 61, 9, 11]. Here, we verify whether selfsupervision is also helpful when a noisy structure is provided as input. Toward this goal, we experiment with Cora and Citeseer and provide noisy versions of the input graph as input. The provided noisy graph structure is used only for initialization; it is then further optimized by SLAPS. We perturb the graph structure by replacing ρ percent of the edges in the original structure (selected uniformly at random) with random edges. Figure 5 shows the performance of SLAPS with and without self-supervision (λ = 0 corresponds to no supervision). We also report the results of vanilla GCN on these perturbed graphs for comparison. It can be viewed that self-supervision consistently provides a boost in performance especially for higher values of ρ.
sections.heading: 5.4 Analyses of the learned adjacency
sections.text: Noisy graphs: Following the experiment in Section 5.3, we compared the learned and original structures by measuring the number of random edges added during perturbation but removed by the model and the number of edges removed during the perturbation but recovered by the model. For Cora, SLAPS removed 76.2% and 70.4% of the noisy edges and recovered 58.3% and 44.5% of the removed edges for ρ = 25% and ρ = 50% respectively
  while SLAPS with λ = 0 only removed 62.8% and 54.9% of the noisy edges and recovered 51.4% and 35.8% of the removed edges. This provides evidence on self-supervision being helpful for structure learning.
  Homophily: As explained earlier, a properly learned graph for semi-supervised classification with GNNs exhibits high homophily. To verify the quality of the learned adjacency with respect to homophily, for every pair of nodes in the test set, we compute the odds of the two nodes sharing the same label as a function of the normalized weight of the edge connecting them. Figure 6 represents the odds for different weight intervals (recall that A is row and column normalized). For both Cora and Citeseer, nodes’ connected with higher edge weights are more likely to share the same label compared to nodes with lower or zero edge weights. Specifically, whenAij ≥ 0.1, vi and vj are almost 2.5 and 2.0 times more likely to share the same label on Cora and Citeseer respectively.
sections.heading: 6 Conclusion
sections.text: We proposed SLAPS: a model for learning the parameters of a graph neural network and a graph structure of the nodes connectivities simultaneously from data. We identified a supervision starvation problem that emerges for graph structure learning, especially when training data is scarce. We proposed a solution to the supervision starvation problem by supplementing the training objective with a well-motivated self-supervised task. We showed the effectiveness of our model through a comprehensive set of experiments and analyses.
sections.heading: 7 Funding Transparency Statement
sections.text: This work was fully funded by Borealis AI.
title: SLAPS: Self-Supervision Improves Structure Learning for Graph Neural Networks