###### Abstract  
Analyzing electrocardiographic (ECG) signals is crucial for evaluating heart function and diagnosing cardiac pathology. Traditional methods for detecting ECG changes often rely on offline analysis or subjective visual inspection, which may overlook subtle variations, particularly in the case of artifacts. In this theoretical, proof-of-concept study, we investigated the potential of five different machine learning algorithms [random forests (RFs), gradient boosting methods (GBMs), deep neural networks (DNNs), an ensemble learning technique, as well as logistic regression] to detect subtle changes in the morphology of synthetically generated ECG beats despite artifacts. Following the generation of a synthetic ECG beat using the standardized McSharry algorithm, the baseline ECG signal was modified by changing the amplitude of different ECG components by 0.01-0.06 mV. In addition, a Gaussian jitter of 0.1-0.3 mV was overlaid to simulate artifacts. Five different machine learning algorithms were then applied to detect differences between the modified ECG beats. The highest discriminatory potency, as assessed by the discriminatory accuracy, was achieved by RFs and GBMs (accuracy of up to 1.0), whereas the least accurate results were obtained by logistic regression (accuracy approximately 10% less). In a second step, a feature importance algorithm (Boruta) was used to discriminate which signal parts were responsible for difference detection. For all comparisons, only signal components that had been modified in advance were used for discretion, demonstrating that the RF model focused on the appropriate signal elements. Our findings highlight the potential of RFs and GBMs as valuable tools for detecting subtle ECG changes despite artifacts, with implications for enhancing clinical diagnosis and monitoring. Further studies are needed to validate our findings with clinical data.  
ECG; ECG morphology; random forests; McSharry algorithm; Gaussian jitter; machine learning 20241736003390/a1708036  
to compromise the accuracy of signal interpretation, potentially leading to imprecise pathology detection. These lead to missing variances of the ECG morphology due to multiple confounders such as internal or external artifacts, the low resolution of monitors used, the impossibility of analyzing changes of the signal obtained on the fly, and the general problem of inaccuracies of ECG traces and intervals [6]. Computer-aided algorithms might serve as promising tools to overcome these shortcomings. However, most of the technical solutions used so far in clinical practice suffer from low sensitivities in detecting subtle changes, particularly in noisy ECG signals [7; 8; 9; 10].  
Modern machine learning tools have the theoretical potential to detect differences between two ECG signals despite the aforementioned limitations. Although they are all based on different mathematical approaches, they represent different supervised entities with the same underlying principle. The main idea of this approach is to train a model on well-known data and evaluate it using unseen examples, where the correct outcome is known [11; 12; 13; 14].  
In this study, we aimed to determine the diagnostic accuracy of five different machine learning algorithms to detect subtle changes in the morphology of synthetically generated ECG signals despite superimposition by different degrees of signal noise. Our hypothesis was that machine learning algorithms could reliably detect even subtle changes in noisy ECG signals.