Test-Time Adaptation for ECG Classification via SQI-Gated Self-Training and Beat-Rhythm Consistency
Organizations: Westlake University, Hangzhou, China · Hokkaido University, Sapporo, Japan · RIKEN, Japan
Abstract
Deep learning models for electrocardiogram (ECG) classification often suffer from significant performance degradation when deployed in unseen domains due to shifts in acquisition devices and patient populations. Test-time adaptation (TTA) offers a practical solution by adapting models using only unlabeled data at inference time. However, existing TTA methods often underperform on ECG tasks, since naive online updates ignore the hierarchical beat-rhythm structure of cardiac cycles and are vulnerable to signal artifacts, which leads to unstable adaptation and model drift. We propose BeatRhythm-TTA, an ECG-tailored TTA framework that explicitly accounts for ECG's noisy observations and structured beat-rhythm semantics under domain shift. First, to handle pervasive ECG artifacts, we introduce a Signal Quality Index (SQI)-gated adaptation scheme that selectively filters out low-quality signals to prevent harmful updates. Second, to leverage ECG's beat-rhythm semantics, we enforce dual-level consistency so the model preserves beat morphology and rhythm dynamics while adapting to shifted acquisition conditions. Extensive experiments on multi-label ECG diagnosis across three adaptation protocols, using PTB-XL as the source domain and CPSC2018/Georgia as two target domains, demonstrate the effectiveness of our method, yielding an average +2.70% relative improvement in Macro-F1 over the best competing method.
Figures & tables
| Method | CPSC2018 | Georgia | Avg | |||
|---|---|---|---|---|---|---|
| AUC | F1 | AUC | F1 | AUC | F1 | |
| Source Only | 87.62 | 60.84 | 88.59 | 60.35 | 88.11 | 60.59 |
| AdaBN [ 13 ] | 83.25 | 46.71 | 87.33 | 52.29 | 85.29 | 49.50 |
| TENT [ 25 ] | 87.57 | 60.63 | 88.57 | 60.29 | 88.07 | 60.46 |
| COME [ 30 ] | 87.28 | 60.14 | 88.43 | 59.83 | 87.86 | 59.99 |
| SAR [ 17 ] | 83.43 | 47.63 | 87.48 | 53.40 | 85.45 | 50.52 |
| Method | CPSC2018 | Georgia | Avg | |||
|---|---|---|---|---|---|---|
| AUC | F1 | AUC | F1 | AUC | F1 | |
| Source Only | 87.62 | 60.84 | 88.59 | 60.35 | 88.11 | 60.59 |
| Continual Online TTA | ||||||
| AdaBN [ 13 ] | 86.11 | 58.81 | 87.94 | 61.93 | 87.03 | 60.37 |
| TENT [ 25 ] | 84.92 | 53.68 | 87.40 | 56.15 | 86.16 | 54.92 |
| COME [ 30 ] | 87.29 | 60.63 | 88.54 | 60.33 | 87.92 | 60.48 |
| SQI | Consistency | CPSC2018 | Georgia | Avg | ||||
|---|---|---|---|---|---|---|---|---|
| Rhythm | Beat | AUC | F1 | AUC | F1 | AUC | F1 | |
| 87.62 | 60.84 | 88.59 | 60.35 | 88.11 | 60.59 | |||
| ✓ | 88.45 | 61.73 | 88.89 | 61.58 | 88.67 | 61.66 | ||
| ✓ | ✓ | 88.55 | 61.95 | 88.91 | 61.82 | 88.73 | 61.89 | |
| ✓ | ✓ | 88.65 | 62.38 | 88.95 | 62.13 | 88.80 | 62.26 | |
| ✓ | ✓ | ✓ | 88.70 | 62.57 | 88.97 | 62.26 | 88.84 | 62.42 |
Test-Time Adaptation
Test-time adaptation updates or recalibrates pretrained models at inference to handle distribution shifts, often without target labels.
See all 318 papers