Large Pre-trained time series models for cross-domain Time series analysis tasks

Harshavardhan Kamarthi, B. Aditya Prakash

TL;DR

Large Pre-trained Time-series Models (LPTM) introduce a smarter way to tokenize time-series data through adaptive segmentation. Instead of cutting data into rigid, fixed-length chunks, LPTM learns to identify semantically meaningful segments across diverse domains—from slow-moving economic indicators to high-frequency health sensors. This flexibility allows it to outperform massive LLM-based models while using significantly less data and compute.

The Challenge of Time-Series Tokenization

In Natural Language Processing (NLP), we have clear "tokens" like words or sub-words. In computer vision, we have patches. But what is a "token" in a time series?

Most current models either treat every single time step as a token (which lacks local context) or use fixed-length segments (e.g., every 10 time steps). The problem is that time-series data is incredibly heterogeneous. A 10-step window might capture a meaningful pattern in a heart rate monitor sampled in milliseconds, but represent almost no change in a GDP report sampled quarterly. Furthermore, even within the same dataset, dynamics change—an epidemic outbreak has much more "information" per day than the quiet off-season.

Rigid tokenization is the primary bottleneck preventing a true "foundation model" for time series that works across different domains.

Methods: Adaptive Segmentation

The core innovation of LPTM is the Adaptive Segmentation Module. Instead of pre-defining segment lengths, LPTM uses a scoring mechanism to decide where to "cut" the series dynamically.

The LPTM architecture featuring the Adaptive Segmentation Module and Transformer backbone.

The process follows four main steps:

  1. Segment Scoring: A Gated Recurrent Unit (GRU) processes the input to create hidden embeddings. A scoring function then evaluates all possible subsequences to determine how "useful" a segment is for minimizing reconstruction loss.
  2. Pruning: To keep the number of tokens manageable, the model uses a greedy algorithm to select the highest-scoring segments that cover the entire time series.
  3. Transformer Backbone: These variable-length segments are embedded and fed into a standard Transformer encoder (10 layers, ~100M parameters).
  4. Self-Supervised Learning (SSL): The model is pre-trained using two tasks:
  5. Random Masking (RANDMASK): Hiding random segments and asking the model to reconstruct them (interpolation).
  6. Last Token Masking (LASTMASK): Hiding the end of the series to force the model to forecast (extrapolation).

Pre-training and Datasets

To build a robust foundation model, the authors curated a diverse multi-domain pre-training suite encompassing:

  • Epidemics: 11 diseases from Project Tycho (1888–2021).
  • Energy: ETT electricity datasets.
  • Traffic: PEMS-Bays and METR-LA speed data.
  • Demand: NYC bike and taxi demand.
  • Finance: Nasdaq and S&P 500 stock prices.
  • General: 3,003 series from the M4 competition.
  • Classification: 35 sensor and behavioral datasets from the UEA/UCI archives.

Key Insights and Results

By learning a flexible segmentation strategy, LPTM can transfer knowledge between seemingly unrelated fields (e.g., using patterns learned from traffic to help forecast electricity). When visualizing the learned segments, the authors found the model naturally chooses smaller segments during high-volatility periods (like the peak of a flu season) and longer segments during stable periods, confirming it successfully identifies "information density."

Performance comparison of LPTM against state-of-the-art baselines across multiple datasets.
  • Zero-Shot Performance: In zero-shot forecasting (testing on new data without any training), LPTM outperformed major baselines like TimesFM, Chronos, and Lag-LLAMA across almost all benchmarks.
  • Efficiency: LPTM is 10x to 100x smaller than models that "reprogram" Large Language Models for time series. It achieved state-of-the-art results while requiring 40% less data and 50% less training time than top-tier baselines. This suggests that proper data representation is more important than raw parameter count.
  • Classification: Unlike many autoregressive models designed only for forecasting, LPTM’s encoder architecture allows it to excel at time-series classification, achieving the highest mean rank across 35 different datasets.

Limitations and Future Work

The current work primarily focuses on univariate time series. Extending this to high-dimensional multivariate data where variables interact is a logical next step. Additionally, LPTM currently provides point forecasts; extending the model to provide calibrated uncertainty measures (probabilistic forecasting) is a critical direction for real-world applications like medicine or finance. Finally, future versions could incorporate multimodal potential, using metadata or text descriptions of the datasets to provide even better contextual grounding.

Summary updated

BibTeX
@inproceedings{kamarthi2024large,
  author = {Harshavardhan Kamarthi and B. Aditya Prakash},
  title = {{Large Pre-trained time series models for cross-domain Time series analysis tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=vMMzjCr5Zj},
}
Figure