## 6 Conclusions  
In this article, we introduce a structure based on a multimodal CNN with an attention module for the end-to-end classification of cardiac arrhythmias. This model was evaluated via the MIT-BIH database, considering both the interpatient and intrapatient paradigms. Two multimodal CNN structures were tested, one considering two input images generated with different techniques, namely, RP and the HSFC, from ECG signals with only the MLII lead and another with MLII and V leads. The convolutional layers of the structure were based on AlexNet, with a modification to highlight the edges of the images that were generated from the ECG signals and that, as observed, were concentrated with a significant amount of information. This adaptation resulted in improvements in the classification results. The feature vectors extracted by the sequences of convolutional layers, after being processed by fully connected layers, were merged and passed to an attention mechanism that highlighted the most relevant merged features for the classification process. The presence of the attention mechanism increased the global indicators and the sensitivity for the S class, and its introduction led to the generation of different results between the inter- and intrapatient paradigms. The best results achieved by the proposed structure, considering the overall accuracy and F1 score for the interpatient paradigm, were 98.48% and 81.91%, respectively, while, for the intrapatient paradigm, they were 99.59% and 96.59%, respectively. These results can be considered promising and competitive with the results already presented in state-of-the-art studies; they demonstrate the importance of using the signals of the MLII and V leads together to improve the classification results, especially for the S class, which, as already noted, is a difficult class to learn owing to its signal characteristics. In the future, we intend to improve the proposed structure to obtain better results, especially considering the indicators for the S class using the interpatient approach.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline  & & \multicolumn{4}{c}{**No.**} & \multicolumn{4}{c}{**S**} & \multicolumn{4}{c}{**V**} \\ \hline  & **Recall** & **Pre** & **Spe** & **F1** & **Recall** & **Pre** & **Spe** & **F1** & **Recall** & **Pre** & **Spe** & **F1** \\ \hline M1 & RP & 99.7 & 99.1 & 95.8 & 99.4 & 82.0 & 93.6 & 98.8 & 87.4 & 98.0 & 97.7 & 99.8 & 96.4 \\ M2 & HSFC & 99.5 & 99.0 & 95.1 & 99.3 & 79.7 & 90.0 & 99.8 & 84.5 & 95.2 & 96.4 & 99.8 & 95.8 \\ M3 & MLII & 99.8 & 99.7 & 97.2 & 99.8 & 88.9 & 92.0 & 99.9 & 90.5 & 98.9 & 99.3 & 99.9 & 99.1 \\ M4 & MLII & 99.8 & 99.7 & 97.3 & 99.8 & 89.2 & 92.7 & 99.9 & 90.9 & 98.8 & 99.1 & 99.9 & 99.0 \\ M5 & MLII + V & 99.9 & 99.8 & 98.1 & 99.9 & 92.6 & 95.3 & 99.9 & 93.9 & 99.3 & 99.6 & 100 & 99.4 \\ M6 & MLII + V & 99.9 & 99.8 & 97.9 & 99.8 & 92.9 & 94.7 & 99.9 & 93.8 & 99.0 & 99.6 & 99.9 & 99.3 \\ \hline \hline \end{tabular}
\end{table}
Table 18: Indicators by intrapatient class.  
**Author Contributions:** All the authors contributed to the conception and design of the study. Material preparation, data collection and analysis were performed by I.F.D.P. and A.R.G.C. The first draft of the manuscript was written by I.F.D.P. and A.R.G.C., who read and approved the final manuscript. All authors have read and agreed to the published version of the manuscript.  
**Funding:** Financial support was received from the Government of Para State through Para State University, Brazil, Resolution No. 3837/2022 of the University Council, according to electronic protocol 2022/8566.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The MIT-BIH database used here is publicly available.  
**Conflicts of Interest:** The authors declare that they have no conflicts of interest.