# The Multi-Branch Deep-Learning-Based Approach to Heart Dysfunction Classification
## 4 Discussion
Comparing LSTM networks on the exact network sizes, the best result obtained for the single-branch architecture is 0.441 (at 0.09 ms for a single window), 0.465 (at 0.40 ms) for the multi-branch architecture, or 0.456 (at 0.24 ms) for the multi-branch architecture with the removed \(\gamma\) branch. The results from scenario D are interesting, where with the increase of the network size, a significant improvement in the classification result was observed for two of the three tested networks (from 0.456 to 0.486 and from 0.335 to 0.390) while maintaining practically the same classification time window in the case of LSTM (from 0.40 ms to 0.41 ms) or even its reduction in the case of N-BEATS and GRU (from 0.53 ms to 0.51 ms and from 0.37 ms to 0.36 ms). This shows that the multi-branch architecture offers greater optimization possibilities for the selected problem and the possibility of further improving the classification result for the same core networks in cases where the single-branch architecture cannot obtain better results. Experiments in scenarios A and G revealed additional dependencies for diagnosing specific diseases based on different input modalities (as seen in Appendix C). While for most of the diagnosed diseases, the six-branch architecture guaranteed better classification, there were classes for which the results were worse than for the single-branch solution--this was particularly true for the RAD, LQRSV, Stach, and SA classes, where the difference in metrics was significant. Interestingly, while the best results for these various metrics were often obtained on different input channels, there was a common group of input modalities for which the best results were obtained across all four classes. These were the \(\beta\), \(\delta\), and \(\gamma\) branches, i.e., branches lacking the pure ECG signal but containing it only in a processed version (wavelet analysis, domain knowledge extraction, and PCA). This result suggests that these classes are difficult to interpret from the ECG signal. It is possible that using the ECG signal as network input reduces its performance for these classes. In the case of constructing a classifier for the diagnosis of one of these four diseases, a concept worth exploring is to prepare an architecture using these three input modalities--wavelet analysis, domain knowledge extraction, and PCA. When metrics for individual branches are observed, their impact is particularly noticeable in the case of recall (Table A4). There are distinct groups of conditions for which significantly higher metric values are achieved on individual branches. For example, axis deviation problems (LAD, RAD) are better visible on \(\gamma\) and \(\delta\) inputs, while for the atrial conditions (AF, AFL, PAC), the best metric is obtained on \(\zeta\) input (which means they can be obscured by baseline wandering). Considering the influence of input channels on the effectiveness of diagnosing individual diseases would lead to more effective classifiers based on a smaller number of more tailored input modalities--often devoid of a raw ECG signal. The proposed architecture will work well for the core networks in complex problems, where, in addition to the signal, there is also a lot of additional information, and/or it is possible to clean/process the data in different ways. It is a universal structure that offers easy extensibility with additional branches to make use of all available information. As can be seen in Table 13, the proposed architecture applied to RNN allowed for improvement of obtained results, but for the challenge problem (as also shown in Appendix D), CNNs still obtained slightly better results. Preliminary research does not show meaningful improvement with using the multi-branch architecture for CNNs in the tested scenario, but further research is needed to determine if CNNs and networks with attention blocks can, in any way, benefit from the proposed architecture, or if it is mainly an improvement for RNNs. **Author Contributions:** Conceptualization, K.H., B.P. and M.I.