Source-linked AI summary

Test-Time Adaptation for ECG Classification via SQI-Gated Self-Training and Beat-Rhythm Consistency

Wenhan Jiang, Zhipeng Deng, Jiale Zhou, Haolin Wang, Yafei Ou, Yefeng Zheng

arXiv:2608.23347v1cs.LG

TL;DR

ECG classifiers can degrade under shifts in hardware and patient cohorts, while existing TTA methods remain insufficiently tailored to ECG's noisy, hierarchical signals. BeatRhythm-TTA combines SQI-gated self-training with beat- and rhythm-level consistency for unlabeled target-time adaptation. Across multiple protocols and target domains, it consistently outperformed representative baselines, including an average +2.70% relative Macro-F1 improvement over the strongest competitor.

  • Problem

    Hardware and patient-cohort distribution shifts challenge ECG model generalization, while ECG-specific TTA remains underexplored.

  • Method

    BeatRhythm-TTA combines SQI-gated teacher-driven self-training with dual-level consistency across beat morphology and rhythm dynamics.

  • Results

    +2.70% relative improvement in Macro-F1 was achieved over the strongest competing method across three adaptation protocols and two target domains.

  • Takeaways & Limitations

    Reliability-aware updates and semantically grounded beat-rhythm constraints support stable ECG adaptation under real-world domain shifts.

Abstract

from arXiv · show

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.

1 Introduction

ECG classifiers struggle to generalize across unseen clinical environments because hardware and patient-cohort shifts alter the data distribution, while existing TTA methods remain underexplored for ECG. BeatRhythm-TTA addresses these challenges with SQI-gated adaptation and beat- and rhythm-level consistency, achieving a reported average +2.70% relative Macro-F1 improvement.

  • Hardware and patient-cohort shifts make pretrained ECG models difficult to generalize to unseen clinical environments.
  • TTA adapts deployed models using unlabeled test data, avoiding target labels and retraining from scratch.
  • Existing TTA methods were developed mainly for vision, leaving ECG-specific adaptation underexplored despite progress in other modalities.
  • BeatRhythm-TTA selectively scales or blocks updates using SQI and enforces beat- and rhythm-level consistency to preserve ECG semantics.The consistency targets local beat morphology and global rhythm irregularities, while SQI gating addresses noisy segments.
  • +2.70% relative improvement in Macro-F1 was achieved over the strongest competing methods across three adaptation protocols.Experiments used PTB-XL as the source domain and CPSC2018 and Georgia as target domains for multi-label ECG classification.

2 Method

BeatRhythm-TTA adapts ECG classifiers at deployment using SQI-gated self-training and consistency constraints across beat and rhythm representations. It combines quality-aware update control with clean-versus-augmented-view alignment to preserve ECG semantics during adaptation.

  • Method Overview: BeatRhythm-TTA uses SQI-gated pseudo-labeling to update the model only when teacher confidence and signal quality support adaptation.The SQI is computed online without labels and controls both update eligibility and strength.
  • SQI-gated Pseudo-labeling: The method extracts beat-centered windows using detected R-peaks and RR-based scaling to accommodate heart-rate variation.A reference lead, robust normalization, and physiological sanity checks precede beat-window extraction.
  • SQI-gated Pseudo-labeling: Beat-wise SQI combines QRS concentration, waveform sharpness, and baseline-wander ratio to estimate signal reliability.QRS concentration and sharpness capture morphology, while baseline wander indicates low-quality motion-corrupted segments.
  • SQI-gated Pseudo-labeling: The teacher-student scheme generates pseudo-labels from a clean view and trains the student on a time-aligned augmented view.The method uses multi-label probabilities and binary cross-entropy for pseudo-label supervision.
  • Dual-level Consistency: Dual-level consistency aligns global sample features and local beat embeddings between clean and augmented views.Rhythm alignment captures dynamics across beats, while beat alignment preserves local morphology; SQI weights emphasize reliable beats.
  • Dual-level Consistency: The final objective combines SQI-gated pseudo-label loss with beat-level and rhythm-level consistency losses to regularize test-time updates.Scalar hyperparameters balance the two consistency terms against pseudo-label supervision.

3 Experiments

Experiments evaluate BeatRhythm-TTA across offline, continual online, and independent online adaptation using PTB-XL as source and CPSC2018/Georgia as targets. The method achieves the strongest reported performance, while ablations support contributions from SQI gating and beat-level consistency.

  • Datasets and evaluation: Experiments use PTB-XL as the source domain and CPSC2018 and Georgia as distinct target domains for cross-domain ECG adaptation.All datasets share a six-class label space, and evaluation reports Macro-F1 and Macro-AUC averaged over three runs.
  • Baselines: The study compares BeatRhythm-TTA with source-only, representative TTA, and offline source-free domain adaptation baselines.The evaluated methods include AdaBN, MemBN, TENT, SAR, DeYO, COME, TEA, SHOT, SF(DA)2, and UCon.
  • Overall results: BeatRhythm-TTA consistently achieves the best average Macro-AUC and Macro-F1 across offline and online protocols.The comparison covers offline, continual online, and independent online settings.
  • Offline TTA: 60.64% to 62.42%: averaged Macro-F1 improves under offline TTA, while Macro-AUC rises from 88.13% to 88.84%.The reported comparison is for batch adaptation when the target set can be revisited.
  • Online TTA: +1.12% Macro-F1 and +0.65% Macro-AUC are achieved in continual online TTA, while independent online TTA improves Macro-F1 by +1.97%.The continual setting accumulates updates, whereas the independent setting adapts each sample separately.
  • Ablation study: Removing SQI gating or consistency regularization degrades performance, and adding beat-level consistency yields a further gain.The ablation study supports complementary benefits from reliability-aware filtering, semantic preservation, and beat-aware alignment.

4 Conclusion

The paper presents BeatRhythm-TTA, which combines SQI-gated pseudo-labeling with dual-level consistency regularization for ECG adaptation. Across two target domains and three protocols, it consistently outperforms representative TTA and SFDA baselines, highlighting reliability-aware and semantically grounded updates for stable adaptation under real-world shifts.

  • Conclusion: BeatRhythm-TTA combines SQI-gated pseudo-labeling with dual-level consistency regularization.The framework is designed for ECG test-time adaptation.
  • Conclusion: Across two target domains and offline, continual, and independent online protocols, BeatRhythm-TTA consistently outperforms representative TTA and SFDA baselines.The conclusion summarizes results across the evaluated adaptation settings.
  • Conclusion: Reliability-aware updates and semantically grounded beat-rhythm constraints are highlighted as critical for stable ECG adaptation under real-world shifts.This conclusion connects SQI gating and beat-rhythm consistency to the paper's stated stability objective.
Loading 2608.23347v1…