Source-linked AI summary

Subject-Aware Contrastive Learning for Biosignals

Joseph Y. Cheng, Hanlin Goh, Kaan Dogrusoz, Oncel Tuzel, Erdrin Azemi

arXiv:2007.04871v1cs.LGeess.SPstat.ML

TL;DR

Biosignal labels are costly and potentially biased, while the effectiveness of representation-learning techniques from other domains for biosignals is uncertain. The paper applies contrastive self-supervision with biosignal augmentations and subject-aware learning. Its findings indicate benefits from subject invariance, particularly with fewer subjects, and from subject-specific loss when fine-tuning with labels.

  • Problem

    Biosignal labels are labor-intensive and time-consuming to assign and may introduce bias, while it is unclear whether representation-learning techniques from language and vision work effectively for biosignals.

    Source: §1 · p. 1
  • Method

    The paper applies contrastive self-supervised learning to biosignals, developing time-series augmentations and adding subject-specific contrastive loss or adversarial subject-invariance.

    Source: §1 · pp. 1–2
  • Results

    For datasets with few subjects, subject-invariant learning reduces the impact of intersubject variability; subject-invariant contrastive learning also produces the best ECG beat and rhythm classification representations.

    Source: §4.2 · p. 7, §5 · p. 8
  • Takeaways & Limitations

    The authors conclude that subject-awareness matters for biosignal representations, and that extracting representations from unlabeled signals will be critical for applying machine learning to personalization and health.

    Source: §5 · p. 8

Abstract

from arXiv · show

Datasets for biosignals, such as electroencephalogram (EEG) and electrocardiogram (ECG), often have noisy labels and have limited number of subjects (<100). To handle these challenges, we propose a self-supervised approach based on contrastive learning to model biosignals with a reduced reliance on labeled data and with fewer subjects. In this regime of limited labels and subjects, intersubject variability negatively impacts model performance. Thus, we introduce subject-aware learning through (1) a subject-specific contrastive loss, and (2) an adversarial training to promote subject-invariance during the self-supervised learning. We also develop a number of time-series data augmentation techniques to be used with the contrastive loss for biosignals. Our method is evaluated on publicly available datasets of two different biosignals with different tasks: EEG decoding and ECG anomaly detection. The embeddings learned using self-supervision yield competitive classification results compared to entirely supervised methods. We show that subject-invariance improves representation quality for these tasks, and observe that subject-specific loss increases performance when fine-tuning with supervised labels.

1 Introduction

The introduction motivates self-supervised contrastive learning for biosignals, where labels are costly and signal representations may obscure complex biological information. It contributes domain-inspired augmentations and two ways to incorporate subject information into learning.

1 Introduction

  • EEG and ECG biosignal classification can inform health monitoring, including epilepsy, depression, cardiac health, and stress.Source: §1 · p. 1
  • Biosignal labels are labor-intensive and time-consuming to assign, and labeling may introduce unintended biases; self-supervision aims to learn representations without labels.Source: §1 · p. 1
  • Contrastive self-supervision is assessed for biosignals because their measured time series may obscure information shaped by complex biological mechanisms.The approach requires suitable data transformations and attention to intersubject variability.Source: §1 · p. 1
  • Temporal cutout and delay are the most effective transformations for representation learning, followed by signal mixing, sensor perturbations, and bandstop filtering.The authors motivate domain-inspired augmentations, including frequency-based perturbations, for biosignals.Source: §1 · pp. 1–2
  • Subject-aware learning uses subject-specific contrastive distributions or adversarial training for subject invariance; promoting invariance improves classification with few subjects.Both approaches also provide initializations effective for supervised fine-tuning.Source: §1 · p. 2

2 Related Work

Prior time-series representation learning uses temporal pretext tasks and contrastive clustering, while biosignal research also explores subject-based domain correction and invariant features. This work applies contrastive learning to biosignals and incorporates subject invariance.

2 Related Work

  • Temporal-ordering, temporal-prediction [6], and multiple-pretext-task methods have been used for temporal representation learning, including EEG and ECG.Source: §2 · p. 2
  • Contrastive clustering [12] [13] treats perturbations of one instance as a cluster and other instances as negatives; non-stationary biosignals also allow later time points as negatives.The paper applies the MEG concept from Hyvärinen and Morioka within contrastive learning [13] for biosignals.Source: §2 · p. 2
  • Prior work models subject variability as domain shift and uses adversarial training [15, 16] or domain-invariant features, including EEG classifier regularization.This work introduces subject invariance into contrastive learning and studies its downstream effects.Source: §2 · p. 2

3 Methods

The method learns biosignal representations through contrastive self-supervision and introduces subject awareness through subject-specific contrastive loss or adversarial training. Domain-inspired temporal and spatial transformations augment the training signals.

3.1 Model and Contrastive Loss Function

  • Contrastive self-supervision encodes two transformed views of each sample, with momentum-updated copies of the encoder and projection model supplying additional negative examples.The method estimates mutual-information maximization with InfoNCE.Source: §3.1 · pp. 2–3
  • Subject awareness enters through subject-specific negative sampling based on one subject’s data distribution or adversarial regularization that encourages embeddings to minimize subject-based information.The subject-specific loss focuses on differences over time within a subject, while the adversarial approach trains the encoder to confuse a subject classifier.Source: §3.1 · p. 3

3.2 Data Transformations for Biosignals

  • Training views use temporal cutout and delays, noise, bandstop filtering, signal mixing, and spatial transformations including rotation, shift, sensor dropout, and sensor cutout.For ECG, spatial rotation, spatial shift, and sensor cutout were excluded from the experiments.Source: §3.2 · pp. 3–4, Figure 2 · p. 4

4 Experiments and Results

Experiments evaluate self-supervised representations on EEG motor-imagery and ECG classification tasks. Results show benefits from supervised fine-tuning and subject-aware learning, with the useful degree of subject-invariance varying by task and label availability.

4.1 EEG: PhysioNet Motor Imagery Dataset

  • Temporal cutout was the most effective EEG transformation, followed by temporal delay and signal mixing; spatial perturbations improved accuracy by no more than 0.1%.The table reports 4-class accuracy differences from a no-augmentation baseline of 36.7%.Source: §4.1 · p. 5, Table 1 · p. 5
  • Both subject-specific and subject-invariant EEG training reduced subject-identification features and improved classification, while SSL without augmentation did no better than a random encoder.In intersubject testing, SSL variants performed comparably with 90 training subjects, which the authors describe as sufficient to generalize to unseen subjects.Source: §4.1 · p. 5, Table 2 · p. 6
  • 50.3% accuracy was observed for 4-class EEG calibration; with 4 labeled subjects, invariant SSL matched end-to-end learning trained with 16 subjects.With about 64 classifier-training subjects, base SSL performed comparably to subject-invariant SSL; for intrasubject testing, invariant SSL outperformed the other variants across label fractions.Source: §4.1 · p. 6, Figure 3 · p. 6
  • 81.6% accuracy for 2-class and 53.9% for 4-class intersubject EEG classification were achieved after fine-tuning SSL models.The reported fine-tuned models improved accuracy compared with end-to-end training from random initialization.Source: §4.1 · p. 6, Table 3 · p. 7

4.2 ECG: MIT-BIH Arrhythmia Database

  • For ECG with limited labels, λ = 0.1 was comparable to base and subject-specific SSL through 40% of labels, while λ = 0.01 achieved higher accuracies with more subject information.The figure reports improved beat-classification accuracy when subject-invariance was lowered to λ = 0.01.Source: §4.2 · p. 7, Figure 4 · p. 8
  • For frozen ECG encoders, subject-invariant learning performed best with λ = 0.01 for beats and λ = 0.001 for rhythms.Lower regularization was needed because labels were unevenly distributed across subjects.Source: §4.2 · p. 7, Table 4 · p. 8
  • 93.2%±1.6% overall accuracy was achieved by fine-tuning subject-specific SSL weights for ECG beats, versus 91.9%±1.8% with random initialization.The subject-specific model had SVEB F1 43.8 versus 46.7 for the baseline, and VEB F1 92.4 versus 89.2.Source: §4.2 · p. 8

5 Conclusion

Subject awareness matters for biosignal representations, particularly with fewer than 64 EEG subjects. The work also identifies broader biosignal applications and future extensions.

5 Conclusion

  • For EEG datasets with fewer than 64 subjects, subject-invariant regularization can reduce the impact of intersubject variability.For ECG, the regularization can be reduced when there are more subjects or when subject information matters for the downstream task.Source: §5 · p. 8
  • The approach could extend to subject-dependent EOG and EMG signals; multimodal learning, lower data requirements, and automatic dataset cleaning remain future work.The authors note that unlabeled datasets may be many times larger than those explored.Source: §5 · p. 8
  • Contrastive self-supervision handled noisy biosignals with minimal preprocessing, supporting representation learning from these signals.The authors connect this approach to personalization and health applications.Source: §5 · p. 8

Broader Impact

The work addresses labeling burdens and potential bias in biosignal machine learning, while emphasizing careful collection and design for health applications.

Broader Impact

  • Labeling biosignals can introduce unintended biases, so unlabeled data collection still requires care to avoid biasing learning toward a particular distribution.The authors recommend checking learned models for bias even when using subject-aware training.Source: Broader Impact · p. 9
  • Subject-aware training mitigates concern about bias toward a particular data distribution, but does not remove the recommendation to check learned models for bias.Source: Broader Impact · p. 9
  • With proper data collection and design, the work aims to support high-quality health indicators while improving personalization and promoting privacy through minimizing subject information.Source: Broader Impact · p. 9

A EEG: PhysioNet Motor Imagery Dataset [Section 4.1]

The EEG experiments evaluate learned representations and augmentation choices for four-class motor-imagery decoding. Subject-invariant learning performed strongly with limited labels, and noise replacement was the most effective tested cutout variant.

EEG: PhysioNet Motor Imagery Dataset

  • The EEG encoder processes 320 samples from 64 channels, corresponding to 2 seconds at 160 Hz, and maps the signal to a 256-dimensional representation.The encoder uses convolutional layers, ResBlocks, max pooling, and ELU activations.Source: A EEG: PhysioNet Motor Imagery Dataset… · p. 13, Figure A.2 · p. 13, Figure A.1 · p. 13
  • Noise replacement was the most effective tested cutout variant, evaluated against a 36.7% no-augmentation baseline on 320-sample EEG segments.The authors hypothesize that noise makes representation learning harder and increases activated neurons throughout the model during training.Source: A EEG: PhysioNet Motor Imagery Dataset… · p. 13, Figure A.3 · p. 14
  • Table A.1 summarizes four-class EEG accuracy as improvements over the 36.7% no-augmentation baseline, using means and standard deviations across 10 trials.Source: Table A.1 · p. 14
  • Fine-tuning updated both the encoder and a newly attached fully connected layer; the randomly initialized end-to-end baseline used a separate training schedule.The self-supervised initialization used Adam at 1e-5 for 200 epochs; the baseline used 1e-2 for 1,000 epochs, with augmentation and MixUp in both cases.Source: A EEG: PhysioNet Motor Imagery Dataset… · p. 15
  • 54.4% overall accuracy was reported for supervised fine-tuning of the subject-invariant EEG model; with limited labels, it consistently outperformed the other approaches.Source: Table A.2 · p. 15, Figure A.4 · p. 15

B ECG: MIT-BIH Arrhythmia Database [Section 4.2]

For ECG beat classification, the best reported performance came from fine-tuning a subject-specific self-supervised encoder. Adding RR-interval information improved supervised classification scores.

ECG: MIT-BIH Arrhythmia Database

  • The ECG encoder maps 704 samples from two channels, corresponding to 1.96 seconds at 360 Hz, to a 256-dimensional representation.The fine-tuning setup attached two fully connected layers to the encoder and trained the model end to end.Source: B ECG: MIT-BIH Arrhythmia Database… · p. 16, Figure B.1 · p. 16
  • The classifier concatenated pre- and post-beat RR intervals, normalized by the recording’s average RR interval, to the encoder embedding.The authors note that the receptive field in their setup did not cover multiple heartbeats.Source: B ECG: MIT-BIH Arrhythmia Database… · p. 16
  • 93.2%±1.6% overall accuracy was the best reported beat-classification performance, using the subject-specific SSL encoder, with SVEB F1 43.8 and VEB F1 92.4.Source: B ECG: MIT-BIH Arrhythmia Database… · p. 16
  • Adding RR-interval information improved end-to-end supervised F1 from 31.4 to 46.7 for SVEB and from 85.8 to 89.2 for VEB.The reported ranges from previous work were 23.2–76.6 for SVEB and 63.4–89.7 for VEB.Source: B ECG: MIT-BIH Arrhythmia Database… · p. 16
  • Table B.2 gives a representative supervised fine-tuning confusion matrix for subject-specific contrastive learning, with 95.1% accuracy and SVEB/VEB F1 scores of 46.1/94.6.Source: Table B.2 · p. 17
Loading 2007.04871v1…