Abstract
Deep learning models for Multivariate Time Series Classification (MTSC) often struggle in few-shot scenarios due to overfitting and sensitivity to outliers. We present COSCO (Centroid Oriented Sharpness-Controlled Optimization), a framework that combines Sharpness-Aware Minimization (SAM) with a Prototypical Loss function. By seeking flatter minima in the loss landscape and utilizing distance-based classification, COSCO achieves superior generalization. Evaluations on 21 UEA datasets demonstrate that COSCO outperforms state-of-the-art baselines in 1-shot and 10-shot settings.
Introduction
Multivariate Time Series Classification (MTSC) is critical in domains ranging from healthcare (e.g., EEG monitoring) to human activity recognition. While Deep Neural Networks (DNNs) have set new benchmarks in MTSC, they typically require large-scale labeled datasets. In many practical applications, obtaining such data is difficult, leading to "few-shot" scenarios where only a handful of examples per class are available.
In these data-scarce environments, standard DNNs are prone to overfitting. They often converge to "sharp" local minima—points where the training loss is low, but slight perturbations in model weights lead to significant performance degradation on unseen data. Furthermore, traditional loss functions like Cross-Entropy can be overly sensitive to outliers when the training set is small.
Methodology: The COSCO Framework
The proposed COSCO framework addresses these challenges through two primary mechanisms:
- Sharpness-Aware Minimization (SAM): Instead of minimizing training loss alone, SAM seeks parameters that lie in regions of low loss and low curvature (flatness). It employs a "perturb-then-update" strategy, finding a nearby weight configuration with the highest loss and then updating the model to minimize that maximum loss. This encourages the model to settle in a "flat" region, which is empirically linked to better generalization.
- Prototypical Loss: COSCO replaces the standard fully connected classification layer with a distance-based approach. It maps time series into an embedding space and computes a "prototype" (centroid) for each class. Classification is performed based on the proximity of an instance to these prototypes. This reduces the number of parameters and increases robustness against outliers.
Experimental Setup
The framework was evaluated on 21 multivariate datasets from the UEA Time Series Classification Archive, spanning categories such as Audio, EEG, Human Activity Recognition (HAR), and Motion. The experiments focused on 1-shot and 10-shot benchmarks to simulate extreme data scarcity.
Results and Analysis
COSCO was compared against established baselines, including 1NN-DTW, 1NN-ED, TapNet, and a standard ResNet.
As shown in the results table, COSCO achieved the best average rank across all datasets in both 1-shot (2.333) and 10-shot (2.429) settings. In the 10-shot scenario, COSCO reached an average accuracy of 70.5%, surpassing the vanilla ResNet and the classic 1NN-DTW baseline. Notable performance gains were observed in specific datasets; for instance, in PEMS-SF (10-shot), COSCO outperformed the next best model by over 6%.
Ablation Study
To understand the contribution of each component, the authors conducted an ablation study. Removing either the Prototypical Loss (PL) or the SAM optimization resulted in a decline in average rank, confirming that both "flatness" in the loss landscape and "centroid-oriented" classification are vital for few-shot MTSC.
Conclusion
COSCO demonstrates that for few-shot time series classification, the optimization strategy is as crucial as the architecture. By prioritizing "flat" minima and simplifying the classification boundary through prototypes, COSCO provides a robust framework for learning from limited data. Future work may involve exploring the framework's compatibility with Transformer-based backbones and optimizing the computational overhead introduced by SAM's dual-pass training.
Summary updated