Source-linked AI summary

Towards a universal neural network encoder for time series

Joan Serrà, Santiago Pascual, Alexandros Karatzoglou

arXiv:1805.03908v1cs.LGcs.NEstat.ML

TL;DR

Time series vary in length and dimensionality, and the paper targets representations that generalize to data types absent from encoder training. It builds a convolutional encoder with temporal attention and evaluates no, partial, and full adaptation on classification benchmarks. These strategies are reported as competitive with state of the art, alongside compact representations and few training iterations.

  • Problem

    The paper addresses whether learned representations can generalize to unseen time series data types, amid variable-length, high-dimensional series and scarce labels.

    Source: §1 · pp. 1–2
  • Method

    A convolutional neural network with convolutional attention summarizes temporal outputs into compact fixed-length representations, which are evaluated with no, partial, and full adaptation.

    Source: §1 · p. 1, §3.1 · p. 3
  • Results

    No-adaptation, mapping-adaptation, and full-adaptation approaches are competitive with state of the art; full adaptation is beaten only by the top baselines described in the results.

    Source: §5.1 · p. 7, §6 · p. 8
  • Takeaways & Limitations

    The approaches combine competitive performance with compact reusable representations and few training iterations.

    Source: §6 · p. 8

    The reported study is restricted to classifying out-of-sample data sets from unseen time series types.

    Source: §6 · p. 8

Abstract

from arXiv · show

We study the use of a time series encoder to learn representations that are useful on data set types with which it has not been trained on. The encoder is formed of a convolutional neural network whose temporal output is summarized by a convolutional attention mechanism. This way, we obtain a compact, fixed-length representation from longer, variable-length time series. We evaluate the performance of the proposed approach on a well-known time series classification benchmark, considering full adaptation, partial adaptation, and no adaptation of the encoder to the new data type. Results show that such strategies are competitive with the state-of-the-art, often outperforming conceptually-matching approaches. Besides accuracy scores, the facility of adaptation and the efficiency of pre-trained encoders make them an appealing option for the processing of scarcely- or non-labeled time series.

1. Introduction

Time series pose challenges including variable lengths, high dimensionality, temporal structure, and scarce labels. The paper proposes a convolutional attention encoder for fixed-length representations intended to generalize to unseen data types, evaluated on classification data sets.

1. Introduction

  • Time series commonly vary in length and dimensionality, contain temporal correlations, periodicities, and drifts, and may have few labeled examples.The UEA/UCR repository spans data sets with 40 to 16,637 instances and lengths or dimensionalities from 24 to 2,709 samples.Source: §1 · p. 1
  • The encoder combines convolutions for local and temporal correlations with time-wise attention that summarizes variable-length representations into fixed-length vectors.It is trained across varied data sets to produce representations intended to work on unseen data types with minimal or no adaptation.Source: §1 · pp. 1–2
  • The evaluation focuses on time series classification, using data sets organized by type to test transfer to an unseen type.The motivating example is labeling ECG data without encoder-training examples of ECG, with minimal or no learning on the target data.Source: §1 · p. 2

2. Related Work

The section contrasts multi-task and transfer learning with universal encoders, then reviews the limited prior work applying time series encoders to new classification tasks. It situates these approaches against competitive ensemble classifiers and standard time series baselines.

2. Related Work

  • Universal encoders learn reusable representations for varied tasks and novel tasks with minimal or no adaptation; prior sentence-encoding work found supervised or mixed-data encoders outperform purely unsupervised ones.This approach is framed against multi-task learning, which may require target data and parallel retraining, and transfer learning, which assumes labeled target data.Source: §2 · p. 2
  • Time series classification is a testbed for universal encoders, but prior work on encoders reused for new classification tasks was limited to the authors' knowledge.Malhotra et al. [22] used seq2seq autoencoders trained to reconstruct time series, then adapted through an RBF-kernel SVM with accuracy marginally above DTW nearest-neighbor classification.Source: §2 · pp. 2–3
  • Ensemble methods such as COTE and HIVE-COTE are described as the most competitive time series classifiers, while deep networks have struggled with short series and small training sets.Canonical raw-series baselines include elastic-distance nearest neighbors such as DTW and feature-based classifiers.Source: §2 · p. 3

3. Towards a Universal Encoder for Time Series

The encoder uses a convolutional network and time-wise attention to produce a fixed-dimensional representation, designed with simplicity and computational efficiency in mind. It is trained across data sets through dataset-specific classification heads and repeated batch updates.

3.1. Architecture

  • The design prioritizes conceptual simplicity and computational lightness to support explanation, deployment, transfer between users, and speed.The authors also identify simplicity as interesting for implicit regularization.Source: §3.1 · p. 3
  • Convolutional attention summarizes time-wise filter outputs, and a fully connected layer sets the representation dimensionality; the encoder uses three convolutional blocks with two max-pooling layers.The convolutional block comprises a 1D convolution, instance normalization, PReLU activation, and dropout; instance normalization after the attention output was found to aid training and stabilize output ranges.Source: §3.1 · p. 3, Figure 1 · p. 4

3.2. Implementation Details

  • The three convolutional layers use 128, 256, and 512 filters, kernels of 5, 11, and 21, and dropout of 0.2.Half of the final layer's filters feed the time-wise softmax, while the other half are combined with the resulting attention vectors.Source: §3.2 · p. 4

3.3. Training

  • Training cycles through every training data set using a dataset-specific classification head, with 20 single-batch forward-backward passes per data set in each epoch.The method uses stochastic gradient descent at learning rate 0.005, reduces it after validation loss stalls for more than 10 epochs, and stops below 10^-4.Source: §3.3 · p. 4

4. Evaluation Methodology

The evaluation holds out one data type at a time, measures classification performance across the repository, and compares no, partial, and full encoder adaptation.

4.1. Data and Splitting

  • Seven data-type folds hold out every dataset of one type for testing, while the remaining datasets are split 80/20 per dataset for encoder training and validation.At test time, the repository’s original train/test split is used; the train split supports any fine-tuning and classifier fitting, and the test split is reserved for accuracy.Source: §4.1 · pp. 4–5

4.2. Measures

  • Evaluation reports accuracy, normalized accuracy ratio, average rank, and the number of datasets where an approach performs best.The normalized ratio accounts for class distribution and task difficulty; Table 1 summarizes selected approaches over 85 datasets and 36 baselines, using k = 256 for encoder-based classifiers.Source: §4.2 · p. 5, Table 1 · p. 6

4.3. Encoder Adaptation

  • No-adaptation evaluation uses Euclidean-distance 1NN, while partial adaptation learns a classifier with the encoder weights frozen.The partial-adaptation classifiers are logistic regression (C = 0.1) and RBF SVM (C = 100); representations are normalized to zero mean and unit variance.Source: §4.3 · p. 5
  • Full adaptation fine-tunes the pre-trained encoder with a softmax mapping, alongside a new encoder trained from scratch as the pre-training comparison.ADAPT and NEW train for 100 epochs, with learning rates 5 · 10^-5 and 10^-4 respectively; pre-analysis found both converged to stable solutions.Source: §4.3 · pp. 5–6

5. Results

Encoder-based classifiers are competitive with leading methods, including without encoder adaptation, and the effect of representation size depends on whether the encoder is adapted. The authors also report which architectural changes helped and which alternatives failed to generalize to out-of-type tests.

5.1. Accuracy and Ranking

  • At k = 256, representations are reduced-size for more than half of training sets, and computing 100 series takes milliseconds on a Titan Xp GPU.Euclidean distance is widely implemented and supports efficient nearest-neighbor queries.Source: §5.1 · pp. 6–7

5.2. Effect of Representation Size

  • Without encoder adaptation, lower k reduces performance; with Encoder-NEW or Encoder-ADAPT, dimensionality has no clear effect, with a possibly marginal optimum from k = 64 to k = 256.Figure 2 plots average accuracy against representation dimensionality; values above k = 1024 were excluded to avoid representations larger than almost all raw series.Source: Figure 2 · p. 7, §5.2 · p. 7

5.1. Accuracy and Ranking

  • Encoder-ADAPT is competitive with the state of the art, while Encoder-1NN beats Euclidean and DTW and matches TWE and MSM.Frozen-encoder mappings outperform RotF, and pre-trained Encoder-ADAPT performs better than Encoder-NEW, which trains the same architecture from scratch on target data.Source: §5.1 · pp. 6–7

5.3. Informal Report of Alternative Architectures

  • Attention outperformed global average pooling, instance normalization helped several no-adaptation methods, and max-pooling improved encoder efficiency.Larger convolutional kernels yielded slightly better accuracies.Source: §5.3 · p. 8
  • A recurrent neural network replacing attention had marginally better validation accuracy but did not generalize well to out-of-type test sets.Causal dilated convolutions with padding were another unsuccessful architecture change.Source: §5.3 · p. 8

6. Conclusion and Future Work

The paper concludes that a universal encoder can classify out-of-sample data from unseen types with competitive performance under no, mapping, or full adaptation. It identifies architecture refinement, parameter optimization, one-shot learning, and data augmentation as future directions.

6. Conclusion and Future Work

  • Across no-adaptation, mapping-adaptation, and full-adaptation settings, the encoder achieves state-of-the-art-competitive performance on classification of unseen data types.The approach combines a compact reusable representation with few training iterations.Source: §6 · p. 8
  • Small representations affect no-adaptation and mapping-adaptation approaches, but have little effect on full adaptation.The paper describes this as a result of studying representation dimensionality.Source: §6 · p. 8
  • Future directions include refining the architecture, optimizing empirically chosen parameters, adopting one-shot learning schemas, and using data augmentation.The authors specifically mention linear instance/class interpolation approaches for augmentation.Source: §6 · p. 8
Loading 1805.03908v1…