- Kevin Mancini 02461016
- Angelos Ragkousis 02476433
- Adam Tlemsani 01911287
- Kyveli Tsioli 01932542
- Mikolaj Deja 02522246
Note: in the following readme we use LaTeX notation for mathematical expressions. It renders correctly in VSCode, but not PyCharm. We thus recommend using VSCode or other editors that support LaTeX rendering. The readme is similar to the pdf report but contains some additional information that didn't fit the 2-page limit.
In the root directory, you can find the following files:
- the
gandirectory, which contains the implementation of the GUS-GAN modelconfig.py, which contains the hyperparameters for the modelinitializations.py, which contains initialisation functions for the model layerslayers.py, which contains the implementation of different layers used in the modelmodel.py, which contains the implementation of the GUS-GAN modelpreprocessing.py, which contains the preprocessing functions for the datatrain.py, which contains the training loop for the model
- the
imagesdirectory, which contains additional images used in the readme - the
submissionsdirectory, which contains the submission csv files (the predictions for the 3-fold cross-validation and the final predictions for the test set) constants.py, which contains the constants used in the projectEvaluator.py, which contains the implementation of the evaluation methodshyperparam.py, which contains the hyperparameter search for the modelmain.py, which contains the main method for the project, which runs the 3-fold cross-validation, the subsequent training on the whole dataset, and generates the submission fileMatrixVectorizer.py, which contains the implementation of the matrix vectorisation utilitiesperformance_measures.png, which contains the plot of the performance measures across the 3 folds of the cross-validationREADME.md, which contains the project reportrequirements.txt, which contains the required libraries for the projectset_seed.py, which contains the method to set the random seedutils.py, which contains the utility methods for the projectutils_tests.py, which contains unit tests for the utility methods
The submission does not contain the data, the SLURM scheduling scripts, the logs, checkpoints, or submission files generated by other models we trained. They can be found in our GitLab repository, should you need them.
Acquiring MRI data in high spatial resolution is a very costly process, and it's often much easier to gather low-resolution data which can be later super-resolved. The use of deep learning for this task proved a viable method in recent years [3]. However, super-resolving brain graphs is a challenging task, due to the complexity of non-Euclidean data as well as the inherent requirement for the super-resolution process to preserve the topological importance of the low-resolution graph while expanding the graph topology with new nodes and edges. To address this task, the AGSR-Net model [3] was introduced, which uses a super-resolution Generator (SRG) based on graph neural networks along with a Discriminator to generate a realistic high-resolution (HR) from a low-resolution (LR) connectome. In this work, we extend the model into an improved version, named GUS-GAN. The new model uses a more expressive generator, better feature initialisation and a refined optimisation loss, achieving competitive MAE and PCC scores.
Our model is trained on the SLIM functional MRI dataset [2], which includes 279 pairs of high-resolution (HR) and
low-resolution (LR) matrices
Given an input LR graph, the problem of brain graph super-resolution aims to learn a function
We finally initialised our node feature matrix
In this work, we created an improved version of the AGSR-Net model [2], which we named GUS-GAN, based on its main components (GSR-Net, U-Net, SSGConv). The model architecture is shown below.
First, we summarise the main components of the AGSR-Net model below:
The SRG generator consists of two sub-modules:
The authors use the Graph U-Net [4] model to first transform the node features of the LR graph to the HR space, by
performing the mapping
The authors introduce a GSR layer that super-resolves both the connectivity matrix from the LR space to the HR space and
the transformed features taken from the Graph U-Net, i.e. it performs the final mapping
Then, two GCN layers are used to refine the new adjacency matrix in a learnable way. This is an interesting method, since we're not keeping the generated adjacency matrix but encode it in the node features, since they can be easily learned with graph convolutions. Finally, we make sure the generated adjacency matrix is symmetric and represents a valid brain graph network.
The incorporation of adversarial training ensures that the predicted HR graphs preserve the distribution of the original connectivity weights of the dataset. It uses a 2-layer MLP network, which outputs the probability that the generated HR graph by the SRG network is real.
Based on the baseline AGSR-Net model described above, we introduce a number of improvements summarised below.
Optimised Graph-UNet with a larger hidden dimension and a refined loss function
We changed the Graph-UNet implementation to the one provided by PyTorch Geometric [7], which streamlines the integration of skip connections by making use of optimised graph operations. We also increased the network's capacity by setting the hidden dimension to 512.
This change also led us to refine our loss function. In the AGSR-Net framework, the loss function consists of the
following components: MSE, regularisation of GSR layer with eigen-decomposition of HR adjacency matrix, U-Net
reconstruction and GAN losses. In our implementation, we removed the eigen-decomposition and U-Net reconstruction
losses. The original GSR Layer required padding the HR graphs, because in the proposed formulation it created graphs of
size 320x320 instead of 268x268. This is wasteful and can be removed by reshaping the weights parameter to have size
After the GSR Layer, the AGSR-Net model uses two GCN layers to refine the adjacency matrix of the super-resolved graph. In our initial experiments, we added a third GCN layer in order to make the network deeper and more expressive. We wanted to determine whether aggregating from a 3-hop neighbourhood could improve the performance compared to the 2-hop neighbourhood aggregation of the 2-layer GCN model. However, the performance degraded, and we encountered the problem of oversmoothing [6], which occurs when the representations of the nodes in GCNs tend to converge to non-distinctive embeddings as the number of layers increases.
To address this issue, we replaced the two layers with a more expressive version of GCN, named "Simple Spectral Graph
Convolution", or simply SSG Convolution [8]. The intuition is to widen the receptive field of the aggregation
function while keeping the depth of the network constant. This is achieved by aggregating
As shown in the equation above, all
We also experimented with different normalisation methods for the LR adjacency matrix preprocessing. Clustering normalisation, which focuses on the local grouping of nodes, performed the worst and did not seem to capture the broader context of node relationships in the LR graph, which can be crucial when extending the LR to the new HR graph. Similar performance was observed using Betweenness Centrality, which, on the contrary, could be considered a global normalisation method, as it emphasizes nodes that serve as bridges within the network. Degree normalisation yielded the best performance, by finding a better balance between local and global node properties, and good computational efficiency.
Considering all nodes in the graph, the model can be shown to be Permutation Equivariant. This flows from the nature of
operations used: GCNs, downsampling, upsampling, and GSR Layer. It is not permutation invariant as a whole, as a
permutation on the initial node embeddings would propagate through all the layers and would affect the final
super-resolved graph. This can be seen for a GCN by permuting the feature and adjacency matrices to
The same argument applies to the other operations used. Since all operations on the way are permutation equivariant, their chain is as well.
- PyTorch
- PyTorch Geometric
To install the required libraries, run the following command:
virtualenv venv
source venv/bin/activate
pip install -r requirements.txtTo run the code, one should execute the main.py file. There is also a hyperparameter search file, hyperparam.py,
that can be used to find the best hyperparameters for the model. It uses wandb to log the results of the
hyperparameter. Note that the wandb api key should be set at the top of the file.
We do not recommend running the hyperparameter search or the training locally, as it is very time-consuming. Instead, we used the GPU cluster provided by the university.
Note: it seems like the training process is not fully deterministic, so the results may vary slightly between runs. Even though we set the random seed at the beginning of the training process, the logs show small differences in the results and the final predictions. This might be due to certain operations on the GPU that cannot guarantee determinism. We cannot verify if the results are reproducible on CPU because GraphUNet is not supported on CPU. We apologise for the inconvenience.
We evaluated robustness and generalisation of our model using 3-fold Cross Validation. Employing a range of performance metrics including Mean Absolute Error (MAE), Pearson Correlation Coefficient (PCC), Jensen-Shannon Distance (JSD), as well as the MAE of various centrality measures such as Betweenness, Eigenvector, PageRank, Closeness, and Degree centrality, we managed to assess the topological accuracy of our super-resolved graphs. The model shows consistent performance over all metrics across all folds, which can be seen in the image below.
In more detail, consistent JSD values across folds imply that the probability distributions of the predicted and ground truth graphs remain similar, showcasing the model's ability to preserve the underlying distributional characteristics of the brain graphs. The centrality measures show very slight variations across the folds, but values largely remain consistent, proving that our model adequately preserves key topological features ensuring that the structural and functional significance of nodes in the super-resolved graphs " mirrors" that of the ground truth. With an average MAE of 0.14186, our findings show high fidelity in the generated high-resolution graphs relative to the ground truth.
We added some metrics, namely the MAE of the degree centrality and the clustering coefficient, to add to the analysis of the topological accuracy of the super-resolved graphs. The results are consistent with the other metrics, showing that our model is able to preserve the topological features of the ground truth graphs. We also experimented with the use of Frechet Inception Distance (FID) as a metric, but we ran into computational issues and were unable to obtain meaningful results. We kept running out of memory both on the GPU and the CPU, and we were unable to find a solution to this problem.
The total training time for the 3-fold cross-validation was approximately 110 minutes, with a RAM usage of approximately 1.62 GB, which indicates a moderate computational demand.
We then retrained the model on the whole dataset, using the same methods as for CV, namely the same hyperparameters and early stopping procedure. After uploading our predictions on the test set to Kaggle, our score on the public test set was 0.1317, and we ranked 16th across 32 groups.
- L. Zhan et al., “The significance of negative correlations in brain connectivity,” Journal of Comparative Neurology, vol. 525, no. 15, pp. 3251–3265, Jul. 2017, doi: https://doi.org/10.1002/cne.24274.
- W. Liu, D. Wei, Q. Chen, W. Yang, J. Meng, G. Wu, T. Bi, Q. Zhang, X.-N. Zuo, and J. Qiu. Longitudinal test-retest neuroimaging data from healthy young adults in southwest china. Scientific data, 4(1):1–9, 2017
- M. Isallari and I. Rekik, “Brain Graph Super-Resolution Using Adversarial Graph Neural Network with Application to Functional Brain Connectivity,” arXiv.org, May 02, 2021. https://arxiv.org/abs/2105.00425
- Gao, H., Ji, S., 2019. Graph u-nets, in: Chaudhuri, K., Salakhutdinov, R. (Eds.), Proceedings of the 36th International Conference on Machine Learning, PMLR, Long Beach, California, USA. pp. 2083–2092
- Tanaka, Y., 2018. Spectral domain sampling of graph signals. IEEE Trans- actions on Signal Processing 66, 3752–3767.
- Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In Proceedings of the Thirty-Second AAAI Conference on Artificial In- telligence (AAAI-18), pp. 3538–3545. Association for the Advancement of Artificial Intelligence, 2018a.
- Fey, M. and Lenssen, J.E. (2019) Fast graph representation learning with pytorch geometric, arXiv.org. Available at: https://arxiv.org/abs/1903.02428
- H. Zhu and P. Koniusz, "Simple Spectral Graph Convolution," in International Conference on Learning Representations, 2021. https://openreview.net/pdf?id=CYO5T-YjWZV


