# Advancing Brain Tumor Segmentation with Spectral-Spatial Graph Neural Networks
## 2 Methods and Material
### Data Preprocessing
#### 2.3.4 Graph Structure Representation  
In our approach for brain MRI tumor segmentation using Graph Neural Networks (GNNs), we construct a graph where each node corresponds to a distinct supervoxel, representing a specific brain region of interest. These supervoxels are segmented from the MRI data using the Voxel Cloud Connectivity Segmentation (VCCS), enhancing computational efficiency. We selectively retain supervoxels in brain regions, discarding those in non-brain areas, and assign to each a feature set derived from a statistical analysis within the supervoxel, including quintiles of voxel intensities. This results in an \(N\times F\) feature matrix, where \(N\) is the number of retained supervoxels, and \(F\) is the number of features per node. To depict the spatial and functional interconnectivity, we generate an adjacency matrix of size \(N\times N\). In our study, we evaluate two methodologies for edge representation within this graph. One utilizes binary edges, indicating the presence or absence of connections between supervoxels, and the other employs weighted edges, where connections are quantified based on Euclidean distances and intensity-based similarities. This exploration of both binary and weighted edge formats allows us to tailor our graph construction to the specific needs of tumor segmentation in MRI images. The dual-option approach for edge representation is integral to our comprehensive and computationally efficient methodology, enhancing the accuracy of tumor segmentation while maintaining mathematical rigor in data representation. Following the main discussion, the mathematical formulation of our methodology is further detailed. The feature matrix is constructed using quintile-based statistics for each supervoxel. For a given supervoxel \(i\) with voxel intensity values \(X_{i}\), the feature vector is computed as \(\text{Features}_{i}=[\text{Q1},\text{Q2},\text{Q3},\text{Q4},\text{Q5}]\), where Q1 to Q5 represent the quintile values of \(X_{i}\). Consequently, the feature matrix for all supervoxels is represented as an \(N\times F\) matrix, where each row corresponds to the feature vector of a supervoxel. For the adjacency matrix construction, the Euclidean distance between the centroids of supervoxels \(i\) and \(j\), denoted as \(C_{i}\) and \(C_{j}\), is calculated as \(d_{ij}=\sqrt{\sum_{k}(C_{ik}-C_{jk})^{2}}\). In the case of a weighted graph, the edge weight between two supervoxels is determined using the formula \(w_{ij}=\exp\left(-\frac{d_{ij}^{2}}{2\sigma^{2}}\right)\), where \(\sigma\) is the standard deviation constant. This results in a weighted adjacency matrix where each element \(A_{ij}\) represents the strength of the connection between supervoxels based on their intensity-based similarities. This mathematical approach allows for a nuanced representation of the graph, essential for the detailed analysis required in tumor segmentation in MRI images. The analysis of the brain MRI data graph for a single patient revealed a graph with 3447 nodes and 31,637 edges, demonstrating a dense and interconnected network. Thisintricate structure is indicative of the complex nature of brain MRI data. The centrality measures, including degree, closeness, betweenness, and eigenvector centrality, have highlighted nodes of significant importance and connectivity within the graph. The average clustering coefficient, at 0.42224, along with a single connected component structure, further validates the graph's robust representation of the brain's intricate architecture. These characteristics underscore the graph's suitability for Graph Neural Network (GNN) analysis, paving the way for effective brain tumor segmentation using advanced GNN techniques. This approach promises to harness the detailed connectivity and structural nuances captured in the graph representation of the MRI data.