The Augmentation and Computation Toolbox for braIn netwOrk aNalysis (ACTION) is an open-source Python software, designed for functional MRI data augmentation, brain network construction and visualization, extraction of brain network features, and intelligent analysis of brain networks based on AI models pretrained on 3,800+ resting-state fMRI scans. Through a graphics user interface, the ACTION aims to provide users with comprehensive, convenient, and easy-to-use fMRI data analysis services, helping users simplify the processing pipeline and improve work efficiency.
Software Download: https://mingxia.web.unc.edu/action/
- Upsampling
- Downsampling
- Slicing
- Noise Jittering
- Self-Defined Algorithm
- Random Node Dropping
- Hub-Preserving Node Dropping
- Random Edge Perturbation
- Weight-Dependent Edge Removal
- Subgraph Cropping
- Attribute Masking
- Self-Defined Algorithm
- Pearson’s Correlation (PC)
- Mutual Information (MI)
- Partial Correlation
- Spearman’s Correlation (SC)
- High-Order Functional Connectivity (HOFC)
- Sparse Representation (SR)
- Low-rank Representation (LR)
- Self-Defined Algorithm
- Node-level network feature extraction
- Graph-level network feature extraction
- Support Vector Mahince (SVM)
- Support Vector Regression (SVR)
- Random Forest (RF)
- Extreme Gradient Boosting (XGBoost)
- K-Nearest Neighbors (KNN)
- Self-Defined Algorithm
- K-fold Cross Validation
- Random Partition
- Principle Component Analysis (PCA)
- Univariate Feature Selection (UFS)
- T-test
This module focuses on (1) pretraining foundation models that can easily adapt to downstream tasks for fMRI analysis, and (2) implementing popular federated learning methods to facilitate multi-site fMRI studies.
- The feature encoders of ten deep learning models are pretrained on 3,806 unlabeled fMRI scans from public cohorts in a self-supervised learning manner. In each directory, the
Pretrain_*.py
andFinetune_*.py
scripts are the main functions for pretraining and fine-tuning a specific encoder, respectively. - The source code of five federated learning methods are released to the public, where the users can use the pretrained backbone in this toolbox as the encoder for federated learning.
In this project, we pretrain several popular graph convolutional networks on auxiliary fMRI scans. The pretrained models include:
- Graph Convolutional Network (GCN)
- Graph Attention Network (GAT)
- Graph Isomorphism Network (GIN)
- BrainGNN
- BrainNetCNN
- Spatio-Temporal Attention Graph Isomorphism Network (STAGIN)
- Spatio-Temporal Graph Convolutional Network (STGCN)
- Graph SAmple and aggreGatE (GraphSAGE)
- Transformer
- Modularity-constrained Graph Neural Network (MGNN)
To facilitate multi-site fMRI research, this toolbox includes several popular federated learning algorithms:
- Federated Averaging (FedAvg)
- Federated Proximal (FedProx)
- Model-contrastive federated learning (MOON)
- Personalized Federated learning with Moreau envelope (pFedMe)
- Local Global Federated Averaging (LGFedAvg)
- Please fine-tune the pretrained encoders for various fMRI-based analyses.
Note that the
Finetune_*.py
script is just an example of how to finetune our pretrained encoders for classification tasks, and one can modify this code according to different downstream tasks.
-
For 'GCN', 'GIN', 'GAT', 'BrainNetCNN', 'GraphSAGE', 'STAGIN', 'STGCN', 'MGNN', and 'Transformer', please input your to-be-analyzed data in the
Data
class of the correspondingFinetune_*.py
, including fMRI time series with shape of (nsub,nlength,nroi) and label with the shape of (nsub,). -
For 'BrainGNN', please input your to-be-analyzed data in
BrainGNN_data.py
, including fMRI time series with shape of (nsub,nlength,nroi) and label with the shape of (nsub,).
- For model fine-tunning, please ensure that your data includes fMRI time series with a shape of (nsub, nlength, nroi) and labels with a shape of (nsub,), where:
nsub
: the number of subjectsnlength
: the length of fMRI time seriesnroi
: the number of regions-of-interest (ROIs)
-
A default GCN model is used in each federated learning method. Users can also employ other backbone models for federated learning.
-
Acknowledgments to the following public projects: SimSiam, UCGL, GCN, GAT, Transformer, BrainGNN, BrainNetCNN, GraphSAGE, STAGIN, STGCN, MGNN; FedAvg, FedProx, MOON, pFedMe, LGFedAvg.
If you have any problem with our code or have some suggestions, please feel free to contact us:
- Yuqi Fang (yuqi9199@gmail.com)
- Junhao Zhang (zhangjunhao123333@163.com)
- Linmin Wang (w17860361619@163.com)
- Qianqian Wang (qqw@email.unc.edu)
- Mingxia Liu (mingxia_liu@med.unc.edu)
If you use this toolbox in your research, please cite this project:
@misc{action,
author = {Fang, Yuqi and Zhang, Junhao and Wang, Linmin and Wang, Qianqian and Liu, Mingxia},
title = {ACTION-Software-for-Functional-MRI-Analysis},
year = {2024},
publisher = {GitHub},
journal = {GitHub Repository},
howpublished = {\url{https://github.com/mxliu/ACTION-Software-for-Functional-MRI-Analysis}},
}
The University of North Carolina at Chapel Hill (UNC-CH) holds all rights to the ACTION software, which is available at no cost for users in academia. Individuals are permitted to distribute and modify ACTION under the conditions of the GNU General Public License issued by the Free Software Foundation. Commercial or industrial entities interested in utilizing ACTION must reach out to both UNC-CH and the tool's author for permission.