Improving Graph Convolutional Networks with Non-Parametric Activation Functions
Simone Scardapane Steven Van Vaerenbergh Danilo Comminiello Aurelio Uncini

























Improving Graph Convolutional Networks with Non-Parametric Activation Functions
    Simone Scardapane1,
Steven Van Vaerenbergh2,
Danilo Comminiello1 and
Aurelio Uncini1
1Dept. Information Eng., Electronics and Telecomm., Sapienza University of Rome, Italy. 
2Dept. Communications Eng., University of Cantabria, Spain.
Corresponding author email: simone.scardapane@uniroma1.it
    December 30, 2023
=======================================================================================================================================================================================================================================================================================================






Graph neural networks (GNNs) are a class of neural networks that allow to efficiently perform inference on data that is associated to a graph structure, such as, e.g., citation networks or knowledge graphs. While several variants of GNNs have been proposed, they only consider simple nonlinear activation functions in their layers, such as rectifiers or squashing functions. In this paper, we investigate the use of graph convolutional networks (GCNs) when combined with more complex activation functions, able to adapt from the training data. More specifically, we extend the recently proposed kernel activation function, a non-parametric model which can be implemented easily, can be regularized with standard ℓ_p-norms techniques, and is smooth over its entire domain. Our experimental evaluation shows that the proposed architecture can significantly improve over its baseline, while similar improvements cannot be obtained by simply increasing the depth or size of the original GCN.









§ INTRODUCTION



Efficient processing of graph-structured data (e.g., citation networks) has a range of different applications, going from bioinformatics to text analysis and sensor networks, among others. Of particular importance is the design of learning methods that are able to take into account both numerical characteristics of each node in the graph and their inter-connections <cit.>. While graph machine learning techniques have a long history, recently we witness a renewed interest in models that are defined and operate directly in the graph domain (as compared to a Euclidean space), instead of including the graph information only a posteriori in the optimization process (e.g., through manifold regularization techniques <cit.>), or in a pre-processing phase via graph embeddings <cit.>. Examples of native graph models include graph linear filters <cit.>, their kernel counterparts <cit.>, and graph neural networks (GNNs) <cit.>.

GNNs are particularly interesting because they promise to bring the performance of deep learning models <cit.> to graph-based domains. In particular, convolutional neural networks (CNNs) are nowadays the de-facto standard for processing image data. CNNs exploit the image structure by performing spatial convolutions (with a limited receptive field) on the image, thus increasing parameter sharing and lowering their complexity. A number of authors recently have explored the possibility of extending CNNs to the graph domain by several generalizations of the convolution operator, a trend which has been generically called `geometric deep learning' <cit.>. In one of the first proposals <cit.>, graph Fourier transform was used at every layer of the network to perform filtering operations in a graph-frequency domain. However, this approach was not scalable as it scaled linearly with the size of the graph. Defferard et al. <cit.> extended this approach by using polynomial filters on the frequency components, which can be rewritten directly in the graph domain, avoiding the use of the graph Fourier transform. A further set of modifications was proposed by Kipf and Welling <cit.> (described more in depth in Section <ref>), resulting in a generic graph convolutional network (GCN). GCN has been successfully applied to several real-world scenarios, including semi-supervised learning <cit.>, matrix completion <cit.>, program induction <cit.>, modeling relational data <cit.>, and several others.

Like most neural networks, GCNs interleave linear layers, wherein information is adaptively combined according to the topology of the graph, with nonlinear activation functions that are applied element-wise. The information over the nodes can then be combined to obtain a graph-level prediction, or kept separate to obtain a node-specific inference (e.g., predictions on unlabeled nodes from a small set of labeled ones). Most literature for GCNs has worked with very simple choices for the activation functions, such as the rectified linear unit (ReLU) <cit.>. However, it is well known that the choice of the function can have a large impact on the final performance of the neural network. Particularly, there is a large literature for standard neural networks on the design of flexible schemes for adapting the activation functions themselves from the training data <cit.>. These techniques range from the use of simple parametrizations over known functions (e.g., the parametric ReLU <cit.>), to the use of more sophisticated non-parametric families, including the Maxout network <cit.>, the adaptive piecewise linear unit <cit.>, and the recently proposed kernel activation function (KAF) <cit.>.



  §.§.§ Contribution of the paper


In this paper, we conjecture that choosing properly the activation function (beyond simple ReLUs) can further improve the performance of GCNs, possibly by a significant margin. To this end, we enhance the basic GCN model by extending KAFs for the activation functions of the filters. Each KAF models a one-dimensional activation function in terms of a simple kernel expansion (see the description in Section <ref>). By properly choosing the elements of this expansion beforehand, we can represent each function with a small set of (linear) mixing coefficients, which are adapted together with the weights of the convolutional layers using standard back-propagation. Apart from flexibility, the resulting scheme has a number of advantages, including smoothness in its domain and possibility of implementing the algorithm using highly vectorized GPU operations. We compare on two benchmarks for semi-supervised learning, showing that the proposed GCN with KAFs can significantly outperform all competing baselines with a marginal increase in computational complexity (which is offset by a faster convergence in terms of epochs).



  §.§.§ Structure of the paper


Section <ref> introduces the problem of inference over graphs and the generic GCN model. The proposed extension with KAFs is described in Section <ref>. We evaluate and compare the model in Section <ref> before concluding in Section <ref>.



§ GRAPH CONVOLUTIONAL NETWORKS





 §.§ Problem setup


Consider a generic undirected graph 𝒢 = (𝒱, ℰ), where 𝒱 = {1, …, N} is the set of N vertices, and ℰ⊆𝒱×𝒱 is the set of edges connecting the vertices. The graph is equivalently described by the (weighted) adjacency matrix A∈^N × N, where its generic element a_ij≥ 0 if and only if nodes i and j are connected. A graph signal <cit.> is a function f: 𝒱→^F associating to vertex n a F-dimensional vector x_n (each dimension being denoted as a channel). For a subset ℒ⊂𝒱 of the vertices we have also available a node-specific label y_n, which can be either a real number (graph regression) or a discrete quantity (graph classification). Our task is to find the correct labels for the (unlabeled) nodes that are not contained in ℒ. Note that if the graph is unknown and/or must be inferred from the data, this setup is equivalent to standard semi-supervised (or, more precisely, transductive) learning <cit.>.

Ignoring for a moment the graph information, we could solve the problem by training a standard (feedforward) NN to predict the label y from the input x <cit.>. A NN is composed by stacking L layers, such that the operation of the lth layer can be described by:


    h_l = g ( W_lh_l-1)  ,


where h_l-1∈ℝ^N_l-1 is the input to the layer, W_l ∈ℝ^N_l-1× N_l are trainable weights (ignoring for simplicity any bias term), and g(·) is a element-wise nonlinear function known as activation function (AF). The NN takes as input x = h_0, providing ŷ = h_L ∈^C as the final prediction. A number of techniques can be used to include unlabeled information in the training process of NNs, including ladder networks <cit.>, pseudo-labels <cit.>, manifold regularization <cit.>, and neural graph machines <cit.>. As we stated in the introduction, however, the aim of GNNs is  to include the proximity information contained in A directly inside the processing layers of NNs, in order to further improve the performance of such models. As shown in the experimental section, working directly in the graph domain can obtain vastly superior performances as compared to standard semi-supervised techniques.

Note that if the nodes of the graphs are organized in a regular grid, spatial information can be included by adding standard convolutional operations to (<ref>), as is common in CNNs <cit.>. In order to extend this idea to general unweighted graphs, we need some additional tools from the theory of graph signal processing.



 §.§ Graph Fourier transform and graph neural networks


In order to define a convolutional operation in the graph domain, we can exploit the normalized Laplacian matrix L = I - D^-1/2AD^-1/2, where D is a diagonal matrix with D_nn = ∑_t=1^N A_tt. We denote the eigendecomposition of L as L=UΛU^T, where U is a matrix collecting column-wise the eigenvectors of L, and Λ is a diagonal matrix with associated eigenvalues. We further denote by X∈^N × F the matrix collecting the input signal across all nodes, and by X_i ∈^N its ith column. The graph Fourier transform of X_i can be defined as <cit.>:


    X̂_i = U^TX_i  ,


and, because the eigenvectors form an orthonormal basis, we can also define an inverse Fourier transform as X_i = UX̂_i. We can exploit the graph Fourier transform and define a  convolutional layer operating on graphs as <cit.>:


    H_1 =  g ( ∑_i=1^F U h(Λ; Θ_i) U^T X_i )  ,


where h(Λ; Θ_i) is a (channel-wise) filtering operation acting on the eigenvalues, having adaptable parameters Θ_i. The previous operation can then be iterated to get successive representations H_2, H_3, … up to the final node-specific predictions. The choice of h(·) determines the complexity of training. In particular, <cit.> proposed to make the problem tractable by working with polynomial filters over the eigenvalues:


    h(Λ; Θ_i) = ∑_k=0^K-1Θ_ik T_k(Λ)  ,


where Λ = 2Λ/λ_max - I (with λ_max being the largest eigenvalue of L), and T_k(·) the Chebyshev polynomial of order k defined by the recurrence relation:


    T_k(Λ) = 2ΛT_k-1(Λ) - T_k-2(Λ)  ,


with T_0(Λ) = 1 and T_1(Λ) = Λ. The filtering operation defined by (<ref>) is advantageous because each filter is parameterized with only K values (with K chosen by the user). Additionally, it is easy to show that the filter is localized over the graph, in the sense that the output at a given node depends only on nodes up to maximum K hops from it. Thanks to the choice of a polynomial filter, we can also avoid the expensive multiplications by U and U^T by rewriting the filtering operation directly on the original graph domain <cit.>.

In order to avoid the need for the recurrence relation, <cit.> proposed to further simplify the expression by setting K=1, θ_i0 = - θ_i1 for all channels, and assuming λ_max = 2. Back-substituting in the original expression (<ref>) we obtain:


    H_1 = g ( ( I + D^-1/2AD^-1/2) XΘ_1 )  ,


where Θ_1 ∈^F × N_1 is the matrix of adaptable filter coefficients. Practically, we can further avoid some numerical instabilities (due to the range of the eigenvalues) by substituting I + D^-1/2AD^-1/2 with D^-1/2AD^-1/2, where A = A + I and D_nn = ∑_t=1^N A_tt. The previous expression can then be iterated as in (<ref>) to obtain a graph convolutional network (GCN). As an example, a GCN with two layers is given by:


    Ŷ = g ( A g ( AXΘ_1 ) Θ_2 )  ,


where we defined A = D^-1/2AD^-1/2. The parameters {Θ_l}_l=1^L can be initialized randomly and trained by minimizing a suitable loss over the labeled examples, such as the cross-entropy for classification problems <cit.>. A single layer of the GCN can combine information coming only from the immediate neighbors of a node, while using multiple layers allows information to flow over several hops. In practice, two layers are found to be sufficient for many benchmark problems, and further depth does not provide a benefit <cit.>. Note, however, that the previous expression requires to choose a proper activation function. This is the subject of the next section.



§ PROPOSED GCN WITH KERNEL ACTIVATION FUNCTIONS



Up to this point, we assumed that the activation functions g(·) in (<ref>) were given. Note that the functions for different layers (or even for different filters in the same layer) need not be the same. Particularly, the outer function is generally chosen in a task-dependent fashion (e.g., softmax for classification <cit.>). However, choosing different activation functions for the hidden layers can vastly change the performance of the resulting models and their flexibility.

Most of the research on GNNs and GCNs has focused on simple activation functions, such as the ReLU function:


    g(s) = max(0, s)  ,


where s is a generic element on which the function is applied. It is easy to add a small amount of flexibility by introducing a simple parametrization of the function. For example, the parametric ReLU <cit.> adds an adaptable slope α (independent for every filter) to the negative part of the function:


    g(s) = min(0, -α s ) + max(0, s)  .


As we stated in the introduction, such parametric functions might not provide a significant increase in performance in general, and a lot of literature has been devoted to designing non-parametric activation functions that can adapt to a very large family of shapes. A simple technique would be to project the activation s to a high-dimensional space ϕ(s), and then adapt a different linear function on this feature space for every filter. However, this method becomes easily unfeasible for a large dimensionality of ϕ(·).

The idea of KAFs <cit.> is to avoid the expensive feature computation by working instead with a kernel expansion. A known problem of kernel methods is that the elements that we use for computing the kernel values (what is called the dictionary in the kernel filtering literature <cit.>) can be extremely hard to select. The insight in <cit.> is to exploit the fact that we are working with one-dimensional functions, by fixing the dictionary beforehand by sampling uniformly D elements (with D chosen by the user) around zero, and only adapting the linear coefficients of the kernel expansion (see the equations below). In this way, the parameter D controls the flexibility of our approach: by increasing it, we increase the flexibility of each filter at the cost of a larger number of parameters per-filter.

More formally, we propose to model each activation function inside the GCN as follows:


    g(s) = ∑_i=1^D α_i κ(s, d_i)  ,


where d_i are the elements of the dictionary selected according to before, while the mixing coefficients {α_i}_i=1^D are initialized at every filter and adapted independently together with {Θ_l}_l=1^L. κ(·, ·) in (<ref>) is a generic kernel function, and we use the 1D Gaussian kernel in our experiments:


    κ(s, d_i) = exp{-γ(s - d_i)^2} ,


where γ∈ is a free parameter. Since in our context the effect of γ only depends on the sampling of the dictionary, we select it according to the rule-of-thumb proposed in <cit.>:


    γ = 1/6Δ^2 ,


where Δ is the distance between two elements of the dictionary. 

In order to avoid numerical problems during the initial phase of learning, we initialize the mixing coefficients to mimic as close as possible an exponential linear unit (ELU) following the strategy in <cit.>. Denoting by t a sampling of the ELU at the same positions as the dictionary, we initialize the coefficients as:


    α = (K + εI)^-1t ,


where α is the vector of mixing coefficients, K∈^D × D is the kernel matrix computed between t and the dictionary, and we add a diagonal term with ε > 0 to avoid degenerate solutions with very large mixing coefficients (see Fig. <ref> for an example).



For more details on (<ref>) we refer to the original publication <cit.>. Here, we briefly comment on some advantages of using this non-parametric formulation. First of all, (<ref>) can be implemented easily in most deep learning libraries using vectorized operations (more on this later on in the experimental section). Second, the functions defined by (<ref>) are smooth over their entire domain. Finally, the mixing parameters {α_i}_i=1^D can be handled like all other parameters, particularly by applying standard regularization techniques (e.g., ℓ_2 or ℓ_1 regularization).




§ EXPERIMENTAL RESULTS





 §.§ Experimental setup


We evaluate the proposed model on two semi-supervised learning benchmarks taken from <cit.>, whose characteristics are reported in Table <ref>. Both represents citation networks, where vertices are documents (each one represented by a bag-of-words), edges are links, and each document can belong to a given class. The last column in Table <ref> is the percentage of labeled nodes in the datasets.

The baseline network is a two-layer GCN as in (<ref>), while in our proposed method we simply replace the inner activation functions with KAFs, with a dictionary of D=20 elements sampled uniformly in [-2.0, 2.0]. We optimize a cross-entropy loss given by:


    L = ∑_l ∈ℒ∑_c=1^C Y_lclog(Y_lc)  .


The loss is optimized using the Adam algorithm <cit.> in a batch fashion. The labeled dataset is split following the same procedure as <cit.>, where we use 20 nodes per class for training, 1000 elements for validation, and the remaining elements for testing the accuracy. The validation set is used for evaluating the loss at each epoch, and we stop as soon as the loss is not decreasing with respect to the last 10 epochs. All hyper-parameters are selected in accordance with <cit.> as they were already optimized for the Cora dataset: 16 filters in the hidden layer, an initial learning rate of 0.01, and an additional ℓ_2 regularization on the weights with weighting factor 5e^-4. In addition, we use dropout (i.e., we randomly remove filters from the hidden layer during training) with probability 0.5. The splits for the datasets are taken from <cit.>, and we average over 15 different initializations for the networks. 

For the implementation, we extend the original code for the GCN.[<https://github.com/tkipf/pygcn>] Specifically, multiplication with the adjacency matrix in (<ref>) is done using efficient sparse data structures, allowing to perform it in linear time with respect to the number of edges. All experiments are run in Python using a Tesla K80 as backend.





 §.§ Experimental results




The results (in terms of accuracy computed on the test set) of GCN and the proposed GCN with KAFs (denoted as KAF-GCN) are given in Table <ref>. We also report the performance of six additional baseline semi-supervised algorithms taken from <cit.>, including manifold regularization (ManiReg), semi-supervised embedding (SemiEmb), label propagation (LP), skip-gram based graph embeddings (DeepWalk), iterative classification (ICA), and Planetoid <cit.>. References and a full description of all the baselines can be found in the original papers.

Note how, in both cases, the proposed KAF-GCN is able to outperform all the other baselines in a stable fashion (for KAF-GCN, we also report the standard deviation with respect to the different weights' initialization). In particular, results on the Cora dataset represent (to the best of our knowledge) the state-of-the-art results when using such a small labeled dataset. It is important to underline that the gap in performance between GCN and KAF-GCN cannot be reduced by merely increasing the depth (or size) of the former, since its architecture is already fine-tuned to the specific datasets. In particular, <cit.> reports results showing that neither GCN, nor a variant with residual connections can obtain a higher accuracy when adding more layers. In our opinion, this points to the importance of having adaptable activation functions able to more efficiently process the information coming from the different filters. Due to a lack of space, we are not able to show the shapes of the functions resulting from the optimization process, although they are found to be similar to those obtained by <cit.>, and the interested reader is referred there.



In terms of training time, our implementation of KAF-GCN requires roughly 10% more computation per epoch than the standard GCN for the Cora dataset, and 15% more for the Citeseer one. However, we show in Fig. <ref> the (average) loss evolution on the Cora dataset for the two models. We see that KAF-GCN generally converges faster than GCN, possibly due to the higher flexibility allowed by the network. Due to this, KAF-GCN requires a lower number of epochs to achieve convergence (as measured by the early stopping criterion), requiring on average 25/30 epochs less to converge, which more than compensate for the increased computational time per-epoch.



§ CONCLUSIONS



In this paper we have shown that the performance of graph convolutional networks can be significantly improved with the use of more flexible activation functions for the hidden layers. Specifically, we evaluated the use of kernel activation functions on two semi-supervised benchmark tasks, resulting in faster convergence and higher classification accuracy.

Two limitations of the current work are the use of undirected graph topologies, and the training in a batch regime. While <cit.> handles the former case by rewriting a directed graph as an equivalent (undirected) bipartite graph, this operation is computationally expensive. We plan on investigating recent developments on graph Fourier transforms for directed graphs <cit.> to define a simpler formulation. More in general, we aim to test non-parametric activation functions for other classes of graph neural networks (such as gated graph neural networks), which would allow to process sequences of graphs or multiple graphs at the same time.




§ ACKNOWLEDGMENT


Simone Scardapane was supported in part by Italian MIUR, GAUChO project, under Grant 2015YPXH4W_004.
















IEEEtran




