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.
- 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).
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.
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