TimeSiam: A Pre-Training Framework for Siamese Time-Series Modeling
Jiaxiang Dong, Haixu Wu, Yuxuan Wang, Yunzhong Qiu, Li Zhang, Jianmin Wang, Mingsheng Long
TL;DR
TimeSiam addresses the challenge that traditional time-series pre-training methods either distort temporal structure via masking or miss fine-grained dynamics via instance-level contrastive objectives. It introduces Siamese encoders that learn correlations between randomly sampled past and current subseries, employing a mask-based past-to-current reconstruction objective and learnable lineage embeddings to distinguish temporal distances. Across 13 standard benchmarks for forecasting and classification, TimeSiam delivers state-of-the-art results in both in-domain and cross-domain settings, with gains amplified by large-scale pre-training on TSld (e.g., $1 ext{G}$ data). The approach demonstrates strong generalization, efficient representation learning, and practical potential for reducing labeling needs in real-world time-series tasks, while remaining simple and adaptable to extended inputs via lineage conditioning. Key mathematical elements include the reconstruction loss ${\cal L}_{\text{reconstruction}} = \|\mathbf{x}^{\text{curr}} - \widehat{\mathbf{x}}^{\text{curr}}\|_2^2$ and the lineage-enabled representation ${\overline{\mathbf{h}}_{e}}$ produced by averaging or concatenating lineage-conditioned encodings, ensuring diverse temporal semantics are captured across distanced subseries. $T$ denotes subseries length and $C$ the number of channels in each subseries.
Abstract
Time series pre-training has recently garnered wide attention for its potential to reduce labeling expenses and benefit various downstream tasks. Prior methods are mainly based on pre-training techniques well-acknowledged in vision or language, such as masked modeling and contrastive learning. However, randomly masking time series or calculating series-wise similarity will distort or neglect inherent temporal correlations crucial in time series data. To emphasize temporal correlation modeling, this paper proposes TimeSiam as a simple but effective self-supervised pre-training framework for Time series based on Siamese networks. Concretely, TimeSiam pre-trains Siamese encoders to capture intrinsic temporal correlations between randomly sampled past and current subseries. With a simple data augmentation method (e.g.~masking), TimeSiam can benefit from diverse augmented subseries and learn internal time-dependent representations through a past-to-current reconstruction. Moreover, learnable lineage embeddings are also introduced to distinguish temporal distance between sampled series and further foster the learning of diverse temporal correlations. TimeSiam consistently outperforms extensive advanced pre-training baselines, demonstrating superior forecasting and classification capabilities across 13 standard benchmarks in both intra- and cross-domain scenarios.
