From Foundation ECG Models to NISQ Learners: Distilling ECGFounder into a VQC Student
Authors: Giovanni dos Santos Franco, Felipe Mahlow, Ellison Fernando Cardoso, Felipe Fanchini
Organizations: Faculty of Sciences, S˜ao Paulo State University (Unesp), Bauru, Brazil. · Hospital Israelita Albert Einstein, S˜ao Paulo, Brazil. · Laboratory of Magnetic Resonance in Neuroradiology (LIM-44), University of S˜ao Paulo Faculty of Medicine Clinics Hospital, S˜ao Paulo, Brazil.
Foundation models have recently improved electrocardiogram (ECG) representation learning, but their deployment can be limited by computational cost and latency constraints. In this work, we fine-tune ECGFounder as a high-capacity teacher for binary ECG classification on PTB-XL and the MIT-BIH Arrhythmia Database, and investigate whether knowledge distillation can transfer its predictive behavior to compact students. We evaluate two classical 1D students (ResNet-1D and a lightweight CNN-1D) and a quantum-ready pipeline that combines a convolutional autoencoder, which compresses 256-sample ECG windows into a low-dimensional latent representation, with a 6-qubit variational quantum circuit implemented in Qiskit and executed in a simulated backend. Across both datasets, the teacher provides the strongest overall performance, while distillation yields competitive students under a considerable reduction in trainable parameters. We further analyze the sensitivity of student performance to distillation settings, highlighting consistent accuracy--efficiency trade-offs when compressing a foundation ECG model into classical and quantum-ready learners under a unified evaluation protocol.
Figures & tables
Figure 1: Overview of the proposed pipeline. Left: a foundation model (ECGFounder) is fine-tuned to obtain a task-specific teacher. Center: a distillation loss combines hard labels and teacher logits to produce gradients. Right: three students (CNN, ResNet, and a compact VQC-based student) are trained under the same supervision signal for a controlled accuracy–efficiency comparison.
Figure 2: Quantum-student circuit used in this work. A 6-qubit ZZFeatureMap (green) is followed by a hardware-efficient EfficientSU2 ansatz (blue). All qubits are measured to form the output vector used for binary prediction/distillation.
Figure 3: Model complexity comparison (log scale). ECGFounder is the high-capacity teacher, while ResNet, CNN, and Autoencoder+VQC are distilled students with substantially reduced parameter budgets.
Temp
Model
Accuracy
Precision
Recall
F1 Score
Teacher
ECGFounder
0.8000
0.7900
0.9900
0.8400
T=2
ResNet
0.6757
0.6775
0.9763
0.8033
VQC
0.6879
0.7183
0.9392
0.8078
CNN
0.6693
0.6757
0.9502
0.7971
T=4
ResNet
0.6796
0.6848
0.9397
0.7952
VQC
0.6817
0.6950
0.9333
0.7965
Table 1: Mean results on MIT-BIH Arrhythmia for different temperatures ( T ).
Temp
Model
Accuracy
Precision
Recall
F1 Score
Teacher
ECGFounder
0.8063
0.8626
0.9512
0.8179
T=2
ResNet
0.7480
0.7607
0.8223
0.7897
VQC
0.7293
0.7366
0.8310
0.7798
CNN
0.7207
0.7367
0.8032
0.7680
T=4
ResNet
0.7417
0.7486
0.8316
0.7876
VQC
0.7503
0.7766
0.7975
0.7861
Table 2: Mean results on PTB-XL for different temperatures ( T ).
Figure 4: Precision score as a function of the distillation hyperparameters α and temperature T for PTB-XL and MIT-BIH, comparing VQC, CNN, and ResNet students. Solid lines denote PTB-XL and dashed lines denote MIT-BIH.
Electrocardiogram classification uses machine learning to identify heart rhythms and cardiac conditions from ECG waveforms for screening, diagnosis, and monitoring.
High-fidelity ECG interpretation is increasingly reliant on massive foundation models, yet their deployment in clinical edge-care remains hindered by extreme computational demands. While knowledge distillation (KD) is a promising solution, traditional methods fail to capture the complex spatio-temporal dependencies of ECG signals when transferring knowledge across heterogeneous architectures. In this paper, we propose EVL-ECG, a framework specifically designed for cross-architecture distillation of cardiac diagnostic logic. EVL-ECG introduces three ECG-aware innovations: (1) Multi-Head Cross-Attention Alignment, which harmonizes architectural discrepancies to preserve fine-grained morphological features; (2) Optimal Transport-based Visual Feature Matching, utilizing optimal transport to maintain global structural relationships across ECG leads despite mismatched token representations; and (3) Geometric Intra-Architecture Relation Matching, which distills the latent diagnostic reasoning of the teacher model. Evaluations across ECG benchmarks demonstrate that EVL-ECG yields improvements of up to 2.4% AUC and 1.1% clinical accuracy over existing baselines. Notably, EVL-ECG establishes an efficient 2B-parameter ECG foundation model, suitable for resource-constrained clinical environments.
Hanoi University of Science and Technology, Hanoi, Vietnam · VinUni-Illinois Smart Health Center, VinUniversity, Hanoi, Vietnam · College of Engineering and Computer Science, VinUniversity, Hanoi, Vietnam +1
Specialized foundation models are beginning to emerge in various medical subdomains, but pretraining methodologies and parametric scaling with the size of the pretraining dataset are rarely assessed systematically and in a like-for-like manner. This work focuses on foundation models for electrocardiography (ECG) data, one of the most widely captured physiological time series world-wide. We present a comprehensive assessment of pretraining methodologies, covering five different contrastive and non-contrastive self-supervised learning objectives for ECG foundation models, and investigate their scaling behavior with pretraining dataset sizes up to 11M input samples, exclusively from publicly available sources. Pretraining strategy has a meaningful and consistent impact on downstream performance, with contrastive predictive coding (slightly ahead of JEPA) yielding the most transferable representations across diverse clinical tasks. Scaling pretraining data continues to yield meaningful improvements up to 11M samples for most objectives. We also compare model architectures across all pretraining methodologies and find evidence for a clear superiority of structured state space models compared to transformers and CNN models. We hypothesize that the strong inductive biases of structured state space models, rather than pretraining scale alone, are the primary driver of effective ECG representation learning, with important implications for future foundation model development in this and potentially other physiological signal domains.
M A Al-Masud, Nils Strodthoff
AI4Health Division Carl von Ossietzky Universität Oldenburg Oldenburg, Lower Saxony, Germany
ECG is widely used to teach PPG-only models, yet what it teaches is unexamined. Wearables are valued for tracking how a person's cardiovascular state changes, but ECG-to-PPG distillation mostly learns who the person is. A per-recording mean, the trait, holds 40-59% of a frozen ECG teacher's target, and pooled students memorise it without carrying it to new recordings. The raw alignment cosine misses this, since a constant predictor scores 0.793. Across 34 runs, the more identity a student memorises, the less state it learns. Fixed-effects distillation subtracts each recording's mean from prediction and target, so the trait cancels exactly, while a pooled anchor keeps it. State agreement more than doubles, within-person labels improve while age and sex do not, and the gain holds on two backbones and two further databases. Conditioning on the recording turns distillation toward the within-person changes that wearables monitor.
Zhongli Wu, Zhuangzhi Gao, Yuankai Wang +3
Liverpool Centre for Cardiovascular Science, University of Liverpool, UK · Shanghai Artificial Intelligence Laboratory, Shanghai, China · Liverpool Heart and Chest Hospital, Liverpool, UK +1