Time Series as Language: A Universal Tokenizer for General-Purpose Time Series Foundation Models

Yunhao Zhang, Ruiying Qi, Jiale Zheng, Jianfeng Zhang, Lujia Pan, Junchi YanarXiv 2026

TL;DR

This paper introduces UniTok, a universal time series tokenizer, and UniTok-FM, a general-purpose foundation model trained using standard next-token prediction. By converting continuous, unbounded time series into discrete tokens, the framework unlocks training-free, multi-task in-context learning for forecasting, generation, and classification using a single unified architecture.

What Problem Does This Paper Address?

While Large Language Models (LLMs) have unified natural language processing through next-token prediction (NTP), applying this paradigm to time series data remains highly fragmented. Time series are continuous, unbounded, and vary wildly in scale and length.

Existing time series foundation models (TSFMs) typically rely on task-specific architectures, specialized heads, or narrow pretraining objectives (like masking or fixed-horizon regression), making them rigid and mostly limited to forecasting. Prior attempts at tokenization, like point-wise binning, fail to capture complex temporal dependencies and restrict models to isolated series. The authors tackle this gap by creating a truly universal time series tokenizer that enables LLM-style multi-task generality and training-free in-context learning.

Methods

The authors propose a two-part framework consisting of a specialized tokenizer and an off-the-shelf language model backbone:

  • UniTok (The Tokenizer): A vector-quantized autoencoder modified specifically for time series data through several key innovations:
  • Incremental Tokenization: Ensures that encoding a prefix is independent of future data, aligning perfectly with autoregressive generation.
  • Prefix Normalization: Stabilizes varying numerical scales by computing min-max statistics from a fixed-length prefix rather than the whole series, preserving the incremental property.
  • Lossless Scale Tokenization: Converts absolute scale statistics into hexadecimal tokens to preserve semantic meaning without blowing up the embedding space.
  • Progressive-Resolution Causal Autoencoder: Replaces uniform downsampling with a progressive structure where earlier tokens have higher resolution, mitigating the causal information bottleneck inherent in autoregressive modeling.
  • Structure-Preserving Loss: Combines $L1$, adversarial, surrogate perceptual, and discrete wavelet transform (DWT) losses to capture fine-grained temporal structures.
Figure 1: (a) Incremental vs. non-incremental tokenization. Incremental tokenization makes prefix tokens independent of future observations, so appending data extends the token sequence, aligning with the NTP paradigm. Otherwise, incompatible tokens for a prefix and its extension limit generalization from long to short series. (b) Overview of UniTok. The raw TS is decomposed into scale statistics and a normalized series via prefix normalization (Sec. 3.2). Scale statistics are discretized in hex of Float32, while normalized series is encoded by a progressive-resolution causal autoencoder (Sec. 3.3), trained with a structure-preserving reconstruction loss (Sec. 3.4).
  • UniTok-FM (The Foundation Model): This model uses an off-the-shelf LLM backbone (Qwen3) without any time-series-specific modifications. It is pretrained on context windows containing multiple concatenated series segments with similar patterns. This allows the model to perform training-free in-context inference across multiple tasks: zero-shot/prompt-boosted forecasting, few-shot generation, and few-shot classification (by evaluating conditional likelihoods).
Figure 3: Token arrangement for in-context NTP pretraining and training-free in-context inference. In pretraining, multiple series with similar patterns are concatenated into a context window. In zero-shot forecasting, lookback tokens condition AR generation of future tokens. In prompt- boosted forecasting and few-shot generation, similar-pattern series are prepended as contextual prompts. In few-shot classification, the query series is conditioned on class-specific prompts, with labels determined by comparing likelihoods.

Datasets

  • Pretraining: A large-scale corpus combining GIFT-Pretrain (230 billion time points across 88 sub-datasets) and the Chronos-Dataset (67 subsets), carefully filtered to prevent test-set leakage.
  • Evaluation:
    • Forecasting: The GIFT-Eval benchmark (97 tasks across various domains and horizons).
  • Generation: Four real-world datasets from Diffusion-TS (Stocks, ETTh, Energy, fMRI).
  • Classification: UCR-FewShot (a subset of 53 datasets from the UCR Archive with $\le$ 20 training instances per class).

Key Insights and Ideas

  • Time Series as a Language: If you can discretize time series while strictly maintaining the incremental property (tokens don't change when more data arrives), you can treat time series exactly like text.
  • In-Context Multi-Tasking: Pretraining on sequences of similar series segments teaches the model to use contextual prompts. During inference, you can feed a few example series as "prompts" to boost forecasting accuracy, generate new samples, or classify data without changing a single model weight.
  • Solving the Causal Bottleneck: In a purely causal encoder, the first token only sees the first small patch of data but must reconstruct it entirely. Progressive resolution allocates more tokens (finer resolution) to earlier positions, clearing this bottleneck.
Progressive-Resolution Causal Autoencoder Architecture

Key Results

  • Forecasting: UniTok-FM (Prompt) achieves an aggregated MASE of 0.824 on GIFT-Eval, outperforming standard Chronos (0.876) and matching the forecasting-specific TSFM Chronos-Bolt (0.808).
  • Few-Shot Generation: With just 5 prompt examples, UniTok-FM achieves a predictive score (0.601) comparable to state-of-the-art generative models like Diffusion-TS trained on 1,000 samples (0.582).
  • Few-Shot Classification: On UCR-FewShot, UniTok-FM achieves a training-free accuracy of 0.755, outperforming supervised baselines and remaining highly competitive with MOMENT (0.778), which requires training a downstream classifier.
  • Efficiency: Because UniTok compresses time series into shorter token sequences than point-wise binning, it significantly reduces inference time and memory occupancy compared to Chronos.

Limitations and Future Work

  • Inductive Bias Gap: A performance gap still exists between this general-purpose model and specialized, task-specific state-of-the-art models that benefit from tailored inductive biases.
  • Univariate Constraint: The current model focuses on univariate time series and handles multivariate data via channel independence. Extending the framework to natively model complex cross-channel dependencies is left for future work.

Summary updated

BibTeX
@misc{zhang2026time,
  author = {Yunhao Zhang and Ruiying Qi and Jiale Zheng and Jianfeng Zhang and Lujia Pan and Junchi Yan},
  title = {{Time Series as Language: A Universal Tokenizer for General-Purpose Time Series Foundation Models}},
  year = {2026},
  eprint = {2606.09861},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.09861},
}
Figure