ShapeFormer: Shapelet Transformer for Multivariate Time Series Classification
Xuan-May Le, Ling Luo, Uwe Aickelin, Minh-Tuan Tran
Abstract
Multivariate time series classification (MTSC) has attracted significant research attention due to its diverse real-world applications. Recently, exploiting transformers for MTSC has achieved state-of-the-art performance. However, existing methods focus on generic features, providing a comprehensive understanding of data, but they ignore class-specific features crucial for learning the representative characteristics of each class. This leads to poor performance in the case of imbalanced datasets or datasets with similar overall patterns but differing in minor class-specific details. In this paper, we propose a novel Shapelet Transformer (ShapeFormer), which comprises class-specific and generic transformer modules to capture both of these features. In the class-specific module, we introduce the discovery method to extract the discriminative subsequences of each class (i.e. shapelets) from the training set. We then propose a Shapelet Filter to learn the difference features between these shapelets and the input time series. We found that the difference feature for each shapelet contains important class-specific features, as it shows a significant distinction between its class and others. In the generic module, convolution filters are used to extract generic features that contain information to distinguish among all classes. For each module, we employ the transformer encoder to capture the correlation between their features. As a result, the combination of two transformer modules allows our model to exploit the power of both types of features, thereby enhancing the classification performance. Our experiments on 30 UEA MTSC datasets demonstrate that ShapeFormer has achieved the highest accuracy ranking compared to state-of-the-art methods. The code is available at https://github.com/xuanmay2701/shapeformer.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers15
- LaS-Comp: Zero-shot 3D Completion with Latent–Spatial ConsistencyWeilong Yan, Li Haipeng, Hao Xu, Nianjin Ye et al.CVPR 2026 · 14 citations
- ShapeX: Shapelet-Driven Post Hoc Explanations for Time Series Classification ModelsBosong Huang, Ming Jin, Yuxuan Liang, Johan Barthelemy et al.NeurIPS 2025 · 8 citations
- Thicker and Quicker: The Jumbo Token for Fast Plain Vision TransformersAnthony Fuller, Yousef Yassin, Daniel G. Kyrollos, Evan Shelhamer et al.ICLR 2026 · 5 citations
- Accurate and Efficient Multivariate Time Series Forecasting via Offline ClusteringYiming Niu, Jinliang Deng, Lulu Zhang, Zimu Zhou et al.ICDE 2025 · 4 citations
- Effective Node-Level Anomaly Detection in HPC Systems via Coarse-Grained Clustering and Fine-Grained Model SharingSibo Xia, Yongqian Sun, Xijie Pan, Yuan Yuan et al.SC 2025 · 3 citations
Builds on15
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- One Fits All: Power General Time Series Analysis by Pretrained LMTian Zhou, Peisong Niu, Xue Wang, Liang Sun et al.NeurIPS 2023 · 1,178 citations
- TS2Vec: Towards Universal Representation of Time SeriesZhihan Yue, Yujing Wang, Juanyong Duan, Tianmeng Yang et al.AAAI 2022 · 938 citations
- A Time Series is Worth 64 Words: Long-term Forecasting with TransformersYuqi Nie, Nam H. Nguyen, Phanwadee Sinthong, Jayant KalagnanamICLR 2023 · 536 citations
- TimesNet: Temporal 2D-Variation Modeling for General Time Series AnalysisHaixu Wu, Tengge Hu, Yong Liu, Hang Zhou et al.ICLR 2023 · 423 citations
Related papers
- SVP-T: A Shape-Level Variable-Position Transformer for Multivariate Time Series ClassificationRundong Zuo, Guozhong Li, Byron Choi, Sourav S. Bhowmick et al.AAAI 2023 · 53 citations
- Adversarial Dynamic Shapelet NetworksQianli Ma, Wanqing Zhuang, Sen Li, Desen Huang et al.AAAI 2020 · 34 citations
- Learning Soft Sparse Shapes for Efficient Time-Series ClassificationZhen Liu, Yicheng Luo, Boyuan Li, Emadeldeen Eldele et al.ICML 2025
- TSec: An Efficient and Effective Framework for Time Series ClassificationYuanyuan Yao, Hailiang Jie, Lu Chen, Tianyi Li et al.ICDE 2024 · 7 citations
- A Shapelet-based Framework for Unsupervised Multivariate Time Series Representation LearningZhiyu Liang, Jianfeng Zhang, Chen Liang, Hongzhi Wang et al.VLDB 2024 · 19 citations
