Why ECG is a good SSL domain
ECG signals are structured, periodic, noisy, and highly individualized. These properties make both contrastive and masked modelling objectives plausible, but they also make augmentation design delicate. A transformation that preserves semantic content for images may destroy a clinically relevant waveform morphology.
Objective families
Two objective families dominate. Contrastive learning uses positive waveform pairs generated by domain-specific augmentations; masked modelling reconstructs hidden waveform segments or channels.
Hybrid losses are especially appealing in ECG because morphology and temporal context both matter.
Implementation sketch
aug_a = crop_and_jitter(ecg_batch)
aug_b = lead_dropout(time_mask(ecg_batch))
z_a = encoder(aug_a)
z_b = encoder(aug_b)
loss = contrastive(z_a, z_b) + 0.2 * masked_reconstruction(ecg_batch)
Practically, the main challenge is not optimization but transfer validity. A representation that performs well on one public benchmark may still fail across devices, hospitals, or patient subgroups.