Introduction
Time series classification is a critical task in domains ranging from healthcare to finance. While unlabeled data is often abundant, obtaining high-quality labels is expensive and time-consuming. The traditional approach to this challenge is a two-stage "pre-train then fine-tune" framework. However, this paradigm often suffers from a disconnect: the unsupervised pre-training phase is agnostic to the final classification task, potentially leading to sub-optimal representations that do not effectively distinguish between specific classes.
The SLOTS Framework
To address these limitations, we introduce SLOTS (Semi-supervised Learning fOr Time clasSification), an end-to-end framework that jointly optimizes for both representation learning and classification. By processing labeled and unlabeled data simultaneously, SLOTS ensures that supervised signals help shape the embedding space from the beginning of training.
Architecture and Hybrid Loss
The SLOTS architecture consists of a dilated convolutional encoder—optimized with separable convolutions to reduce parameter count by 33%—and a linear classifier. The core innovation lies in its hybrid loss function, which combines three distinct objectives:
- Unsupervised Contrastive Loss ($L_u$): Encourages the model to learn invariant features by bringing different augmentations of the same unlabeled sample closer in the embedding space.
- Supervised Contrastive Loss ($L_s$): Leverages available labels to cluster embeddings of the same class while separating different classes, acting as a force multiplier for discriminative power.
- Classification Loss ($L_c$): A standard cross-entropy loss that directly optimizes for label prediction.
Experimental Evaluation
SLOTS was evaluated on five diverse datasets: EEG data for emotion recognition (DEAP and SEED), seizure detection (EPILEPSY), human activity recognition (HAR), and sepsis prediction (P19). It was compared against ten state-of-the-art baselines, including TS2Vec, SimCLR, and TFC.
Key Results
The end-to-end approach consistently outperformed the traditional two-stage paradigm. SLOTS achieved significant performance gains, particularly in scenarios with limited labeled data. For instance, on the DEAP dataset with only 10% labels, SLOTS improved the F1 score by 16.10% over two-stage baselines.
As shown in the results table, SLOTS (end-to-end) achieves the highest scores across nearly all metrics (Accuracy, F1, AUROC, etc.) for the SEED, P19, EPILEPSY, and HAR datasets. Even when baselines were adapted into end-to-end versions (indicated by "++"), SLOTS maintained its lead, validating the effectiveness of its specific hybrid loss formulation. Notably, the framework delivers these improvements while maintaining computational efficiency comparable to two-stage methods.
Conclusion
SLOTS demonstrates that an end-to-end semi-supervised approach is superior to the conventional two-stage framework for time series classification. By integrating supervised and unsupervised signals into a single training step, the model achieves better discriminative power and robustness to label scarcity. While the end-to-end nature may slightly limit domain transferability compared to pure pre-training, the performance gains on specific tasks make it a powerful tool for real-world time series applications.
Summary updated