Skip to main content
QUICK REVIEW

[Paper Review] TOTEM: TOkenized Time Series EMbeddings for General Time Series Analysis

Sabera Talukder, Yisong Yue|arXiv (Cornell University)|Feb 26, 2024
Time Series Analysis and ForecastingComputer Science3 citations
TL;DR

TOTEM introduces a self-supervised, discrete tokenization framework for time series using a Vector Quantized Variational Autoencoder (VQVAE) to enable unified, generalist modeling across diverse domains and tasks. It achieves state-of-the-art or competitive performance in imputation, anomaly detection, and forecasting with minimal tuning, outperforming specialist models in zero-shot generalization, especially on larger, more diverse training sets.

ABSTRACT

This work studies the problem of time series analysis with generalist (or foundation) models, which are models trained across many data domains. Drawing inspiration from the widespread success of large language models, we consider the simple strategy of discretely tokenizing time series data drawn from a myriad of datasets via self-supervision, then using the fixed tokenization to solve a variety of tasks across many data domains. Canonically, time series models are either trained on a single dataset or built in a task-specific manner (e.g., a forecasting-only model), where many use patches of time as inputs to the model. As such, performant generalist, discrete representation time series models explored across many tasks are of value. Our method, TOkenized Time Series EMbeddings (TOTEM), produces such generalist time series models with minimal or no fine-tuning while exhibiting strong zero-shot performance. We evaluate TOTEM extensively over nearly 500 experiments on three commonly-studied time series tasks with real-world data: imputation (17 baselines, 12 datasets), anomaly detection (19 baselines, 25 datasets), and forecasting (14 baselines, 12 datasets). We conclude that TOTEM matches or outperforms existing state-of-the-art models in both the canonical specialist setting (i.e., training one model on one domain) as well as the generalist setting (i.e., training a single model on many domains), which demonstrates the efficacy of tokenization for general time series analysis. The open-source implementation is available here: https://github.com/SaberaTalukder/TOTEM; a video summary is available here: https://www.youtube.com/watch?v=OqrCpdb6MJk.

Motivation & Objective

  • To develop a unified, generalist time series modeling framework that works across diverse domains and tasks with minimal hyperparameter tuning.
  • To explore the efficacy of discrete, self-supervised token representations for enabling zero-shot generalization in time series analysis.
  • To evaluate TOTEM in both specialist (per-domain) and generalist (multi-domain) training regimes across multiple tasks and datasets.
  • To investigate how data size, domain diversity, and token representation quality affect generalization performance in time series modeling.
  • To establish a performant, lightweight tokenizer that supports holistic evaluation across forecasting, imputation, and anomaly detection tasks.

Proposed method

  • TOTEM employs a 1D strided CNN encoder and decoder within a VQVAE architecture to learn discrete, vectorized time series representations.
  • The model uses a learnable, shared codebook to tokenize time series sequences into discrete tokens through vector quantization.
  • Tokenization is performed in a self-supervised manner, enabling representation learning without task-specific labels.
  • The framework supports both specialist training (on a single dataset) and generalist training (jointly across multiple datasets) using the same tokenizer.
  • Inference is performed using the learned codebook to embed time series into discrete tokens, enabling downstream task generalization.
  • The method enables in-domain and zero-shot testing by leveraging the same discrete representation across different domains and tasks.
Figure 1 : TOTEM & Evaluation Regimes. An overview of TOTEM, the training schemas, and inference regimes. (a) The TOTEM VQVAE architecture consists of an 1D strided CNN encoder $\mathcal{E}$ , quantizer, latent codebook, and 1D strided transpose CNN decoder $\mathcal{D}$ . TOTEM’s VQVAE enables gene
Figure 1 : TOTEM & Evaluation Regimes. An overview of TOTEM, the training schemas, and inference regimes. (a) The TOTEM VQVAE architecture consists of an 1D strided CNN encoder $\mathcal{E}$ , quantizer, latent codebook, and 1D strided transpose CNN decoder $\mathcal{D}$ . TOTEM’s VQVAE enables gene

Experimental results

Research questions

  • RQ1Can a single, discrete, self-supervised tokenization method enable effective generalist training across diverse time series domains and tasks?
  • RQ2How does TOTEM's performance compare to specialist models in both in-domain and zero-shot generalization settings?
  • RQ3What is the impact of training data size and domain diversity on the generalization capability of a unified time series representation?
  • RQ4Does a unified codebook trained on multiple domains outperform domain-specific models in zero-shot scenarios?
  • RQ5How do raw time series characteristics—such as number of time steps and sensors—affect the performance of generalist models?

Key findings

  • TOTEM matches or outperforms state-of-the-art methods on multiple benchmarks across 17 real-world time series datasets and three tasks: forecasting, imputation, and anomaly detection.
  • In the generalist training regime, TOTEM achieves 100% AvgWins on the traffic dataset and 75% AvgWins on the electricity dataset, significantly outperforming mixed-model specialists.
  • Despite having 4.4M fewer training examples, the TOTEM-electricity specialist model outperforms the TOTEM-traffic specialist in zero-shot testing (12.5% vs. 2.5% AvgWins).
  • The generalist model achieves 85.0% AvgWins in zero-shot testing, outperforming both domain-specific specialists, demonstrating strong cross-domain generalization.
  • The results suggest that higher raw time step count may be more beneficial than greater sensor count for generalization, though domain similarity also plays a key role.
  • TOTEM’s unified codebook enables effective zero-shot generalization, indicating that shared discrete representations can generalize across domains even with limited in-domain fine-tuning.
Figure 2 : Forecaster Modeling. The forecasting task requires modeling beyond the VQVAE. We leverage TOTEM’s pretrained, learnt, discrete codes as a the input data representation and train a transformer encoder. We add positional embeddings along the time dimension, and use linear layers before the
Figure 2 : Forecaster Modeling. The forecasting task requires modeling beyond the VQVAE. We leverage TOTEM’s pretrained, learnt, discrete codes as a the input data representation and train a transformer encoder. We add positional embeddings along the time dimension, and use linear layers before the

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.