Contrastive learning (CL) has revolutionized self-supervised representation learning, but its success hinges on a single, often overlooked component: data augmentation. While computer vision researchers have a standard toolkit of crops, flips, and rotations, time-series data—especially quasi-periodic signals like heartbeats or gait—remains a "chaotic" frontier.
In their NeurIPS 2023 paper, researchers from ETH Zürich introduce a novel method to tame this chaos, proposing a tailored mixup technique that respects the underlying physics of periodic signals.
TL;DR
This paper introduces a frequency-domain data augmentation method for quasi-periodic time series that treats phase and magnitude separately to avoid signal cancellation. By using an unsupervised latent space to scale augmentation strength based on sample similarity, the method significantly outperforms state-of-the-art contrastive learning baselines across activity recognition and healthcare tasks.
What Problem Does This Paper Address?
Contrastive learning works by pulling "positive" pairs (different views of the same data) together in a latent space while pushing "negative" pairs apart. The quality of these "views" is paramount.
In time-series analysis, a popular augmentation is Mixup—linearly interpolating between two samples. However, the authors prove that for quasi-periodic data (like PPG or ECG signals), standard Mixup is often destructive. If you blend two waves that are out of phase, they can cancel each other out (destructive interference), resulting in an augmented sample that contains zero task-relevant information. This "chaos" prevents the model from learning meaningful, class-separated representations.
Methods
The authors propose two key innovations to move from "chaos" to "order":
- Tailored Frequency-Domain Mixup: Instead of mixing raw waveforms, the method transforms signals into the frequency domain using a Fourier Transform. It then treats Magnitude and Phase as distinct features:
- Magnitude: Mixed linearly, as per standard practice.
-
Phase: Instead of linear interpolation (which causes the cancellation mentioned above), the method calculates the shortest angular path between the phases of two signals and interpolates along that path. This ensures the augmented signal maintains a coherent periodic structure.
Figure 1: The phasor representation of linear mixup a), and proposed mixup b). The anchor, randomly chosen sample, and generated instances are represented as x, ˜x, and x+, respectively. -
Latent-Space Augmentation Control: Not all pairs should be mixed equally. The authors train an unsupervised $\beta$-VAE to map samples into a latent space.
- If two samples are close in the VAE latent space (likely belonging to the same class), the method performs aggressive mixup to help the contrastive learner cluster them.
- If they are far apart, it uses a weaker mixup to prevent "collapsing" different classes into the same point.
Datasets
The researchers evaluated their method on eight diverse datasets across three major tasks:
- Human Activity Recognition (HAR): UCIHAR, HHAR, and USC-HAD (using IMU data).
- Heart Rate Prediction: IEEE SPC (SPC12 & SPC22) and DaLia (using PPG data).
- Cardiovascular Disease (CVD) Classification: CPSC2018 and the Chapman ECG dataset.
Key Insights and Ideas
- SNR Matters: The authors formalize the "SNR Matters" assumption, showing that task-relevant information in time series is often concentrated in specific frequency bands. Augmentations that destroy signal power in these bands (like destructive mixup) are mathematically guaranteed to reduce mutual information with the labels.
- Phase Sensitivity: A key finding is that the phase component is significantly more sensitive to augmentation than magnitude. Small errors in phase interpolation lead to massive performance drops, whereas magnitude is relatively robust.
- Finding Order: By using the VAE latent space, the method essentially "finds order" by identifying which samples are semantically similar without needing labels, allowing for a more principled way to choose augmentation hyperparameters ($\lambda$).
Key Results
The proposed method ("Ours") consistently outperformed both traditional augmentations and specialized SOTA methods like DACL, IDAA, and NNCLR.
- Activity Recognition: On the USC dataset, the method achieved a 60.13% accuracy, significantly higher than the next best self-supervised method (IDAA at 59.23%) and nearly double some traditional augmentation baselines.
- Heart Rate Estimation: The method achieved the lowest Mean Absolute Error (MAE) across all PPG datasets. For example, on IEEE SPC12, it reached an MAE of 16.26, compared to 19.02 for the nearest competitor.
- CVD Detection: It achieved a SOTA AUC of 95.90% on the Chapman dataset.
Limitations and Future Work
- VAE Dependency: The effectiveness of the augmentation scaling relies on the VAE learning a high-quality latent space. On very small datasets, the VAE might not capture semantic similarity accurately, leading to sub-optimal results.
- Class Scaling: As the number of classes in a downstream task increases, the probability of sampling intra-class pairs in a random batch decreases. The authors suggest that future work could explore different distance metrics or sampling strategies to maintain performance in high-cardinality settings.
- Domain Specificity: While highly effective for quasi-periodic signals, the benefits might be less pronounced for purely stochastic or non-periodic time-series data.
Summary updated