# Patient-Tailored Dementia Diagnosis with CNN-Based Brain MRI Classification
## 4 Discussion  
This investigation aimed to assess the potential of CNN-based models in developing an optimal CDSS, specifically facilitating the early detection of dementia-related brain atrophy patterns in structural MRI scans. Overall, the TL-based models outperformed the independently developed ones, although the difference was not major. This superior performance may be attributed to the TL-based models' more complex and deeper structures, except the VGG16-based one, which was relatively shallow. Using TL for model construction generally ensures that the weights are already optimized for multidimensional image classification, which makes the training easier and more efficient. These models achieved near-perfect results, with AUC scores of 0.96-1 and average ACC values exceeding 94%, underscoring their high discriminative power, generalizability, and the ability to extract subtle patterns in neuroimaging data relevant to dementia diagnosis. The independently developed models also delivered satisfactory performance, particularly those with more convolutional layers and filters, confirming that deeper architectures are more effective at learning from high-dimensional MRI imaging data. The best-performing custom CNN-based model (Custom CNN 1024) reached an average ACC of 95.56% and an AUC of 0.97 and maintained a strong precision-recall balance across all classes, suggesting that well-designed, task-specific CNNs can rival more complex TL-based architectures when trained appropriately. The Grad-CAM analysis of the predictions generated by the CNN-based models revealed that the highlighted brain regions were predominantly located around the ventricles and in the medial parts of the temporal and parietal lobes. The more complex the model's structure was, the more focused and accurate these heatmaps became. The highlighted regions corresponded to characteristic atrophy patterns observed in dementia, particularly AD, including ventricular enlargement, cortical  
Figure 6: Example of the external testing outcome generated by one of the CNN-based models. The brain regions that contributed to the prediction are highlighted on a Grad-CAM heatmap. The confidence of the prediction is displayed above the visual output. thinning, and medial temporal lobe (hippocamp) atrophy. These findings align closely with well-established neuroimaging biomarkers described in the medical literature. While the highlighted areas were not always perfectly localized, the overall pattern was consistent with known pathological changes, reinforcing the model's potential for aiding in dementia diagnosis. The Grad-CAM findings could provide valuable guidance for further examination and clinical management, suggesting specific brain regions that clinicians should investigate in greater detail. Since different stages of dementia exhibit distinct patterns of neurodegeneration with varying severity, the localization of the Grad-CAM-highlighted regions and the intensity of pathological changes could provide crucial insights for diagnosis, disease management, and treatment planning. This approach supports patient-tailored dementia care by refining the assessment of dementia progression. To situate Grad-CAM within the broader context of interpretability techniques for CNN-based models, it is helpful to consider complementary methods such as LIME (local interpretable model-agnostic explanations) [44], SHAP (Shapley additive explanations) [45], and its extension, Shap-CAM [46]. These methods offer alternative perspectives on model decision-making by providing spatially resolved visual explanations, which are especially valuable for a more in-depth understanding of how the predictions are made. LIME explains individual predictions by constructing local surrogate models based on input perturbations. For image data, it segments an image into interpretable regions (\"superpixels\") and systematically masks them to assess their influence on the model's output. This makes LIME applicable to CNNs without requiring access to the internal layers.