## 2 Materials and Methods
### Standardized Validation Framework for Clinical Credibility
#### 2.4.1 Specify Learning Methodology  
The learning methodology is explicitly defined from preprocessing through model architecture. Let an input image be represented by  
\[X\in\mathbb{R}^{H\times W\times C}, \tag{1}\]  
with \(H=224\), \(W=224\), and \(C=3\) channels. The preprocessing function \(f:\mathbb{R}^{H\times W\times C}\rightarrow\mathbb{R}^{H\times W\times C}\) is defined as  
\[X^{\prime}=f(X)=\frac{X-\mu}{\sigma}, \tag{2}\]  
where \(\mu\) and \(\sigma\) are the channel-wise mean and standard deviation computed on the ImageNet dataset. This normalization ensures consistency when using the pre-trained VGG16 preprocessing function.  
The VGG16 was selected for this study due to its well-established performance and interpretability in medical image analysis, as well as its availability as a robust, pre-trained backbone in most deep learning frameworks. While newer architectures such as ResNet and transformer-based models (e.g., Vision Transformers) often achieve higher performance on large-scale natural image benchmarks, VGG16 remains a strong baseline in medical imaging tasks, particularly when dataset size is limited and model transparency is a priority. Comparative studies in other biomedical domains have similarly shown that the choice of ML algorithm and architecture can substantially affect detection performance, highlighting the need for careful benchmarking and selection based on the specific clinical context [40].  
Our primary goal was to establish a standardized validation framework and demonstrate the risks of deceptively high accuracy in a reproducible and interpretable setting, for which VGG16 is well suited. We applied ImageNet normalization to the input images to ensure compatibility with the pre-trained VGG16 weights. This approach is standard practice, as the initial convolutional layers of the network are sensitive to the input distribution; using the same normalization statistics as in pre-training allows optimal transfer learning and stable feature extraction from medical images, even though these images differ from natural images in content.  
The primary model is implemented as a convolutional neural network (CNN) using the Keras framework. The network can be mathematically described as a function \(F:\mathbb{R}^{224\times 224\times 3}\rightarrow\mathbb{R}^{5}\) that approximates the mapping from the preprocessed input \(X^{\prime}\) to a vector of logits \(\mathbf{z}\). The first fully connected layer applies a linear transformation followed by a nonlinear activation:  
\[h_{1}=\text{ReLU}(W_{1}X^{\prime}+b_{1}), \tag{3}\]  
where \(W_{1}\in\mathbb{R}^{1024\times d}\) and \(b_{1}\in\mathbb{R}^{1024}\), with \(d\) representing the flattened dimensionality of the feature maps. A dropout layer is applied subsequently:  
\[\tilde{h}_{1}=D_{0.5}(h_{1}), \tag{4}\]  
where \(D_{0.5}(\cdot)\) indicates dropout with probability 0.5. The next dense layer is defined as  
\[h_{2}=\text{ReLU}(W_{2}\tilde{h}_{1}+b_{2}), \tag{5}\]  
with \(W_{2}\in\mathbb{R}^{512\times 1024}\) and \(b_{2}\in\mathbb{R}^{512}\). Finally, the output layer employs a softmax function to generate probabilistic predictions for each of the five clinical classes:  
\[\hat{y}_{i}=\frac{\exp(z_{i})}{\sum_{j=1}^{5}\exp(z_{j})},\quad\text{for }i=1, \ldots,5, \tag{6}\]  
where \(\mathbf{z}=W_{3}h_{2}+b_{3}\) with appropriate dimensions for \(W_{3}\) and \(b_{3}\). The loss function is given by the sparse categorical cross-entropy,  
\[L=-\frac{1}{N}\sum_{n=1}^{N}\log\bigl{(}\hat{y}_{n,y_{n}}\bigr{)}, \tag{7}\]  
where \(N\) is the number of samples and \(y_{n}\) is the true label for sample \(n\). Training is performed for 20 epochs using a batch size \(B=32\), and the full dataset is partitioned with an 80/20 stratified split to ensure balanced representation of classes.