Skip to text

2โ€‚Background

This section provides background on graphs, total variation on graphs, GNNs, and other details of the machine learning setup. An undirected graph G is a tuple of sets (V,E) where for each edge eโˆˆE, there are nodes u,vโˆˆV such that [u,v]:=e is the edge joining u and v. Graphs are represented by their adjacency matrices AโˆˆRโˆฃVโˆฃร—โˆฃVโˆฃ, the entries of which stipulate edge connectivity, and optionally, edge weight matrices EโˆˆRโˆฃVโˆฃร—โˆฃVโˆฃ where eij:Eโ†’R is the Euclidean length of the edge. The neighborhood N(u) of a node u is the set of nodes v such that [u,v]โˆˆE. The degree du of a node u is the number of edges incident on u. For any subset of nodes, VโŠ‚V, the coboundary of V [31], written ฮด(V) is the set of edges that have one end in V and the other not in V. Functions on graph domains map each node in the graph to a real scalar or vector. Scalar functions on graphs will be called signals. The total variation (TV) of real or complex valued functions is a well-studied object in analysis [15]. A related concept of TV is used in signal processing with applications in image processing [29]. The notion of TV used in our work can be derived from the graph difference operator originally defined in Wang etโ€‰al. [43] or similar notions found in Jung etโ€‰al. [24] and Hansen and Bianchi [22], where it is a part of the objective function or regularization.

We say that data is graph-structured if each data point can be represented as a tuple consisting of a set of nodes, a corresponding adjacency matrix, a node feature matrix XโˆˆRโˆฃVโˆฃร—m, which appends an m-vector of features at each node of the graph. Given graph-structured data, S:={G1,โ€ฆ,Gs} and a set of labels C:={c1,โ€ฆ,cl}, the graph classification problem seeks to learn a classifier h:Gkโ†ฆck that maps each graph to its correct label ckโˆˆC. In practice, each graph Gk in S is a tuple consisting of the adjacency matrix Ak, the node features Xk and possibly others such as edge features Wk.

GNNs operate on graph-structured data using message passing operations, which preserve the graph structure of the input. Message passing is comprised of two steps called the message and update, which are denoted here by ฯ• and ฯˆ, respectively. The kth iteration of the message passing operation updates hidden features huk, corresponding to a node uโˆˆV, using messages taken from the graph neighborhood N(u) as follows:

(3.1)huk+1=ฯˆk(huk,ฯ•k({hvk;euvโˆ€vโˆˆN(u)})).

Moreover, the initial features are just the set of node features hu0=xu.

A specific type of message passing sequence called GraphSAGE (introduced in [21]) is used in our model. Here, after the aggregation of features from neighbors of a node u, a set of weight matrices Wt for tโˆˆ{1,โ€ฆ,T} are defined, which are used to propagate information between different layers of the network. In other words, if T GraphSAGE layers are present, then at each layer, the computations performed are:

(3.2)hN(u)k+1=ฯ•k({hvk;euvโˆ€vโˆˆN(u)}),
(3.3)huk+1=ฯƒ(WtCONCAT(huk,hN(u)k+1)).

In Eq.โ€‰(3.2), at each node in the neighborhood of u, an embedding is generated from aggregating the features from all other nodes. In Eq.โ€‰(3.3), these features are concatenated with the features of the corresponding node and combined using the weight matrices. Here, ฯƒ is an activation function and in our case, the ReLU function. The message ฯ• in the GraphSAGE convolution is a simple linear operator. Finally, pooling layers are used to extract a graph level representation hG from node features hv in order to perform graph classification. An example is the global mean pooling layer that returns the average of the feature vectors over all nodes hG=1|V|โˆ‘vโˆˆVhv.

Subsequently, hG is passed to a multilayer perceptron (denoted by MLP) and then transformed into a categorical variable. The latter assigns a probability for the input data point corresponding to each label. The error with respect to the true label can be found with the Binary Cross Entropy (BCE) function when there are just two categories. The BCE loss LBCE for a sample with true label y and corresponding predicted probability p is defined as follows:

(3.4)LBCE(y,p)=โˆ’[ylog(p)+(1โˆ’y)log(1โˆ’p)].

This loss is then averaged over all the samples in the batch or mini-batch.