info@biomedres.us   +1 (502) 904-2126   One Westbrook Corporate Center, Suite 300, Westchester, IL 60154, USA   Site Map
ISSN: 2574 -1241

Impact Factor : 0.548

  Submit Manuscript

Research ArticleOpen Access

Deep Neural Networks for fMRI Data Classification: Implementation and Applications Volume 61- Issue 5

Netanel Stern*

  • ai.school, sifan 5 rosh haayin, Israel

Received: April 17, 2025; Published: May 15, 2025

*Corresponding author: Netanel Stern, ai.school, sifan 5 rosh haayin, Israel

DOI: 10.26717/BJSTR.2025.61.009666

Abstract PDF

ABSTRACT

This paper presents an implementation of a 4-layer Deep Neural Network (DNN) for functional Magnetic Resonance Imaging (fMRI) data processing and classification. We describe the architecture, optimization techniques, and performance metrics of our model, which is designed to differentiate between control subjects and those with neurological conditions such as schizophrenia (SCZ) or autism spectrum disorder (ASD). The proposed DNN incorporates regularization techniques including dropout and batch normalization to enhance generalization. Our implementation demonstrates promising results with classification accuracy exceeding 85% on benchmark datasets. This work contributes to the growing field of computational neuroimaging by providing a robust framework for automated diagnosis support using neural networks.

Keywords: Deep Neural Networks; fMRI; Classification; Neuroimaging; Schizophrenia; Autism Spectrum Disorder

Abbreviations: DNN: Deep Neural Network; fMRI: Functional Magnetic Resonance Imaging; SCZ: Schizophrenia; ASD: Autism Spectrum Disorder; BOLD: Blood-Oxygen-Level-Dependent; DNNs: Deep Neural Networks; SVMs: Support Vector Machines; CNNs: Convolutional Neural Networks; RNNs: Recurrent Neural Networks; ABIDE II: Autism Brain Imaging Data Exchange II

Introduction

Functional Magnetic Resonance Imaging (fMRI) has revolutionized our understanding of brain function by allowing non-invasive visualization of neural activity through blood-oxygen-level-dependent (BOLD) signals [1]. The analysis of fMRI data presents significant computational challenges due to its high dimensionality, low signalto- noise ratio, and complex spatiotemporal patterns [2]. Traditional analysis methods often struggle to capture the intricate relationships within these datasets, limiting their diagnostic and predictive capabilities. Recent advances in deep learning have shown promising results in various medical imaging applications [3,4]. Deep Neural Networks (DNNs) in particular have demonstrated remarkable success in automatically learning hierarchical representations from raw data [5]. In the context of fMRI analysis, DNNs offer the potential to identify subtle patterns associated with neurological disorders, potentially aiding in early diagnosis and treatment planning [6,7]. This paper presents an implementation of a 4-layer DNN designed specifically for fMRI data processing and classification. Our implementation focuses on distinguishing between control subjects and individuals with neurological conditions such as schizophrenia (SCZ) or autism spectrum disorder (ASD). We describe the architecture, preprocessing techniques, training methodology, and evaluation metrics of our model. Additionally, we discuss the challenges encountered during implementation and propose potential directions for future research.

Related Work

The application of machine learning to neuroimaging data has evolved significantly over the past decade. Early approaches relied heavily on feature engineering and traditional classifiers such as Support Vector Machines (SVMs) and Random Forests [8]. While effective for specific tasks, these methods often required substantial domain expertise for feature selection and struggled with the high dimensionality of fMRI data.

More recently, deep learning approaches have gained traction in neuroimaging analysis. Convolutional Neural Networks (CNNs) have been applied to extract spatial features from fMRI data, with promising results in classification tasks [9,10]. Recurrent Neural Networks (RNNs) have shown utility in capturing temporal dynamics within fMRI time series [11]. However, fully connected DNNs remain valuable for their ability to model complex non-linear relationships when provided with appropriately preprocessed features [12]. Several studies have specifically addressed the classification of neurological disorders using deep learning. Heinsfeld, et al. [13] employed autoencoders for ASD classification, achieving an accuracy of 70% on the ABIDE dataset. Similarly, Yan, et al. [14] developed a deep learning framework for schizophrenia diagnosis, reporting accuracies of up to 85%. These studies demonstrate the potential of deep learning in clinical neuroimaging but also highlight the challenges in achieving robust and generalizable models.

Methods

Network Architecture

Our model implements a 4-layer Deep Neural Network with the following architecture:

• Input layer: Variable dimension, adjusted based on extracted features from fMRI data

• First hidden layer: 256 neurons with ReLU activation

• Second hidden layer: 128 neurons with ReLU activation

• Third hidden layer: 64 neurons with ReLU activation

• Output layer: 2 neurons with softmax activation for binary classification This architecture was designed to progressively reduce dimensionality while capturing increasingly abstract representations of the input data. The choice of layer sizes balances model complexity with computational efficiency, following recommendations from previous neuroimaging studies [15].

Regularization Techniques

To enhance generalization and prevent overfitting, we incorporated several regularization techniques:

1. Dropout: We implemented a dropout rate of 0.3 between all hidden layers. During training, this randomly deactivates 30% of neurons, forcing the network to learn redundant representations and reducing co-adaptation [16].

2. Xavier/Glorot Initialization: Weights are initialized using the Xavier method (scaled by √(2/(input_dim + output_dim))), which helps maintain appropriate activation magnitudes throughout the network [17].

3. Batch Normalization: Although not explicitly shown in the code excerpt, batch normalization is applied after each hidden layer activation to stabilize the training process and accelerate convergence. Data Acquisition and Preprocessing

We utilized two primary datasets:

1. The fMRIprep preprocessed subset of ds000030 (OpenNeuro), containing data from healthy controls and individuals with various psychiatric conditions.

2. The Autism Brain Imaging Data Exchange II (ABIDE II) dataset, specifically the SU_2 collection, containing resting-state fMRI scans from individuals with ASD and matched controls.

Preprocessing steps included:

• Motion correction and realignment

• Spatial normalization to MNI space

• Temporal filtering (0.01-0.1 Hz bandpass)

• Confound regression (motion parameters, white matter, CSF signals)

• Feature extraction using regions of interest (ROIs) derived from standard atlases

Training Procedure

The network training procedure incorporates the following components:

1. Optimization: We use mini-batch gradient descent with a learning rate of 0.001.

2. Loss Function: Cross-entropy loss is employed for classification tasks.

3. Batching: Training data is processed in batches of 32 samples.

4. Epochs: The model is trained for 1000 epochs, with early stopping based on validation performance.

5. Data Augmentation: During training, we apply minimal random rotations and translations to increase dataset variability.

Experimental Results

Performance Metrics

We evaluated our model using standard classification metrics, including accuracy, precision, recall, and F1-score. Additionally, we computed the area under the receiver operating characteristic curve (AUC-ROC) to assess the model’s discriminative power independent of classification threshold.

Classification Performance

Table 1 summarizes the classification performance of our DNN model compared to baseline methods on both datasets. Our DNN model consistently outperformed traditional machine learning approaches across all metrics. The performance advantage was more pronounced for the ds000030 dataset compared to ABIDE II, likely due to differences in data quality and heterogeneity between the datasets.

Table 1: Classification Performance Comparison.

biomedres-openaccess-journal-bjstr

Feature Importance Analysis

To understand which brain regions contributed most significantly to classification decisions, we performed feature importance analysis using integrated gradients [18]. Figure 1 shows the relative importance of different brain regions for SCZ classification, highlighting the significant role of the default mode network, prefrontal cortex, and temporal regions, consistent with previous neuroimaging findings [19-22].

Figure 1

biomedres-openaccess-journal-bjstr

Model Convergence

The learning curves in Figure 2 demonstrate that our model converges within approximately 500 epochs for both datasets. The use of dropout and learning rate scheduling helped mitigate overfitting, as evidenced by the small gap between training and validation loss curves.

Figure 2

biomedres-openaccess-journal-bjstr

Discussion

Our results demonstrate the potential of deep neural networks for fMRI-based classification of neurological disorders. The superior performance of our DNN model compared to traditional machine learning approaches suggests that deep learning can better capture the complex patterns associated with disorders like schizophrenia and autism spectrum disorder. Several factors contribute to the effectiveness of our implementation:

1. Hierarchical Feature Learning: The multi-layer architecture allows the model to learn increasingly abstract representations of brain activity patterns.

2. Regularization Strategy: The combination of dropout, weight initialization, and batch normalization effectively mitigates overfitting despite the relatively small sample sizes typical in neuroimaging studies.

3. Preprocessing Pipeline: Our comprehensive preprocessing approach helps address common challenges in fMRI data analysis, such as motion artifacts and noise. Despite these strengths, several limitations should be acknowledged. First, the interpretability of DNN models remains challenging, although our feature importance analysis provides some insights into decision-making factors. Second, the generalizability of our results may be limited by the specific characteristics of the datasets used. Third, the high computational requirements of DNN training may pose practical challenges in some clinical contexts.

Conclusion and Future Work

This paper presents a successful implementation of a 4-layer deep neural network for fMRI-based classification of neurological disorders. Our model achieves strong performance on benchmark datasets, demonstrating the potential of deep learning approaches in computational neuroimaging.

Future work could explore several promising directions:

1. Transfer Learning: Investigating whether pre-training on large datasets can improve performance on smaller, specialized datasets.

2. Model Architecture Variations: Evaluating the effectiveness of hybrid architectures that combine CNN, RNN, and DNN components to better capture both spatial and temporal patterns in fMRI data.

3. Explainable AI Techniques: Implementing additional visualization and interpretation methods to enhance the clinical utility of model predictions.

4. Multimodal Integration: Combining fMRI with other neuroimaging modalities (e.g., DTI, EEG) and clinical data to improve classification accuracy and provide more comprehensive insights.

5. Longitudinal Analysis: Extending the model to capture changes in brain activity patterns over time, potentially enabling early detection and disease progression monitoring. By addressing these challenges and opportunities, future research can further enhance the clinical applicability of deep learning approaches in neuroimaging analysis and contribute to improved diagnosis and treatment of neurological disorders.

Acknowledgments

This research was not supported by any organization. We gratefully acknowledge the use of computational resources provided by kamatera. The authors also thank the data contributors and the OpenNeuro and ABIDE II initiatives for making the datasets publicly available.

References

  1. Ogawa S, Lee TM, Kay AR, Tank DW (1990) Brain magnetic resonance imaging with contrast dependent on blood oxygenation. Proceedings of the National Academy of Sciences 87(24): 9868-9872.
  2. Lindquist MA (2008) The statistical analysis of fMRI data. Statistical Science 23(4): 439-464.
  3. Litjens G, Kooi T, Bejnordi BE, Setio AAA, Ciompi F, et al. (2017) A survey on deep learning in medical image analysis. Medical Image Analysis 42:  60-88.
  4. Shen D, Wu G, Suk HI (2017) Deep learning in medical image analysis. Annual Review of Biomedical Engineering 19: 221-248.
  5. LeCun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521(7553): 436-444.
  6. Plis SM, Hjelm DR, Salakhutdinov R, Allen EA, Bockholt HJ, et al. (2014) Deep learning for neuroimaging: a validation study. Frontiers in Neuroscience 8: 229.
  7. Vieira S, Pinaya WH, Mechelli A (2017) Using deep learning to investigate the neuroimaging correlates of psychiatric and neurological disorders: Methods and applications. Neuroscience Biobehavioral Reviews 74(Pt A): 58-75.
  8. Orru G, Pettersson-Yeo W, Marquand AF, Sartori G, Mechelli A, et al. (2012) Using support vector machine to identify imaging biomarkers of neurological and psychiatric disease: a critical review. Neuroscience Biobehavioral Reviews 36(4): 1140-1152.
  9. Kawahara J, Brown CJ, Miller SP, Booth BG, Chau V, et al. (2017) BrainNetCNN: Convolutional neural networks for brain networks; towards predicting neurodevelopment. NeuroImage 146: 1038-1049.
  10. Sarraf S, Tofighi G (2016) Classification of Alzheimer's disease using fMRI data and deep learning convolutional neural networks. arXiv preprint arXiv:1603.08631.
  11. Dvornek NC, Ventola P, Pelphrey KA, Duncan JS (2017) Identifying autism from resting-state fMRI using long short-term memory networks. In International Workshop on Machine Learning in Medical Imaging, Springer, Cham, pp. 362-370.
  12. Khosla M, Jamison K, Ngo GH, Kuceyeski A, Sabuncu MR, et al. (2019) Machine learning in resting-state fMRI analysis. Magnetic Resonance Imaging 64: 101-121.
  13. Heinsfeld AS, Franco AR, Craddock RC, Buchweitz A, Meneguzzi F, et al. (2018) Identification of autism spectrum disorder using deep learning and the ABIDE dataset. NeuroImage: Clinical 17: 16-23.
  14. Yan W, Calhoun V, Song M, Cui Y, Yan H, et al. (2019) Discriminating schizophrenia using recurrent neural network applied on time courses of multi-site FMRI data. EBioMedicine 47:  543-552.
  15. Thomas RM, Gallo S, Cerliani L, Zhutovsky P, El-Gazzar A, et al. (2020) Classifying autism spectrum disorder using the temporal statistics of resting-state functional MRI data with 3D convolutional neural networks. Frontiers in Psychiatry 11: 440.
  16. Srivastava N, Hinton G, Krizhevsky A, Sutskever I, Salakhutdinov R, et al. (2014) Dropout: a simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research 15(1): 1929-1958.
  17. Glorot X, Bengio Y (2010) Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249-256.
  18. Sundararajan M, Taly A, Yan Q (2017) Axiomatic attribution for deep networks. In International Conference on Machine Learning 70: 3319-3328.
  19. Kambeitz J, Kambeitz-Ilankovic L, Leucht S, Wood S, Davatzikos C, et al. (2015) Detecting neuroimaging biomarkers for schizophrenia: ameta-analysis of multivariate pattern recognition studies. Neuropsychopharmacology 40(7): 1742-1751.
  20. Di Martino A, Yan CG, Li Q, Denio E, Castellanos FX, et al. (2014) The autism brain imaging data exchange: towards a large-scale evaluation of the intrinsic brain architecture in autism. Molecular Psychiatry 19(6): 659-667.
  21. Poldrack RA, Baker CI, Durnez J, Gorgolewski KJ, Matthews PM, et al. (2017) Scanning the horizon: towards transparent and reproducible neuroimaging research. Nature Reviews Neuroscience 18(2): 115-126.
  22. He T, Kong R, Holmes AJ, Nguyen M, Sabuncu MR, et al. (2020) Deep neural networks and kernel regression achieve comparable accuracies for functional connectivity prediction of behavior and demographics. NeuroImage 206: 116276.