# Automated Chest X-Ray Diagnosis Report Generation with Cross-Attention Mechanism
## 4 Discussion  
This paper proposes an innovative method combining convolutional block attention module (CBAM) and cross-attention mechanism to solve the problems of chest X-ray data bias and modality matching, thereby improving the accuracy of disease diagnosis. First, we introduced the convolutional block attention module (CBAM) to address the bias problem of X-ray data. CBAM can automatically assign different attention weights to different \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Method** & **BL-1** & **BL-2** & **BL-3** & **BL-4** & **MTR** & **RG-L** \\ \hline Baseline & **0.467** & 0.288 & 0.199 & 0.140 & 0.194 & 0.357 \\ R2 GenCMN & 0.456 & 0.289 & **0.209** & **0.161** & 0.183 & 0.352 \\ MRG & 0.427 & 0.288 & 0.204 & 0.150 & 0.179 & 0.360 \\ ours & 0.456 & **0.294** & 0.205 & 0.152 & **0.196** & **0.364** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of performance indicators with other models. regions by dynamically adjusting the channel and spatial dimensions of the image. In the spatial dimension, CBAM strengthens the model's learning of key lesion sites by focusing on the most important areas in the image; in the channel dimension, CBAM can focus on the feature channels that are most important for disease judgment, thereby effectively avoiding the interference of irrelevant areas and features. In this way, the model can focus more on the lesion area in the chest X-ray during training, reduce the influence of other unimportant areas, and, thus, improve the accuracy of diagnosis. Experimental results show that after adding the CBAM module, the performance of the model in processing X-ray data was significantly improved, indicating that the module successfully alleviates the bias problem of X-ray data and enables the model to locate the lesion area more accurately. In order to solve the modality matching problem between X-ray images and diagnostic reports, we adopted the cross-attention mechanism. This mechanism aims to align image and text data and promote their effective fusion by establishing closer associations between different modalities. In our method, the cross-attention mechanism prompts the model to learn the fine-grained relationship between X-ray images and corresponding diagnostic reports by calculating the similarity between images and text. Through this multimodal alignment, the model can better understand and utilize the complementary information in X-ray images and diagnostic reports, thereby enhancing the model's learning ability under multimodal data. To verify the effectiveness of our method, we compared it with the traditional splicing method and evaluated it on indicators such as BL-4, BL-3, and BL-2. The experimental results show that the model after using CBAM and the cross-attention mechanism achieved significant improvements in these indicators. Compared with the baseline, our method effectively enhances the model's ability to process multimodal data and improves the model's ability to generate accurate results. Previous studies often focus on solving only one of the problems. MRG uses CNN+RNN to generate good diagnostic reports, but the performance of the model is affected by the lack of specific labels between the specific content of the image and the text. ConVIRT uses contrastive learning to combine image and text modalities to achieve good results. However, the imbalanced data distribution of X-rays will cause the model to pay insufficient attention to important areas and pay too much attention to unimportant areas. XrayGPT uses a large language model to achieve modality alignment. Although the effect is very good, the cost of training the model is very high. We use a combination of CBAM and cross-attention mechanism to provide a more comprehensive solution for the data balance of X-rays. At present, our model still has certain limitations, mainly reflected in the data type used. At present, our model only uses the most basic X-ray image data and diagnostic reports.