The Rlign algorithm for enhanced electrocardiogram analysis through heart rate–corrected ECG alignment for explainable classification and clustering

European Heart Journal - Digital Health

29 April 2026
Organised by: Logo
ESC Journals ARRHYTHMIAS AND DEVICE THERAPY Arrhythmias, General

Abstract

AbstractAims

Electrocardiogram (ECG) recordings are fundamental for diagnosing cardiac conditions. Recent advances in automatic ECG analysis have been dominated by deep learning, particularly convolutional neural networks (CNNs). CNNs excel in processing high-dimensional signal data, where their ability to automatically extract complex features has enabled significant progress. However, while CNNs are powerful for biomedical signal analysis, their application to ECG data also carries disadvantages, such as the requirement for large annotated datasets and limited explainability. To address these challenges, we aim to reintroduce shallow learning methods, such as linear classifiers, by leveraging the cyclic nature of ECG signals.

Methods and results

We developed an adaptive transformation that restructures ECG signals into a fully structured format suitable for shallow learning algorithms. This method aligns R-peaks across all signals in a dataset and resamples the inter-QRS segments to match a predefined reference heart rate. The approach was systematically evaluated across tasks including classification, clustering, and explainability. Our transformation substantially improved the performance of shallow learning techniques. Compared with CNN approaches, shallow models trained on transformed ECGs achieved superior accuracy and interpretability in data-limited scenarios.

Conclusion

We demonstrate that shallow machine learning methods, when combined with our alignment-based transformation, can reach CNN level performance in ECG analysis, especially under conditions of limited training data. This approach offers clear advantages in classification, clustering, and explainability and provides an accessible alternative to deep learning. To facilitate adoption and further research, we release a publicly available framework for ECG signal alignment at https://github.com/imi-ms/rlign.

ESC 365 is supported by