NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Shapelet-based Framework for Unsupervised Multivariate Time Series Representation Learning

Zhiyu Liang, Jianfeng Zhang, Chen Liang, Hongzhi Wang, Zheng Liang, Lujia Pan

Abstract

Unsupervised Representation Learning (URL) for Multivariate Time Series (MTS) often relies on black-box architectures borrowed from computer vision, which can struggle with high noise and diverse temporal scales. We introduce Contrastive Shapelet Learning (CSL), the first unsupervised framework that utilizes "shapelets"—salient, representative snippets of data—to learn discriminative features. CSL employs a novel Shapelet Transformer (ST) to learn shapelets as trainable parameters across multiple scales. By combining multi-grained contrastive learning with multi-scale alignment, CSL achieves state-of-the-art performance across classification, clustering, and anomaly detection tasks while providing superior interpretability and significant speedups for downstream applications.

Introduction

Multivariate Time Series (MTS) data are ubiquitous in modern industrial and medical applications, yet obtaining high-quality labels remains a significant challenge. While Unsupervised Representation Learning (URL) aims to extract meaningful features without labels, current methods often "copy-paste" architectures like CNNs or Transformers designed for images and text. These models frequently rely on the "neighbor similarity" assumption, which fails in periodic data where distant points may be more similar than adjacent ones.

CSL addresses these limitations by focusing on shapelets—discriminative subsequences that capture the essence of a signal regardless of its temporal position. This approach moves away from abstract filters toward interpretable, time-series-specific patterns.

Methods

The CSL framework consists of two primary components: the Shapelet Transformer (ST) architecture and a specialized contrastive training objective.

Overview of the Contrastive Shapelet Learning (CSL) framework, illustrating the augmentation process, the Shapelet Transformer encoder, and the multi-level contrastive losses.

Shapelet Transformer (ST)

Unlike traditional methods that require exhaustive shapelet searching, the ST learns shapelets as trainable parameters. It captures patterns at various temporal scales and uses multiple distance metrics (Euclidean, Cosine, and Cross-correlation) to ensure feature robustness.

Detailed architecture of the Shapelet Transformer (ST) and its sub-modules, showing how shapelets are used to transform input data into multi-scale representations.

Multi-grained Contrasting and Alignment

To train without labels, CSL generates two augmented "views" of the data (e.g., via jittering or time-warping). The model is optimized to maximize similarity between views of the same sample while minimizing similarity with "negative" samples. This is performed at both a coarse level (entire embedding) and a fine level (individual scales). Additionally, a Multi-scale Alignment component encourages consistency across different shapelet lengths, ensuring that short-term and long-term features are mathematically correlated.

Experimental Setup

The framework was evaluated across a diverse set of benchmarks:

  • 30 UEA Datasets: Standard benchmarks for MTS classification and clustering.
  • 4 Anomaly Detection Datasets: Real-world monitoring data from NASA (SMAP, MSL) and server environments (SMD, ASD).
  • Long Series Benchmarks: Datasets with sequences exceeding 230,000 timestamps to evaluate scalability.

Results and Discussion

CSL demonstrates significant improvements over existing unsupervised methods like TS2Vec and TST.

Performance and Scalability

  • Classification: CSL outperformed competitors on 21 of 30 UEA datasets, even surpassing several state-of-the-art supervised models.
  • Anomaly Detection: On the MSL dataset, CSL achieved a 30% improvement in F1-score over the next best method.
  • Efficiency: By compressing complex series into compact feature vectors, CSL enables downstream classification up to 140x faster than raw data processing.

Interpretability and Pre-training

A key advantage of CSL is its "white-box" nature; learned shapelets can be visualized to understand the prototypical signals the model identifies. Furthermore, CSL serves as an effective pre-trainer: a model fine-tuned with only 20% of labels on CSL features matched the performance of a fully supervised model using 50% of the labels.

Conclusion

CSL represents a shift toward domain-specific unsupervised learning for time series. While highly effective, the framework faces challenges with extremely high-dimensional data (e.g., >1,000 dimensions), suggesting a "curse of dimensionality" for shapelet-based approaches. Future research will focus on automated shapelet pruning and more rigorous interpretability methods.

Summary updated

BibTeX
@article{liang2023shapelet,
  author = {Zhiyu Liang and Jianfeng Zhang and Chen Liang and Hongzhi Wang and Zheng Liang and Lujia Pan},
  title = {{A Shapelet-based Framework for Unsupervised Multivariate Time Series Representation Learning}},
  journal = {Proc. VLDB Endow.},
  year = {2023},
  doi = {10.14778/3632093.3632103},
}
Figure