Manuscript Offprint

arXiv:2609.02203

SMart: A Multi-source Multi-phase Time Series Representation Transfer Framework

Fang He, Wang-chien Lee

ABSTRACT

Time series representation learning (TSRL) has attracted growing research interests in recent years. Two recent explorations in TSRL are: i) exploiting a transformer-based framework to learn time series; ii) instead of using only the targeted dataset, borrowing time series from other datasets to to facilitate representation transfer. While these two explorations are shown effective, the self-supervised time series recovery task in (i) and the single-source dataset used in (ii) are technically simple and thus can be enhanced with new ideas. In this work, we propose a new TSRL framework, namely multi-source multi-phase time series representation transfer (SMart), which has two novel mechanisms to address the aforementioned deficiencies: 1) a multi-phase recurrence plots recovery task, in three alternative modes, for guiding the encoder to embed time series dynamics into the time series representation; and 2) a source dataset selector to select multiple suitable source datasets to supplement the original target dataset for pre-training the TSRL encoder. Experimental results show that SMart outperforms several state-of-the-art models for time series representation learning, classification and regression on both uni-variate and multi-variate time series datasets, reducing mean absolute error up to 19.5% for time series regression, and increasing average accuracy up to 1.34% for time series classification.

1 INTRODUCTION

A time series is a sequence of observations over time, where each observation consists of the values of one or multiple variables at a time point. Time series data is ubiquitous in the real world, e.g., water levels, human activities and stock prices over time, which may be mined by data mining tasks such as time series classification [6, 36], regression [40], forecasting [13, 15] and clustering [14, 22]. To provide general support for various downstream applications, time series representation learning (TSRL), aiming to learn representations of input time series for use as general-purpose features, has been widely studied. Among them, some works focus on learning time series representations for time series of specific types [31–33], while others target on general time series without being limited to certain types [27, 28, 40], which is also the target of our work. Recently, Zerveas et al. propose a state-of-the-art TSRL framework, called Time Series Transformer (TST), to learn representations for general-type time series with a self-supervised time series recovery task (self-recovery task in short) [40]. Specifically, the self-recovery task challenges an encoder in TST to extract features from a masked input time series as its representation, which in turn is fed into a decoder to recover the masked part of the input time series. While the self-recovery task is shown effective for TSRL, we suggest that

Figure

Figure 1: SMart Framework

adding some useful decoding tasks may further challenge the encoder to enrich the learned representations. Thus, in this paper, we explore additional self-supervised tasks for TSRL.

Another aspect explored in this work is the issue of data sparsity. Many TSRL frameworks (including TST) face this issue in training the encoder, due to the limited number of time series in a target dataset. To address the issue, some works exploit the idea of representation transfer, i.e., borrowing time series in additional source datasets to pre-train an encoder for use in TSRL on a target dataset. Recently, Fawaz et al. propose DTW-FCN, where a DTW-based similarity metric is designed to find a source dataset most similar with the target dataset to facilitate representation transfer. However, the manually designed DTW-based similarity metric may not pick a beneficial source dataset for a target dataset. Moreover, these existing works do not explore multiple source datasets which we believe may further benefit representation transfer to improve TSRL.

Based on the observations above, we aim to explore the ideas of incorporating new self-supervised tasks for TSRL and using multi-source datasets for pre-training in TSRL. To realize these ideas in a coherent TSRL framework, two research problems arise: 1) the design of a TSRL model with new and complementary self-supervised tasks.

Our approach is to challenge our proposed model to recover the time series dynamics, in addition to the time series itself. We notice the ability of recurrence plots (RP) to reveal the time series dynamics in terms of how time series status at different time points are correlated with each other, and thus propose the Recurrence Plot (RP) Recovery Task to decode the time series representation to RPs in order to supplement the self-recovery task. Owing to the rich multi-granularity time series dynamics embedded in the RPs constructed in different phases, we design three alternative decoding modes to regularize the learned representations in order for them to recover RPs in different phase spaces in different ways; and 2) the selection of (multiple) source datasets which are beneficial to time series representation transfer. Our approach is to formulate the selection of source datasets as a binary classification problem: given a target dataset T and a candidate dataset C to serve as a source of representation transfer, we train a classifier to predict whether C as a source dataset benefits TSRL for T or not, i.e., increase the performance on downstream time series applications (e.g., classification and regression) or not. Specifically, we propose to learn a neural-network-based Source Selector as the classifier. As such, we can feed each pair of candidate source dataset and the target dataset to the Source Selector to decide whether to select this candidate source dataset for representation transfer. One issue here is how to represent a (whole) dataset as an input to the Source Selector. Some works use the most representative time series in the dataset as the representation. However, time series in a dataset may vary (e.g., the water level time series recorded in four seasons), making it difficult to find one most representative time series. To address the issue, we propose a novel idea, i.e., use the encoder parameters obtained by pre-training an encoder with the time series dataset as the representation of the whole dataset. The idea aims to explore the relevance between the ways of extracting meaningful features (represented by the encoder parameters) from target dataset T and the candidate dataset C in order to decide whether to use C as a source dataset in representation transfer for T. We design a cross-attention mechanism in the Source Selector to capture the relevance between the encoder parameters.

To realize the aforementioned ideas for TSRL, we propose the Multi-Source Multi-Phase representation transfer (SMart) framework, which follows the pipeline in Figure 1: 1) Build a self-supervised Time Series Model (TM) which consists of an encoder and several decoders corresponding to the self-recovery and RP-recovery tasks. In TM, there are three alternative decoding modes to recover various RPs in order to capture multi-granularity time series dynamics; 2) Learn a cross-attention based Source Selector that captures the relevance between encoder parameters of TMs for source selection; 1^{1} 3) Exploit the learned Source Selector to select multiple source datasets for the target dataset; 4) Pre-train a TM with all the selected source datasets and the target dataset; 5) Transfer the encoder in the pre-trained TM in Step 4 to generate representations for each time series in the target dataset and build tailored application decoders to decode these representations to support downstream tasks; 2^{2} and 6) Fine-tune the encoder and train the application decoder together, for each downstream application.

We evaluate SMart against the state-of-the-art i) unsupervised TSRL frameworks, e.g., TST, DTW-FCN and TS2Vec; and ii) time series classifiers and regressors, such as ROCKET, Rel-CNN and TimeNet. Experimental results show that SMart outperforms all these baselines in both time series classification and regression.

The major contributions made in this work are as follows.

We propose a novel framework, SMart, for TSRL by integrating the ideas of challenging its encoder to enrich the time series representation in order to recover the dynamics in time series and pre-training encoders with multiple selected source datasets for representation transfer.

We exploit recurrence plots in multiple phase spaces as additional decoding targets to embed the multi-granularity time series dynamics into time series representations.

We propose a novel cross-attention based Source Selector to select multiple beneficial source datasets to pre-train the time series encoder for use on the target dataset. We explore the use of encoder parameters as the dataset representation.

Empirical evaluations show that SMart outperforms the state of the arts by significantly reducing the mean absolute error (MAE) by 19.5% for regression, while competitively improving the accuracy by 1.34% for classification.

References (17)