The Accuracy Paradox in Medical AI: Evidence from Subject-Independent ECG Arrhythmia Classification
Year: 2026
Type: preprint
Abstract: Electrocardiogram (ECG) heartbeat classification is an important task for detecting cardiac arrhythmias. However, reliable classification remains challenging because of severe class imbalance and variations in ECG patterns across individuals. This study investigates the performance of two traditional machine learning models, Random Forest (RF) and XGBoost, for subject-independent ECG heartbeat classification using the MIT-BIH Arrhythmia Database. A total of 100,693 heartbeat segments from 43 subjects were classified into four categories: non-ectopic (N), supraventricular ectopic (S), ventricular ectopic (V), and fusion (F) beats. The dataset exhibited substantial class imbalance, with the fusion class accounting for only 0.80\% of all beats. A feature-based approach was developed using waveform-derived statistical and wavelet features, together with RR-interval features. Both classifiers were evaluated using a 43-fold Leave-One-Subject-Out (LOSO) protocol across three random seeds to assess their generalization to unseen subjects. Performance was measured using accuracy, balanced accuracy, macro-averaged F1-score, and class-wise evaluation metrics. XGBoost achieved a mean macro-F1 score of 0.4950 ± 0.0126 and balanced accuracy of 0.5243 ± 0.0152, outperforming Random Forest, which achieved 0.4413 ± 0.0108 and 0.4623 ± 0.0050, respectively. In contrast, Random Forest achieved higher overall accuracy (0.9212 ± 0.0072) than XGBoost (0.8615 ± 0.0045). Both models showed substantial difficulty identifying fusion beats, with near-zero F1-scores across all evaluated seeds. These findings illustrate the accuracy paradox in a medical AI setting: overall accuracy alone may not adequately represent model performance in highly imbalanced, subject-independent ECG classification. The results also highlight the persistent challenges of minority-class recognition and generalization across individuals.
Source: Preprints.org
Authors: Haris Md. Sahed, Maorufa Zaman, Fatih Ozaydin
Language: English
Topic: ECG Monitoring and Analysis
Subfield: Cardiology and Cardiovascular Medicine
Field: Medicine
Domain: Health Sciences
Open Access status: green
OpenAlex ID: W7239374228
