# TopoSinGAN: Learning a Topology-Aware Generative Model from a Single Image
## 2 Materials and Methods
### Evaluation
#### 2.2.1 Node Topology Clustering (NTC)
The Terminal Distance \(TD(v)\) for a node vs. \(\in G\) is computed as:_  
\[TD(v)=\min_{t\in T}d(v,t) \tag{11}\]  
_where \(T\) is the set of all terminal nodes and \(d(v,t)\) is the geodesic distance between nodes vs. and \(t\)._  
Using the TD values and the graph's adjacency matrix, a local Moran's I clustering analysis, also known as Local Indicators of Spatial Association (LISA) [43], is conducted to identify patterns and clusters based on topological relationships among nodes. This analysis categorizes nodes into High-High (HH), Low-High (LH), Low-Low (LL), and High-Low  
Figure 4: Illustration of defined terminal distance (TD) in a simple graph. (HL) clusters, reflecting nodes with similar or contrasting TD values and their neighbors with a significance level of 95%. Due to the nature of the TD metric, the input graphs must have at least one terminal node. To ensure this, we randomly connected a single terminal node to each graph. In Appendix A, we demonstrate that the addition and position of this terminal node do not significantly affect the functionality of the proposed evaluation metric (Table A1). Since the predicted masks may have different node counts, we normalize cluster sizes into percentages. Finally, the NTC index is measured by calculating the multidimensional Euclidean distance between the four LISA cluster values of the predicted mask and the ground truth (GT) mask. This Euclidean distance reflects differences in the LISA attributes in multidimensional space, not spatial features. To evaluate the significance of our proposed NTC topological features, we created graphs in seven groups of extreme cases based on the topological distribution of terminal nodes in a two-dimensional grid of 15 by 15 nodes. These cases include random, dispersed, clustered, clustered-star, clustered-web, isolated edges, and randomly split-edge distributions, detailed in Appendix B, Figure A1. We generated 1000 instances of each group. We used Support Vector Machines (SVM) [44] with 10-fold cross-validation to ensure consistency with previous studies that developed feature extraction methods for graph structural clustering [45; 46]. We employed a suite of five network metrics including network density, average clustering coefficient, transitivity, modularity, and assortativity, as proposed by [45]. Network density measures the ratio of actual connections to possible connections, indicating how interconnected the network is [47]. The average clustering coefficient indicates the degree to which nodes cluster together, offering insights into tightly connected groups [48]. Transitivity assesses the probability that adjacent nodes are interconnected, indicating global clustering [49]. Modularity measures the strength of division into communities, and assortativity evaluates the tendency of nodes to connect with others of similar degrees, highlighting hierarchical structures [50]. Additionally, we calculated interval probabilities, known as Degree Distribution Quantile Concentration (DDQC) features, to provide a detailed view of the degree distribution within the network [45]. DDQC, by segmenting node degrees into specific intervals based on statistical properties such as the mean and standard deviation, generates a histogram quantifying the proportion of nodes in each interval. These interval probabilities normalize the histogram values and offer a probabilistic perspective of how node degrees are distributed across the network. Later in this paper, we use these graph features to measure the similarity of graphs generated by GAN models.