3âMethods
3.1âVariation on graphs
We fix a graph in order to avoid cumbersome notation. The TV of a signal f (on ) at a node v is defined as
This is a signal on the same graph with interesting properties. First, is subadditive and absolutely homogeneous, that is, for any signals f, g, real numbers ι, β, and every node v, we have
It can be used to define a seminorm on the space of signals as
inherits the properties of subadditivity and absolute homogeneity from . Call two functions in equivalent if their difference is a constant. This partitions the signal space into equivalence classes. Thus, a function has norm 0 if and only if it is a constant, which is in the equivalence class of 0. We have proved the following.
Intuitively, captures the oscillation of the signal f in the neighborhood of v. It is easy to see that implies that the signal f is constant on , whereas nodes with high TV show jumps or oscillatory behavior on their respective coboundaries. Thus, the TV offers a simple way to cluster nodes on the graph by demarcating those nodes v that have high TV on . From Eq.â(3.6), we conclude that as long as two signals are affinely dependent they produce the same clusters. Apropos our hypothesis, oscillatory WSS is expected to be localized near bifurcations or bottlenecks and high TV nodes are expected to reproduce this behavior.
3.2âGNN model and training
The data consists of 159 simulations of blood flow that are performed on patient based meshes created by RPTU Kaiserslautern-Landau in Landau and the University of Jena [8], [33], [35]. The database is available online [9]. The data set is labeled to form a binary categorization with 61 points labeled as at risk based on an estimated stenosis degree (cf. [10], [11], [34] for estimation details) of higher than . For cross validation, the data set is split into training and testing subsets. Adjacency and edge weight matrices for each simulation are computed and stored in sparse matrix format.
The model is comprised of a single GraphSAGE layer followed by a TV based clustering layer, several GraphSAGE layers, and then a feedforward layer. The implementation details of the clustering layer are now described. The top n nodes, ranked in terms of the total variation, and their immediate neighbors are extracted to form a subset of the vertices V by a function we call RankTV.
This creates a subgraph upon adjoining the set of edges . If this subgraph is disconnected, we find the shortest path between a pair of clusters and as
where is the shortest path between nodes u and v. If two clusters are closer than a stipulated path length, they are connected, possibly adding nodes along the shortest path if necessary. Finally, the layer updates the nodes and edges to return the subgraph .
The clustering layer produces a compressed localized representation of the entire graph. Compression of the graph is necessary for two reasons: from a computational perspective, this reduces the memory footprint of the algorithm, especially stemming from the computation of gradients on such large graphs. Second, this prioritizes the receptive field of the network on the nodes that are likely to be associated with the generation of stenosis. As a direct consequence of the above, clustering proves to be a remedy for the oversquashing problem that plagues GNNs [2]. Moreover, learning from these clusters would also support our hypothesis that the local structure around areas of high WSS gradient are especially important to the prediction of stroke risk. In Figure 3.1, we show the results of the clustering layer on some simulations.

Figure 3.1 Results of the clustering layer. On top is the raw WSS data for a simulation. After message passing, points with highest total variation are clustered and extracted (bottom).
We now describe the rest of the neural network. The subgraph forms the input to a set of T GraphSAGE convolutions. The output is pooled using the global mean pool operator (which is equivalent to taking the average of the rows of the matrix ) and then transformed into a binary class using a simple feedforward layer. The loss function that is optimized is the BCE between the ground truth label and the label predicted by the GNN.
The pseudocode of the overall model is shown in Algorithm 3.1. Note some of the notation used therein: We denote the matrix of node features at layer k as , which has size , where n is the number of nodes and is the number of features at layer k. Thus, denotes the row u in this matrix or the features of node u.

Algorithm 3.1 GNN model for stroke risk prediction.