How Robust Are CNNs and Vision Transformers for Alzheimer's MRI Classification Across Datasets?
Organizations: Department of Computer Science, University of Rhode Island, Kingston, RI 02881, USA · Department of Biomedical and Pharmaceutical Sciences, George & Anne Ryan Institute for Neuroscience, University of Rhode Island, Kingston, RI 02881, USA
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.
Figures & tables
| Paper | Year | Data | Model | Key finding | Relevance |
| He et al. [ 11 ] | 2016 | ImageNet | ResNet | Residual learning enables deep, transferable CNNs. | CNN baseline |
| Han et al. [ 12 ] | 2021 | ImageNet | ReXNet | Efficient CNN design reduces representational bottlenecks. | Efficient CNN |
| Dosovitskiy et al. [ 8 ] | 2021 | ImageNet | ViT | Patch-based transformers achieve strong performance at scale. | ViT basis |
| Liu et al. [ 13 ] | 2021 | ImageNet | Swin | Hierarchical shifted-window attention improves efficiency and representation. | Swin baseline |
| Basaia et al. [ 2 ] | 2019 | ADNI, clinical | 3D CNN | Single structural MRI scans can support AD classification. | CNN AD study |
| Wen et al. [ 1 ] | 2020 | ADNI, AIBL, OASIS | CNN, SVM | Highlights reproducibility issues and limited cross-dataset generalization. | Benchmarking gap |
| Dataset | Total Images | Data Type | Key Property | Evaluation Focus |
| Dataset I | 6,400 | Real MRI images | Severe class imbalance | Impact of severe class imbalance on model performance |
| Dataset II | 11,519 | Real and synthetic MRI images | Balanced train, imbalanced test | Robustness under train-test distribution mismatch |
| Dataset III | 33,984 | Augmented MRI images | Large-scale augmentation with moderate imbalance | Effect of large-scale augmentation on classification performance |
| Dataset I | Dataset II | Dataset III | |||||||
| Class | Train | Val | Test | Train | Val | Test | Train | Val | Test |
| Non / No Impairment | 2,286 | 457 | 457 | 2,042 | 518 | 640 | 6,720 | 1,440 | 1,440 |
| Very Mild | 1,568 | 320 | 320 | 2,041 | 519 | 448 | 6,272 | 1,344 | 1,344 |
| Mild | 672 | 128 | 128 | 2,048 | 512 | 179 | 6,272 | 1,344 | 1,344 |
| Moderate | 46 | 9 | 9 | 2,061 | 499 | 12 | 4,524 | 970 | 970 |
| Split Total | 4,572 | 914 | 914 | 8,192 | 2,048 | 1,279 | 23,788 | 5,098 | 5,098 |
| Model | Architecture Type | Depth | Patch Size | Attention Heads | Parameters |
| ResNet-50 | CNN | 50 | – | – | 25M |
| ReXNet-150 | CNN | 150 | – | – | 16M |
| Swin Transformer | Hierarchical Transformer | 24 | 3 / 6 / 12 / 24 | 88M | |
| ViT-Base | Vision Transformer | 12 | 12 | 86M | |
| ViT-Large | Vision Transformer | 24 | 16 | 307M |
| Dataset I | Dataset II | Dataset III | ||||
| Model | Learning Rate (Backbone / Head) | Weight Decay | Learning Rate | Weight Decay | Learning Rate (Backbone / Head) | Weight Decay |
| ResNet-50 | / | |||||
| ReXNet-150 | / | |||||
| Swin Transformer | / | |||||
| ViT-Base | / | / | ||||
| ViT-Large | / | / | ||||
| Hyperparameter | Value |
| Input Resolution | |
| Mini-Batch Size | 32 |
| Max Epochs | 20 |
| Loss Function | Cross-Entropy (Label Smoothing) |
| Gradient Clipping | 1.0 (Datasets I & III) |
| Setting | Dataset I | Dataset II | Dataset III |
| LR Scheduler | Cosine Annealing | ReduceLROnPlateau | ReduceLROnPlateau |
| Early Stop Monitor | Balanced Accuracy | Macro F1 | Macro F1 |
| Early Stop Patience | 4 | 5 | 5 |
| Label Smoothing | 0.02 | 0.10 | 0.10 |
| Imbalance Strategy | WeightedRandomSampler ( ) | Class-weighted loss | None |
| Gradient Accumulation | 2 steps | None | 4 steps |
| Dataset I | Dataset II | Dataset III | ||||
| Model | Acc (%) | Macro F1 (%) | Acc (%) | Macro F1 (%) | Acc (%) | Macro F1 (%) |
| ViT-Large | 98.47 | 98.85 | 97.81 | 98.30 | 99.84 | 99.86 |
| Swin Transformer | 98.36 | 98.75 | 97.19 | 97.60 | 99.57 | 99.60 |
| ReXNet-150 | 97.81 | 98.38 | 95.70 | 95.80 | 99.41 | 99.46 |
| ResNet-50 | 97.48 | 97.79 | 94.06 | 93.00 | 98.53 | 98.64 |
| ViT-Base | 97.16 | 98.15 | 91.30 | 86.00 | 98.35 | 98.50 |
| Dataset I | Dataset II | Dataset III | ||||||||||
| Model | Non Demented | Very Mild Demented | Mild Demented | Moderate Demented | No Impairment | Very Mild Impairment | Mild Impairment | Moderate Impairment | Non Demented | Very Mild Demented | Mild Demented | Moderate Demented |
| ViT-Large | 0.9881 | 0.9779 | 0.9881 | 1.0000 | 0.9820 | 0.9710 | 0.9800 | 1.0000 | 0.9976 | 0.9978 | 0.9989 | 1.0000 |
| Swin Transformer | 0.9857 | 0.9798 | 0.9846 | 1.0000 | 0.9790 | 0.9660 | 0.9600 | 1.0000 | 0.9934 | 0.9914 | 0.9989 | 1.0000 |
| ReXNet-150 | 0.9827 | 0.9684 | 0.9841 | 1.0000 | 0.9600 | 0.9470 | 0.9690 | 0.9570 | 0.9903 | 0.9899 | 0.9981 | 1.0000 |
| ResNet-50 | 0.9837 | 0.9666 | 0.9612 | 1.0000 | 0.9600 | 0.9200 | 0.9200 | 0.9200 | 0.9799 | 0.9758 | 0.9903 | 0.9995 |
| ViT-Base | 0.9723 | 0.9616 | 0.9922 | 1.0000 | 0.9300 | 0.8900 | 0.9100 | 0.7200 | 0.9730 | 0.9700 | 0.9960 | 1.0000 |
Alzheimer's Disease Classification
Alzheimer’s disease classification uses clinical, behavioral, and brain-imaging data to distinguish disease stages and predict progression.
See all 92 papers