Abstract: Advancements in self-supervised pre-training (SSL) have significantly advanced the field of learning transferable time series representations, which can be very useful in enhancing the downstream task. Despite being effective, most existing works struggle to achieve cross-domain SSL pre-training, missing valuable opportunities to integrate patterns and features from different domains. The main challenge lies in the significant differences in the characteristics of time-series data across different domains, such as variations in the number of channels and temporal resolution scales. To address this challenge, we propose CrossTimeNet, a novel cross-domain SSL learning framework to learn transferable knowledge from various domains to largely benefit the target downstream task. One of the key characteristics of CrossTimeNet is the newly designed time series tokenization module, which could effectively convert the raw time series into a sequence of discrete tokens based on a reconstruction optimization process. Besides, we highlight that predicting a high proportion of corrupted tokens can be very helpful for extracting informative patterns across different domains during SSL pre-training, which has been largely overlooked in past years. Furthermore, unlike previous works, our work treats the pre-training language model (PLM) as the initialization of the encoder network, investigating the feasibility of transferring the knowledge learned by the PLM to the time series area. Through these efforts, the path to cross-domain pre-training of a generic time series model can be effectively paved. We conduct extensive experiments in a real-world scenario across various time series classification domains. The experimental results clearly confirm CrossTimeNet's superior performance.
Introduction
In fields like computer vision and natural language processing, "foundation models" (e.g., CLIP, GPT) have revolutionized the ability to transfer knowledge from massive datasets to specific tasks. Time series analysis, however, has remained fragmented. Most models are trained from scratch on small, domain-specific datasets, such as ECG readings or stock prices. This stagnation is primarily due to two hurdles: data scarcity in specialized domains and domain discrepancy, where signals from different sources (e.g., brain waves vs. weather sensors) vary fundamentally in temporal resolution and channel counts.
Methodology
To overcome these challenges, we propose CrossTimeNet, a framework designed to learn transferable knowledge across diverse domains. The architecture follows a three-stage pipeline:
- Time Series Tokenization: Continuous signals are converted into discrete tokens to standardize inputs across domains. This is achieved using a Temporal Convolutional Network (TCN) autoencoder paired with Vector Quantization (VQ), turning time series patches into a sequence of "visual words" from a learned codebook.
- Language Model Backbone: Instead of random initialization, CrossTimeNet leverages a pre-trained BERT model. To bridge the gap between time series tokens and text, a "word mapping" strategy randomly assigns each time series token to a word in BERT's existing vocabulary.
- Cross-Domain Pre-training: The model undergoes self-supervised pre-training using Masked Token Prediction (MTP). By masking a high proportion of tokens (up to 45%), the model is forced to learn robust temporal dependencies.
Experimental Setup
CrossTimeNet was evaluated on a wide range of real-world datasets:
- Classification: Human Activity Recognition (HAR), Sleep-EDF (EEG), and the China Physiological Signal Challenge (ECG).
- Forecasting: Electricity Transformer Temperature (ETT), Weather (climate indicators), and daily currency Exchange rates.
These datasets represent significant diversity, with channel counts ranging from 2 to 21 and classification categories from 6 to 27.
Results and Discussion
Experimental results confirm that CrossTimeNet consistently outperforms state-of-the-art baselines like TS2Vec and SimMTM.
Key Insights
- PLM as a Prior: A surprising finding is that a model pre-trained on human language (BERT) provides a superior initialization for time series compared to random initialization. The sequence dependency patterns learned from text transfer effectively to numerical data.
- Bidirectionality and Masking: Bidirectional models (BERT) significantly outperformed unidirectional ones (GPT-2), highlighting the importance of both past and future context in time series. Furthermore, a high masking ratio of 45% was found to be optimal for extracting informative patterns across domains.
- Data Efficiency: CrossTimeNet demonstrated remarkable robustness to sparse data, maintaining high performance even when training sets were significantly reduced.
Conclusion
CrossTimeNet successfully paves the way for cross-domain pre-training in time series analysis by treating pre-trained language models as a foundational encoder. While the empirical results are strong, future work will focus on providing a theoretical grounding for this cross-modality transfer and exploring the potential of generative LLMs for complex forecasting and synthesis tasks.
Summary updated