Abstract
This paper introduces Dual Prototypical Shapelet Networks (DPSN), a novel framework designed for few-shot time-series classification. It addresses the "black box" nature of deep learning by providing dual interpretability: identifying both a global representative sample for a class and the specific, local subsequences (shapelets) that drive the model's decision. Experimental results on 18 few-shot datasets demonstrate that DPSN outperforms traditional baselines on severely limited data while providing human-verifiable reasoning.
Introduction
While few-shot learning has seen massive success in computer vision and natural language processing, time-series data has been largely neglected. This is a critical gap because labeling time-series data—such as medical ECGs or seismic activity—often requires expensive domain expertise. Furthermore, as edge computing and personalized wearables become ubiquitous, devices must learn from a specific user's limited data (e.g., a smartwatch learning a unique irregular heartbeat from just a few occurrences).
In high-stakes domains like healthcare, accuracy alone is insufficient; models must be interpretable so human experts can trust and verify their reasoning. DPSN bridges this gap by combining efficient metric learning with statistical shapelet extraction.
The DPSN Framework
The authors propose the Dual Prototypical Shapelet Network (DPSN), an end-to-end framework that integrates feature engineering, metric learning, and statistical analysis.
- Feature Extraction: Instead of feeding raw data into a CNN, DPSN uses Symbolic Fourier Approximation (SFA) to extract dense, time-invariant frequency features, naturally filtering out high-frequency noise.
- Prototypical Network: A neural network maps these SFA features into a metric space. For each class, it calculates a "prototype" (the mean vector of the class's embedded features). New samples are classified based on their Euclidean distance to these prototypes.
- Dual Interpretability:
- Global Overview (Representative Shapelets): The model identifies the actual training sample whose embedding is closest to the mathematical prototype, serving as the "archetype" for the class.
- Local Highlights (Discriminative Shapelets): Using a sliding window and an F-test, the model identifies the exact subsequence that best distinguishes one class from another.
Experimental Evaluation
Because few-shot time-series benchmarks are rare, the authors derived 18 few-shot datasets from the UCR Time Series Classification Archive. They specifically tested extreme scenarios, such as 6-shot and 8-shot configurations.
Quantitative Results
DPSN was compared against two strong traditional baselines: BOSS (which also uses SFA) and Shapelet Transform (ST). In the 6-shot scenario, DPSN achieved the best accuracy on 14 out of the 18 datasets, boasting an average accuracy rank of 1.25, significantly outperforming BOSS (2.25) and ST (2.5).
Qualitative Analysis: ECG Interpretation
In a medical context using the ECG200 dataset (Normal vs. Myocardial Infarction/Ischemia), DPSN successfully isolated the prolonged recovery time (ST-segment depression) as the discriminative shapelet. This finding perfectly aligns with actual medical diagnostic criteria, demonstrating that the model's internal logic is clinically relevant.
Key Insights and Discussion
- Interpretability vs. Representation: The extracted shapelets often appear smoother than raw data because the SFA feature extraction drops high-frequency noise. This confirms the model is focusing on robust, structural features rather than artifacts.
- The Power of Hybrid Models: By using SFA (a traditional feature) instead of a 1D-CNN for initial extraction, the model achieves time-invariance and avoids overfitting on tiny training sets.
- Limitations: DPSN currently assumes a single prototype per class. If a class contains multiple distinct clusters (e.g., two wildly different valid shapes for one category), the "average" prototype may fail to represent the class accurately. Future work involves implementing "infinite mixture prototypes" to handle such intra-class variability.
Conclusion
DPSN offers a robust solution for time-series classification where data is scarce and interpretability is paramount. By providing both global archetypes and local discriminative features, it empowers domain experts to verify deep learning decisions in critical applications.
Summary updated