Manuscript Offprint

arXiv:2610.33416

How Robust Are CNNs and Vision Transformers for Alzheimer's MRI Classification Across Datasets?

Hafija Aktar, Molly Croes, Frank S. Menniti, Abdeltawab Hendawi

Hafija Aktar 1^{1}, Molly Croes 1^{1}, Frank S. Menniti 2^{2}, and Abdeltawab Hendawi 1^{1}

1^{1}Department of Computer Science

2^{2}Department of Biomedical and Pharmaceutical Sciences, George & Anne Ryan Institute for Neuroscience

University of Rhode Island, Kingston, RI 02881, USA

{hafijaaktar, molly.croes, mennitifs, hendawi}@uri.edu

Abstract—Accurate assessment of Alzheimer's disease stages from MRI is important for understanding disease progression and supporting the development of computer-aided analysis tools. Deep learning models have shown promising results for Alzheimer's disease classification from MRI. However, when evaluated on single datasets, it is difficult to determine whether the observed performance reflects consistent architectural behavior or dataset-specific effects. In this work, we present a multi-dataset benchmarking framework with standardized preprocessing and evaluation. We compare five architectures: ResNet-50, ReXNet-150, Swin Transformer, ViT-Base, and ViT-Large. The models are evaluated across three MRI datasets representing severe class imbalance, train-test distribution mismatch, and large-scale augmentation. The results show broadly consistent performance patterns across datasets, with ViT-Large achieving the best performance on all three datasets and reaching up to 99.84% accuracy and 99.86% macro F1. Performance differences between architectures are most pronounced under distribution mismatch and considerably smaller in the augmented-data setting. Across datasets, lower class-level performance is observed primarily among adjacent early-stage categories, particularly Very Mild and Mild impairment. These findings highlight the importance of evaluating deep learning architectures across multiple data conditions rather than relying on single-dataset performance.

Index Terms—Alzheimer’s disease, MRI classification, deep learning, multi-dataset benchmarking, distribution mismatch, class imbalance, transformer models, convolutional neural networks

I. INTRODUCTION

Alzheimer's disease (AD) is a progressive neurodegenerative disorder that affects millions of people worldwide and places a growing burden on healthcare systems [1], [2]. Structural MRI provides a non-invasive way to detect disease-related changes in the brain [2]. Accurate staging is important for disease assessment. In MRI-based classification tasks, deep learning models have demonstrated great accuracy, frequently above 95% on benchmark datasets [1]. However, these results are often reported on a single dataset. As a result, it remains difficult to determine whether observed performance reflects consistent model behavior or dataset-specific effects. Similar concerns have been observed in external validation studies of artificial intelligence (AI) systems in radiology [3], [4]. It is difficult to tell whether differences in performance between architectures are consistent across diverse data situations.

MRI datasets have different sizes, class distributions and conventional MRI designs. Synthetic balancing and augmentation can change the properties of the data and cause distributional shifts. However, real-world datasets are often imbalanced [5], [6], [7]. Transformer based designs use attention processes for capturing larger dependencies, while convolutional models are based on local spatial inductive biases [8]. Architectural choices may influence the way models respond to changes in distribution, imbalance, and size of data.

The classification task is made more difficult by the characteristics of Alzheimer's disease. The stages of the disease's progression range from Very Mild to Moderate impairment. Even experts may find it challenging to identify the subtle structural changes that characterize early stages [9], [10]. Consequently, classification difficulty is not uniform across classes, and adjacent early-stage categories may be particularly difficult to distinguish.

Systematic comparisons across multiple datasets are still limited, despite the growing interest in deep learning for classifying Alzheimer's MRI. Thus, it is not clear whether the relative ranking of model performance is consistent across datasets or how much they are sensitive to factors such as train-test distribution mismatch, data augmentation, and class imbalance. This gap leads to the following research question:

Are performance patterns of CNNs and vision transformers for Alzheimer's MRI classification consistent across datasets with different distributional properties, and how are these patterns affected by dataset-specific characteristics?

In order to address this question, we present a multi-dataset benchmarking approach that compares transformer-based and convolutional models under standardized preprocessing and evaluation. To facilitate efficient training in each context, the framework incorporates optimization parameters specific to datasets and architectures. We evaluate five benchmark architectures: ViT-Base, ViT-Large, Swin Transformer, ReXNet-150 and ResNet-50. We assess the models across three datasets, large-scale augmentation, synthetic balancing with train-test distribution mismatch and severe class imbalance. This setting enables us to compare the trends in performance across quite different data conditions in a particular evaluation framework.

We use this framework to study how architectural design, model capacity, and dataset characteristics are associated with classification performance. In particular, we examine changes in model ranking, sensitivity to distribution mismatch, and class-level performance across disease stages.

The contributions of this work are:

• We present a multi-dataset benchmarking methodology with standardized preprocessing and evaluation for systematically comparing deep learning architectures under different data conditions, including class imbalance, train-test distribution mismatch, and large-scale augmentation.

• We show that model performance patterns are broadly consistent across the evaluated datasets, with ViT-Large achieving the strongest overall performance on all three datasets and Swin Transformer consistently ranking among the top models.

• We analyze how the magnitude of performance differences changes across dataset conditions and show that architecture-level differences become more pronounced under the distribution-mismatch setting.

• We identify adjacent early-stage categories, particularly Very Mild and Mild impairment, as the classes with lower and more variable class-level performance across the evaluated models and datasets.

The remainder of this paper is organized as follows. Section II reviews prior work on MRI-based Alzheimer's disease classification, transformer models, and dataset shift. Section III describes the three MRI datasets and their class distribution characteristics. Section IV presents the evaluated architectures, fine-tuning strategy, and training configuration. Section V reports the experimental results and cross-dataset analysis. Section VI discusses the limitations of the study, and Section VII concludes the paper.

References (48)

  • Convolutional neural networks for classification of alzheimer’s disease: Overview and reproducible evaluation
  • Automated classification of alzheimer’s disease and mild cognitive impairment using a single mri and deep neural networks
  • Effect of data leakage in brain mri classification using 2d convolutional neural networks
  • External validation of deep learning algorithms for radiologic diagnosis: a systematic review
  • Generative adversarial nets
  • Domain adaptation for medical image analysis: a survey
  • Disease-driven domain generalization for neuroimaging-based assessment of alzheimer’s disease
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale
  • Hypothetical model of dynamic biomarkers of the alzheimer’s pathological cascade
  • The clinical use of structural mri in alzheimer disease
  • Deep residual learning for image recognition
  • Rethinking channel dimensions for efficient model design
  • Swin transformer: Hierarchical vision transformer using shifted windows
  • Cross-cohort generalizability of deep and conventional machine learning for mri-based diagnosis and prediction of alzheimer’s disease
  • M3t: three-dimensional medical image classifier using multi-plane and multi-slice transformer
  • Cnn and swin-transformer based efficient model for alzheimer’s disease diagnosis with smri
  • Effects of mri scanner manufacturers in classification tasks with deep learning models
  • Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: a cross-sectional study
  • Causality matters in medical imaging
  • Longformer: longitudinal transformer for alzheimer’s disease classification with structural mris
  • Joint transformer architecture in brain 3d mri classification: its application in alzheimer’s disease classification
  • On the reliability of deep learning-based classification for alzheimer’s disease: Multi-cohorts, multi-vendors, multi-protocols, and head-to-head validation
  • A systematic review of vision transformers and convolutional neural networks for alzheimer’s disease classification using 3d mri images
  • Training data-efficient image transformers & distillation through attention
  • Machine learning with multi-site imaging data: An empirical study on the impact of scanner effects (opens arXiv in a new tab)
  • Alzheimer mri dataset
  • Best alzheimer mri dataset 99 accuracy
  • Augmented alzheimer mri dataset
  • Inflation of test accuracy due to data leakage in deep learning-based classification of oct images. scientific data, 9 (1), 580
  • Data leakage in deep learning for alzheimer’s disease diagnosis: A scoping review of methodological rigor and performance inflation
  • Deepad: Alzheimer’s disease classification via deep convolutional neural networks using mri and fmri. biorxiv: 070441
  • Identification of alzheimer’s disease using a convolutional neural network model based on t1-weighted magnetic resonance imaging
  • Transunet: Rethinking the u-net architecture design for medical image segmentation through the lens of transformers
  • Unetr: Transformers for 3d medical image segmentation
  • Classification of alzheimer’s disease with and without imagery using gradient boosted machines and resnet-50
  • MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
  • Mobilenetv2: Inverted residuals and linear bottlenecks
  • Self-supervised pre-training of swin transformers for 3d medical image analysis
  • Swin unetr: Swin transformers for semantic segmentation of brain tumors in mri images
  • Scaling vision transformers
  • Convolutional neural networks for medical image analysis: Full training or fine tuning?
  • Transfusion: Understanding transfer learning for medical imaging
  • Rethinking the inception architecture for computer vision
  • Adam: A Method for Stochastic Optimization
  • Decoupled Weight Decay Regularization
  • SGDR: Stochastic Gradient Descent with Warm Restarts
  • Mitigating bias in radiology machine learning: 1. data handling
  • Benchmarking pretrained vision embeddings for near-and duplicate detection in medical images