## Appendix A Deep Learning Background
### Graph Neural Networks  
The following is drawn primarily from [41]. Graph Neural Networks (GNNs) are frameworks specifically designed to handle graph data, with the key objective of learning representations of nodes (or entire graphs) that reflect both the structure of the graph and any feature information associated with nodes.  
GNNs are based on the _neural message passing_ framework, according to which each node aggregates information from its neighbors and updates its own representation iteratively. The process ensures that after \(k\) iterations, a node's representation contains information from its \(k\)-hop neighborhood.  
The message passing process can be formalized as follows:  
\[h_{u}^{(k+1)}=\text{UPDATE}^{(k)}\Big{(}h_{u}^{(k)},\text{AGGREGATE}^{(k)} \Big{(}\{h_{v}^{(k)}\mid v\in N(u)\}\Big{)}\Big{)} \tag{10}\]  
where \(h_{u}^{(k)}\) represents the embedding of node \(u\) at the \(k\)-th iteration, and \(N(u)\) is the neighborhood of node \(u\). The _AGGREGATE_ function aggregates the embeddings of node \(u\)'s neighbors, while the _UPDATE_ function combines the aggregated message with the current embedding of node \(u\) to produce the updated embedding.  
A common approach in GNNs is to define simple _AGGREGATE_ and _UPDATE_ functions, like the sum operator for the embeddings of neighboring nodes, and a non-linear transformation, such as an FFNN for the update.  
In this case, the aggregation and update steps for the \(k\)-th layer of a GNN can be written as  
\[h_{u}^{(k+1)}=g\Bigg{(}W^{(k)}\Bigg{(}\sum_{v\in N(u)}h_{v}^{(k)}\Bigg{)} \Bigg{)} \tag{11}\]  
where \(g\) is a non-linear activation function (e.g., ReLU), and \(W^{(k)}\) is a learnable weight matrix at the \(k\)-th layer.  
A widely used GNN variant is the Graph Convolutional Network (GCN), which extends the concept of convolution from Euclidean spaces (such as images) to graph-structured data. The GCN aggregates information from neighboring nodes using a normalized adjacency matrix to stabilize training and ensure that information from high-degree nodes does not dominate the aggregation process.  
The GCN update rule is given by  
\[h_{u}^{(k+1)}=g\left(\sum_{v\in N(u)\cup\{u\}}\frac{h_{v}^{(k)}}{\sqrt{d_{u}d_{v}} }W^{(k)}\right) \tag{10}\]  
where \(d_{u}\) and \(d_{v}\) are the degrees of nodes \(u\) and \(v\), respectively. The sum is taken over both the neighbors of \(u\) and \(u\) itself (self-loop). The adjacency matrix is normalized symmetrically to prevent the aggregation from being dominated by nodes with high degrees.  
GCNs have proven effective for node classification tasks, particularly in semi-supervised settings, where only a portion of the node labels are available for training.  
To address some of the limitations of GCNs, mainly their inability to generalize to unseen nodes, the Graph SAmple and AGgregate (GraphSAGE) framework was introduced [34]. Instead of aggregating information from all neighbors, GraphSAGE samples a fixed-size set of neighbors for each node during the aggregation process. Additionally, GraphSAGE introduces the idea of concatenating the node's own embedding with the aggregated neighborhood information, which helps preserve node-specific features during the message-passing process.  
The GraphSAGE update rule is defined as  
\[h_{u}^{(k+1)}=g\left(W^{(k)}\left(h_{u}^{(k)}\parallel\sum_{v\in N(u)}h_{v}^{( k)}\right)\right) \tag{11}\]  
where \(\parallel\) denotes vector concatenation. Thanks to this sampling process, GraphSAGE enables inductive learning, allowing to generate embeddings for unseen nodes during inference and enhances scalability by limiting the computational and memory requirements typically associated with GNNs on large graphs. This approach also helps mitigate the issue of _over-smoothing_, where after several iterations, node embeddings can become too similar to one another.