# Attention Score Enhancement Model Through Pairwise Image Comparison
## 3 Results
The attention score enhancement technique in the PAE model plays a particularly vital role in image data used for predicting cognitive impairments, such as CDT data. Detecting specific visual features is essential when processing cognitive impairment data, and the enhanced attention distribution allows the model to better learn important information during training. For instance, the enhanced attention map helps the model maintain higher focus on key patches within the image, allowing faster recognition of critical information and optimizing the decision-making process based on this information. Moreover, the improvement gained through the attention score enhancement technique increases the model's sensitivity when dealing with CDT data. This enables the model to accurately capture crucial information even in complex image data, ensuring that essential visual patterns are learned more precisely. The enhanced attention map shown in Figure 5 visually confirms that the model more accurately captures visual features, contributing to improved predictive performance. Figure 5: Attention maps of the PAE model for Head 1: (**a**) before attention enhancement, showing a more dispersed attention distribution across patches; (**b**) after attention enhancement, where attention is more concentrated on visually significant patches. By reinforcing attention scores, the PAE model enhances local feature learning while maintaining the ViT's global learning capabilities. As visually confirmed in this comparison, the model can detect important visual elements more quickly and accurately, increasing the utility of the PAE model in applications such as cognitive impairment prediction. Thus, by comparing the changes in attention scores before and after enhancement, we can visually assess the performance improvement of the PAE model. The enhanced attention scores contribute to increased focus on specific patches within CDT data, facilitating precise learning of crucial visual information without missing important details. Table 2 presents a comparison of the PAE model's performance against other prominent models, including ResNet, VGG, DenseNet, API-Net, and ViT, based on various settings and evaluated using precision, recall, F1-Score, and accuracy. The PAE model's performance was assessed by varying parameters such as the encoder layer size (B, L), patch size (16, 32), and input image resolution (224, 384), analyzing optimal configurations for model performance. The PAE_B_16_224 model, which uses 16 \(\times\) 16 patches and 224 \(\times\) 224 resolution images, was directly compared with the API-Net and ViT models. API-Net, which enhances visual contrast by learning pairwise relationships between images, recorded an accuracy of 80.33%. However, the PAE_B_16_224 model achieved a significantly higher accuracy of 92.69%. This result is attributed to the PAE model's design, which extends API-Net's pairwise learning approach by reinforcing attention to important visual differences between the training and reference images. The PAE model also demonstrated superior performance compared to ViT models. For example, the ViT_B_16_224 model achieved an accuracy of 91.76%, whereas the PAE_B_16_224 model reached 92.69%, indicating that the PAE model outperformed the ViT model in terms of accuracy. Notably, the PAE_L_32_384 model outperformed the ViT_L_32_384 model. While the ViT_L_32_384 model's accuracy was 91.89%, the PAE_L_32_384 model recorded an accuracy of 92.42% and high precision and recall values of 0.9433 and 0.9058, respectively. This suggests that, unlike the global learning approach of the ViT architecture, the PAE model more effectively analyzes detailed features of images through attention score enhancement between two images. To further analyze the performance of the PAE model, its performance was compared across different configurations. The PAE_L_16_224 model, which used 16 \(\times\) 16 patches on 224 \(\times\) 224 resolution images, recorded an accuracy of 92.16% and precision of 0.92, displaying a balanced performance.