R ESIDUAL G ATED G RAPH C ONV N ETS
Anonymous authors
Paper under double-blind review
A BSTRACT
Graph-structured data such as social networks, functional brain networks, gene regulatory networks, communications networks have brought the interest in generalizing deep learning techniques to graph domains.
In this paper, we are interested to design neural networks for graphs with variable length in order to solve learning problems such as vertex classiﬁcation, graph classiﬁcation, graph regression, and graph generative tasks.
Most existing works have focused on recurrent neural networks (RNNs) to learn meaningful representations of graphs, and more recently new convolutional neural networks (ConvNets) have been introduced. In this work, we want to compare rigorously these two fundamental families of architectures to solve graph learning tasks.
We review existing graph RNN and ConvNet architectures, and propose natural extension of LSTM and ConvNet to graphs with arbitrary size.
Then, we design a set of analytically controlled experiments on two basic graph problems, i.e. subgraph matching and graph clustering, to test the different architectures. Numerical results show that the proposed graph ConvNets are 3-17% more accurate and 1.5-4x faster than graph RNNs.
Graph ConvNets are also 36% more accurate than variational (non-learning) techniques.
Finally, the most effective graph ConvNet architecture uses gated edges and residuality. Residuality plays an essential role to learn multi-layer architectures as they provide a 10% gain of performance.
I NTRODUCTION
Convolutional neural networks of LeCun et al.
and recurrent neural networks of Hochreiter & Schmidhuber (1997) are deep learning architectures that have been applied with great success to computer vision (CV) and natural language processing (NLP) tasks.
Such models require the data domain to be regular, such as 2D or 3D Euclidean grids for CV and 1D line for NLP.
Beyond CV and NLP, data does not usually lie on regular domains but on heterogeneous graph domains.
Users on social networks, functional time series on brain structures, gene DNA on regulatory networks,
IP packets on telecommunication networks are a a few examples to motivate the development of new neural network techniques that can be applied to graphs.
One possible classiﬁcation of these techniques is to consider neural network architectures with ﬁxed length graphs and variable length graphs.
In the case of graphs with ﬁxed length, a family of convolutional neural networks has been developed on spectral graph theory by Chung (1997).
The early work of Bruna et al.
(2013) proposed to formulate graph convolutional operations in the spectral domain with the graph Laplacian, as an analogy of the Euclidean Fourier transform as proposed by Hammond et al.
This work was extended by Henaff et al.
(2015) to smooth spectral ﬁlters for spatial localization.
Defferrard et al.
(2016) used Chebyshev polynomials to achieve linear complexity for sparse graphs, Levie et al.
(2017) applied Cayley polynomials to focus on narrow-band frequencies, and Monti et al.
(2017b) dealt with multiple (ﬁxed) graphs.
Finally, Kipf & Welling (2017) simpliﬁed the spectral convnets architecture using 1-hop ﬁlters to solve the semi-supervised clustering task.
For related works, see also the works of Bronstein et al.
(2017b),
Bronstein et al. (2017a) and references therein.
For graphs with variable length, a generic formulation was proposed by Gori et al.
; Scarselli et al.
based on recurrent neural networks.
The authors deﬁned a multilayer perceptron of a vanilla RNN.
This work was extended by Li et al.
(2016) using a GRU architecture and a hidden state that captures the average information in local neighborhoods of the graph.
The work of Sukhbaatar et al.
(2016) introduced a vanilla graph ConvNet and used this new architecture to solve learning communication tasks.
Marcheggiani & Titov (2017) introduced an edge gating mechanism in graph
ConvNets for semantic role labeling.
Finally, Bruna & Li (2017) designed a network to learn nonlinear approximations of the power of graph Laplacian operators, and applied it to the unsupervised graph clustering problem.
Other works for drugs design, computer graphics and vision are presented by Duvenaud et al.
; Boscaini et al.
; Monti et al.
(2017a).
In this work, we study the two fundamental classes of neural networks, RNNs and ConvNets, in the context of graphs with arbitrary length.
Section 2 reviews the existing techniques.
Section 3 presents the new graph NN models.
Section 4 reports the numerical experiments.
N EURAL NETWORKS FOR GRAPHS WITH ARBITRARY LENGTH 2. R ECURRENT NEURAL NETWORKS
Generic formulation.
Consider a standard RNN for word prediction in natural language processing.
Let h i be the feature vector associated with word i in the sequence.
In a regular vanilla RNN, h i is computed with the feature vector h j from the previous step and the current word x i , so we have:
[Equation]
The notion of neighborhood for regular RNNs is the previous step in the sequence.
For graphs, the notion of neighborhood is given by the graph structure.
If h i stands for the feature vector of vertex i , then the most generic version of a feature vector for a graph RNN is
[Equation]
where x i refers to a data vector and { h j : j → i } denotes the set of feature vectors of the neighboring vertices.
Observe that the set { h j } is unordered, meaning that h i is intrinsic, i.e. invariant by vertex re-indexing (no vertex matching between graphs is required).
Other properties of f G-RNN are locality as only neighbors of vertex i are considered, weight sharing, and such vector is independent of the graph length.
In summary, to deﬁne a feature vector in a graph RNN, one needs a mapping f that takes as input an unordered set of vectors { h j } , i.e. the feature vectors of all neighboring vertices, and a data vector x i , Figure 1(a).
We refer to the mapping f G-RNN as the neighborhood transfer function in graph RNNs.
In a regular
RNN, each neighbor as a distinct position relatively to the current word (1 position left from the center).
In a graph, if the edges are not weighted or annotated, neighbors are not distinguishable.
The only vertex which is special is the center vertex around which the neighborhood is built.
This explains the generic formulation of Eq.
This type of formalism for deep learning for graphs with variable length is described by Scarselli et al.
; Gilmer et al.
; Bronstein et al. (2017a) with slightly different terminology and notations.
Graph Neural Networks of Scarselli et al.
The earliest work of graph RNNs for arbitrary graphs was introduced by Gori et al.
; Scarselli et al.
The authors proposed to use a vanilla RNN with a multilayer perceptron to deﬁne the feature vector h i :
[Equation]
with
C G- [Equation] [Equation] [Equation]
[Equation]
) , and σ is the sigmoid function, A, B, U, V are the weight parameters to learn.
Minimization of Eq.
(2) does not hold a closed-form solution as the dependence computational graph of the model is not a directed acyclic graph (DAG). Scarselli et al.
(2009) proposed a ﬁxed-point iterative scheme: for t = 0 , 1 , 2 , ... h [Equation] 1 i
[Equation]
The iterative scheme is guaranteed to converge as long as the mapping is contractive, which can be a strong assumption.
Besides, a large number of iterations can be computational expensive.
[Figure] Gated Graph
of Chung al
[Equation]
As the minimization of Eq.
(4) does not have an analytical solution, Li et al.
(2016) designed the following iterative scheme:
[Equation]
where ¯ h ti = (cid:88)
j → i h tj , and C G-GRU ( h ti , ¯ h ti ) is equal to z t +1 i
[Equation]
where (cid:12) is the Hadamard point-wise multiplication operator.
This model was used for NLP tasks by Li et al.
(2016) and also in quantum chemistry by Gilmer et al.
(2017) for fast organic molecule properties estimation, for which standard techniques (DFT) require expensive computational time.
Tree-Structured LSTM of Tai et al.
The authors extended the original LSTM model of
Hochreiter & Schmidhuber (1997) to a tree-graph structure:
[Equation]
where C ( i ) refers the set of children of node i .
C T-LSTM
( x i , h i , (cid:80) j ∈ C
( i ) h j ) is equal to
[Equation]
Unlike the works of Scarselli et al.
; Li et al.
(2016), Tree-LSTM does not require an iterative process to update its feature vector h i as the tree structure is also a DAG as original LSTM.
Consequently, the feature representation (5) can be updated with a recurrent formula.
Nevertheless, a tree is a special case of graphs, and such recurrence formula cannot be directly applied to arbitrary graph structure.
A key property of this model is the function f ij which acts as a gate on the edge from neighbor j to vertex i .
Given the task, the gate will close to let the information ﬂow from neighbor j to vertex i , or it will open to stop it.
It seems to be an essential property for learning systems on graphs as some neighbors can be irrelevant.
For example, for the community detection task, the graph neural network should learn which neighbors to communicate (same community) and which neighbors to ignore (different community).
In different contexts, Dauphin et al.
(2017) added a gated mechanism inside the regular ConvNets in order to improve language modeling for translation tasks, and van den Oord et al.
(2016) considered a gated unit with the convolutional layers after activation, and used it for image generation.
2. C ONVOLUTIONAL NEURAL NETWORKS
Generic formulation.
Consider now a classical ConvNet for computer vision.
Let h (cid:96)ij denote the feature vector at layer (cid:96) associated with pixel ( i, j ) .
In a regular ConvNet, h (cid:96) +1 ij is obtained by applying a non linear transformation to the feature vectors h (cid:96)i (cid:48)
j (cid:48) for all pixels ( i (cid:48) , j (cid:48) ) in a neighborhood of pixel ( i, j ) .
For example, with 3 × 3 ﬁlters, we would have:
[Equation]
1 and | j − j (cid:48) | ≤ 1 } (cid:1) In the above, the notation { h (cid:96)i (cid:48) j (cid:48) : | i − i (cid:48) | ≤ 1 and | j − j (cid:48) | ≤ 1 } denote the concatenation of all feature vectors h (cid:96)i (cid:48)
j (cid:48) belonging to the 3 × 3 neighborhood of vertex ( i, j ) .
In ConvNets, the notion of neighborhood is given by the euclidian distance.
As previously noticed, for graphs, the notion of neighborhood is given by the graph structure.
Thus, the most generic version of a feature vector h i at vertex i for a graph ConvNet is
[Equation]
where { h (cid:96)j : j → i } denotes the set of feature vectors of the neighboring vertices.
In other words, to deﬁne a graph ConvNet, one needs a mapping f G-CNN taking as input a vector h (cid:96)i (the feature vector of the center vertex) as well as an unordered set of vectors { h (cid:96)j } (the feature vectors of all neighboring vertices), see Figure 1(b).
We also refer to the mapping f G-CNN as the neighborhood transfer function.
In a regular ConvNet, each neighbor as a distinct position relatively to the center pixel (for example 1 pixel up and 1 pixel left from the center).
As for graph RNNs, the only vertex which is special for graph ConvNets is the center vertex around which the neighborhood is built.
CommNets of Sukhbaatar et al. (2016).
The authors introduced one of the simplest instantiations of a graph ConvNet with the following neighborhood transfer function:
[Equation]
where (cid:96) denotes the layer level, and ReLU is the rectiﬁed linear unit.
We will refer to this architecture as the vanilla graph ConvNet.
Sukhbaatar et al.
(2016) used this graph neural network to learn the communication between multiple agents to solve multiple tasks like trafﬁc control.
Syntactic Graph Convolutional Networks of Marcheggiani & Titov (2017).
The authors proposed the following transfer function:
[Equation]
where η ij act as edge gates, and are computed by:
[Equation]
These gated edges are very similar in spirit to the Tree-LSTM proposed in Tai et al.
We believe this mechanism to be important for graphs, as they will be able to learn what edges are important for the graph learning task to be solved.
M ODELS
Proposed Graph LSTM.
First, we propose to extend the Tree-LSTM of Tai et al.
(2015) to arbitrary graphs and multiple layers:
[Equation]
As there is no recurrent formula is the general case of graphs, we proceed as Scarselli et al.
and use an iterative process to solve Eq. (10): At layer (cid:96) , for t = 0 , 1 , ..., T
[Equation]
j → i f (cid:96),t +1 ij (cid:12) c (cid:96),t +
j h (cid:96),t +
i =
o (
cid:96),t +
i (cid:12) tanh ( c (cid:96),t
+1 i ) and initial conditions: h (cid:96),t =
i = c (cid:96),t =
i = 0 , ∀ i, (cid:96) x
(cid:96)i = h (cid:96) − 1 ,T i , x (cid:96) =
i = x
i , ∀ i, (cid:96)
In other words, the vector h (cid:96) +1 i is computed by running the model from t = 0 , .., T at layer (cid:96) .
It produces the vector h (cid:96),t =
T i which becomes h (cid:96) +1 i and also the input x (cid:96) +1 i for the next layer.
The proposed Graph LSTM model differs from Liang et al.
; Peng et al.
(2017) mostly because the cell C G-LSTM in these previous models is not iterated over multiple times T , which reduces the performance of Graph LSTM (see numerical experiments on Figure 4).
Proposed Gated Graph ConvNets.
We leverage the vanilla graph ConvNet architecture of
Sukhbaatar et al.
(2016), Eq.(7), and the edge gating mechanism of Marcheggiani & Titov (2017),
Eq.(8), by considering the following model:
[Equation]
where h (cid:96) =
i = x
i , ∀ i , and the edge gates η ij are deﬁned in Eq.
This model is the most generic formulation of a graph ConvNet (because it uses both the feature vector h (cid:96)i of the center vertex and the feature vectors h (cid:96)j of neighboring vertices) with the edge gating property.
Residual Gated Graph ConvNets.
In addition, we formulate a multi-layer gated graph ConvNet using residual networks (ResNets) introduced by He et al.
This boils down to add the identity operator between successive convolutional layers:
[Equation]
[Equation]
As we will see, such multi-layer strategy work very well for graph neural networks.
E XPERIMENTS 4. S UBGRAPH MATCHING
We consider the subgraph matching problem presented by Scarselli et al.
(2009), see Figure 2(a).
The goal is to ﬁnd the vertices of a given subgraph P in larger graphs G k with variable sizes.
[Figure]
Identifying similar localized patterns in different graphs is one of the most basic tasks for graph neural networks.
The subgraph P and larger graph G k are generated with the stochastic block model (SBM), see for example Abbe (2017).
A SBM is a random graph which assigns communities to each node as follows: any two vertices are connected with the probability p if they belong to the same community, or they are connected with the probability q if they belong to different communities.
For all experiments, we generate a subgraph P of 20 nodes with a SBM q = 0 . 5 , and the signal on P is generated with a uniform random distribution with a vocabulary of size 3 , i.e. { 0 , 1 , 2 } .
Larger graphs G k are composed of 10 communities with sizes randomly generated between 15 and 25.
The SBM of each community is p = 0 .
The value of q , which acts as the noise level, is 0 .
1 , unless otherwise speciﬁed.
Besides, the signal on G k is also randomly generated between { 0 , 1 , 2 } .
Inputs of all neural networks are the graphs with variable size, and outputs are vertex classiﬁcation vectors of input graphs.
Finally, the output of neural networks are simple fully connected layers from the hidden states.
All reported results are averaged over 5 trails.
We run 5 algorithms; Gated Graph Neural Networks of Li et al.
, CommNets of Sukhbaatar et al.
(2016), SyntacticNets of Marcheggiani & Titov (2017),
and the proposed Graph LSTM and Gated ConvNets from Section 3.
We upgrade the existing models of Li et al.
; Sukhbaatar et al.
; Marcheggiani & Titov (2017) with a multilayer version for Li et al. (2016) and using ResNets for all three architectures.
We also use the batch normalization technique of Ioffe & Szegedy (2015) to speed up learning convergence for our algorithms, and also for Li et al.
; Sukhbaatar et al.
; Marcheggiani & Titov (2017).
The learning schedule is as follows: the maximum number of iterations, or equivalently the number of randomly generated graphs with the attached subgraph is 5,000 and the learning rate is decreased by a factor 1 .
25 if the loss averaged over 100 iterations does not decrease.
The loss is the cross-entropy with 2 classes (the subgraph P class and the class of the larger graph G k ) respectively weighted by their sizes.
The accuracy is the average of the diagonal of the normalized confusion matrix w.r.t.
the cluster sizes (the confusion matrix measures the number of nodes correctly and badly classiﬁed for each class).
We also report the time for a batch of 100 generated graphs.
The choice of the architectures will be given for each experiment.
All algorithms are optimized as follow.
We ﬁx a budget of parameters of B = 100 K and a number of layers L = 6 .
The number of hidden neurons
H for each layer is automatically computed.
Then we manually select the optimizer and learning rate for each architecture that best minimize the loss.
For this task, Li et al.
Sukhbaatar et al.
(2016); Marcheggiani & Titov (2017) and our gated ConvNets work well with Adam and learning rate 0 . 00075 .
Graph LSTM uses SGD with learning rate 0 .
Besides, the value of inner iterative steps T for graph LSTM and Li et al.
(2016) is 3 .
The ﬁrst experiment focuses on shallow graph neural networks, i.e. with a single layer L = 1 .
We also vary the level of noise, that is the probability q in the SBM that connects two vertices in two different communities (the higher q the more mixed are the communities).
The hyper-parameters are selected as follows.
Besides L = 1 , the budget is B = 100 K and the number of hidden neurons H is automatically computed for each architecture to satisfy the budget.
First row of Figure 3 reports the accuracy and time for the ﬁve algorithms and for different levels of noise q = { 0 . 1 , 0 . 2 , 0 . 35 , 0 . 5 } .
RNN architectures are plotted in dashed lines and ConvNet architectures in solid lines.
For shallow networks, all RNN architectures (graph LSTM and Li et al.
(2016)) performs much better, but they also take more time than the graph ConvNets architectures we propose, as well as Sukhbaatar et al.
(2016); Marcheggiani & Titov (2017).
As expected, all algorithms performances decrease when the noise increases.
The second experiment demonstrates the importance of having multiple layers compared to shallow networks.
We vary the number of layers L = { 1 , 2 , 4 , 6 , 10 } and we ﬁx the number of hidden neurons to H = 50 .
Notice that the budget is not the same for all architectures.
Second row of Figure 3 reports the accuracy and time w.r.t.
L (middle ﬁgure is a zoom in the left ﬁgure).
All models clearly beneﬁt with more layers, but RNN-based architectures see their performances decrease for a large number of layers.
The ConvNet architectures beneﬁt from large L values, with the proposed graph ConvNet performing slightly better than Sukhbaatar et al.
; Marcheggiani & Titov (2017).
Besides, all ConvNet models are faster than RNN models.
In the third experiment, we evaluate the algorithms for different budgets of parameters B = { 25 K, 50 K, 75 K, 100 K, 150 K } .
For this experiment, we ﬁx the number of layers L = 6 and the number of neurons H is automatically computed given the budget B .
The results are reported in the third row of Figure 3.
For this task, the proposed graph ConvNet best performs for a large budget, while being faster than RNNs.
[Figure]
We also show the inﬂuence of hyper-parameter T for Li et al.
and the proposed graph LSTM.
We ﬁx H = 50 , L = 3 and B = 100 K .
Figure 4 reports the results for T = { 1 , 2 , 3 , 4 , 6 } .
The T value has an undesirable impact on the performance of graph LSTM.
Multi-layer Li et al.
(2016) is not really inﬂuenced by T .
Finally, the computational time naturally increases with larger T values.
4. S EMI - SUPERVISED CLUSTERING
In this section, we consider the semi-supervised clustering problem, see Figure 2(b).
This is also a standard task in network science.
For this work, it consists in ﬁnding 10 communities on a graph given 1 single label for each community.
This problem is more discriminative w.r.t.
to the architectures than the previous single pattern matching problem where there were only 2 clusters to ﬁnd (i.e. 50% random chance).
For clustering, we have 10 clusters (around 10% random chance).
As in the
6 T
A cc u r a c y
GraphLSTMMultilayerLietal     6 T
A cc u r a c y
GraphLSTMMultilayerLietal     6 T
B a t c h t i m e
GraphLSTMMultilayerLietal previous section, we use SBM to generate graphs of communities with variable length. The size for each community is randomly generated between 5 and 25 , and the label is randomly selected in each community. Probability p is 0.5, and q depends on the experiment. For this task, Li et al.
Sukhbaatar et al.
; Marcheggiani & Titov (2017) and the proposed gated ConvNets work well with Adam and learning rate 0 . 00075 .
Graph LSTM uses SGD with learning rate 0 . 0075 .
The value of T for graph LSTM and Li et al.
(2016) is 3 .
The same set of experiments as in the previous task are reported in Figure 5.
ConvNet architectures get clearly better than RNNs when the number of layers increase (middle row), with the proposed
Gated ConvNet outperforming the other architectures.
For a ﬁxed number of layers L = 6 , our graph
ConvNets and Marcheggiani & Titov (2017) best perform for all budgets, while paying a reasonable computational cost.
[Figure]
Next, we report the learning speed of the models.
We ﬁx L = 6 , B = 100 K with H being automatically computed to satisfy the budget.
Figure 6 reports the accuracy w.r.t.
time.
The ConvNet architectures converge faster than RNNs, in particular for the semi-supervised task.
[Figure]
To close this study, we are interested in comparing learning based approaches to non-learning variational ones. To this aim, we solve the variational Dirichlet problem with labeled and unlabelled data as proposed by Grady (2006). We run 100 experiments and report an average accuracy of 45.37% using the same setting as the learning techniques (one label per class). The performance of the best learning model is 82%.
Learning techniques produce better performances with a different paradigm as they use training data with ground truth, while variational techniques do not use such information.
The downside is the need to see 2000 training graphs to get to 82%. However, when the training is done, the test complexity of these learning techniques is O ( E ) , where E is the number of edges in the graph. This is an advantage over the variational Dirichlet model that solves a sparse linear system of equations with complexity O ( E 3 / 2 ) , see Lipton et al.
This work explores the choice of graph neural network architectures for solving learning tasks with graphs of variable length.
We developed analytically controlled experiments for two fundamental graph learning problems, that are subgraph matching and graph clustering.
Numerical experiments showed that graph ConvNets had a monotonous increase of accuracy when the network gets deeper, unlike graph RNNs for which performance decreases for a large number of layers. This led us to consider the most generic formulation of gated graph ConvNets, Eq.
We also explored the beneﬁt of residuality for graphs, Eq. Without residuality, existing graph neural networks are not able to stack more than a few layers. This makes this property essential for graph neural networks, which receive a 10% boost of accuracy when more than 6 layers were stacked.
Future work will focus on solving domain-speciﬁc problems in chemistry, physics, and neuroscience