Introduction
Deep learning has revolutionized fields like computer vision, but its "hunger" for labeled data remains a significant barrier in specialized domains. In time-series applications—such as EEG monitoring, IoT sensors, or industrial machinery—labeling is often a complex task requiring expensive domain expertise. Unlike images, where a layperson can identify objects, time-series signals are often unintuitive to the untrained eye.
TS-TCC (Time-Series Temporal and Contextual Contrasting) is a self-supervised framework designed to bridge this gap. By leveraging the inherent temporal dependencies of these signals, it learns powerful representations from unlabeled data, achieving performance comparable to supervised learning even when labeled data is scarce.
The TS-TCC Framework
The TS-TCC framework operates through a three-stage process that emphasizes both local temporal patterns and global context:
- Dual-View Augmentation: For every input sample, the model creates two versions: a weak augmentation (adding small variations in scale and jitter) and a strong augmentation (randomly shuffling segments of the signal and adding jitter).
- Temporal Contrasting (TC): This module uses a Transformer-based architecture to perform a "tough" cross-view prediction task. The model looks at the past of one view (e.g., the strong augmentation) and attempts to predict the future timesteps of the other view (the weak augmentation). This forces the model to learn robust features that are invariant to specific perturbations.
- Contextual Contrasting (CC): While TC focuses on local temporal patterns, the CC module looks at the "big picture." It uses a contrastive loss to ensure that the overall summary (context) of two different views of the same sample are similar, while summaries of different samples are pushed apart in the feature space.
Experimental Results
The authors evaluated TS-TCC on four diverse real-world datasets: Human Activity Recognition (HAR), Sleep-EDF (EEG), Epilepsy (EEG), and a mechanical Fault Diagnosis (FD) dataset.
Label Efficiency
A key finding is the framework's remarkable label efficiency. In scenarios where labeled data is extremely limited, TS-TCC significantly outperforms traditional supervised methods. For example, on the HAR dataset, it achieved approximately 70% accuracy with just 1% of the labels, whereas supervised learning struggled to reach 50%. With only 10% of labeled data, the model reaches performance levels comparable to supervised models trained on 100% of the data.
Transfer Learning and Generalization
TS-TCC also excels in transfer learning. When trained on one industrial "working condition" and tested on another, the framework outperformed supervised training in 8 out of 12 scenarios. This suggests that the learned features are generalizable and capture the underlying dynamics of the data rather than overfitting to specific experimental setups.
Conclusion
TS-TCC demonstrates that self-supervised learning can effectively handle the unique challenges of time-series data. By combining cross-view temporal predictions with global contextual contrasting, the framework provides a robust solution for representation learning in domains where expert labels are a bottleneck. Future work may involve designing more domain-specific augmentations, such as frequency-domain shifts, to further enhance the discriminative power of the learned features.
Summary updated