Towards GPU memory-aware efficient contrastive shapelet learning for unsupervised representation learning in multivariate time series
摘要
Unsupervised representation learning (URL) has great potential for multivariate time series analytics due to its capability to learn generalizable representation for many downstream tasks without using expensive labels. However, existing URL methods usually adopt the models originally designed for other domains (e.g. vision and language) to encode the time series data and rely on strong assumptions to design learning objectives, which limits their representation ability. To address these problems, we propose a novel URL framework for multivariate time series that aims to learn shapelet-based representation specific to time series via contrastive learning. To the best of our knowledge, we are the first to explore shapelet-based embedding in general-purpose URL. To achieve this goal, we particularly design a unified shapelet-based encoder and a novel learning objective of multi-grained contrasting and multi-scale alignment, and develop a data augmentation library to improve the generalization. To further enable efficient training under constrained GPU memory based on the widely used activation checkpointing (AC) technique, considering the limitations of existing general AC planning methods, we propose the first memory-aware AC planner customized for our shapelet-based model. We conduct extensive experiments using tens of real-world datasets and evaluate our proposal on many downstream tasks, e.g., classification, clustering, anomaly detection, etc. The results demonstrate the superiority of our method against not only URL competitors, but also techniques specially designed for downstream tasks, and showcase the effectiveness of our AC planner in improving training efficiency with limited GPU memory. Our code has been made publicly available at https://github.com/real2fish/CSL.