Sundial: Generative Time-Series Foundation Models

Machine Learning
Introduced by
Yong Liu et al. (Tsinghua)
Year
2025
Type
Generative time-series foundation model family
Family
Time-series forecasting

What does it do?

Sundial is a family of generative time-series foundation models introduced by Yong Liu and colleagues and presented at ICML 2025.

The series is processed as patch embeddings with attention, and a generative forecasting head produces sampled future trajectories rather than a single fixed forecast. It is intended for forecasting tasks with little task-specific training. Architectural details should be checked against the original paper (arXiv:2502.00816).

The intuition behind the method

A useful way to picture Sundial is as a pre-trained model that reads a time series in fixed-length patches and relates those patches to one another through attention. Instead of returning one forecast, its generative head maps a random noise draw to one possible future path. Repeated draws give a set of trajectories whose spread indicates how uncertain the forecast is.

History

Sundial was proposed by Y. Liu, G. Qin, X. Shi, T. Hu, J. Wang and M. Long and presented at ICML 2025. Related time-series foundation models include TimesFM, Chronos and Moirai.

When to use it

Consider Sundial when you need forecasts for many series or for series with limited labeled history, when you want one model to be applied across domains without training a new model for each, or when you need sampled future paths rather than only point values. Do not choose it when you have a large, well-labeled single-domain dataset and need low inference cost. In that case a lightweight specialized forecaster trained on that data may be simpler to run and to check.

Limitations and considerations

  • Pre-training at foundation-model scale requires large compute and data resources, which matters if you intend to retrain rather than use released weights
  • Each probabilistic forecast requires several noise draws, each passed through the forecasting head, so inference is slower than a single deterministic pass
  • On narrow, single-domain tasks with abundant labels, the model may trail specialized forecasters trained on that domain
  • The patch length s fixes how the context is tokenized and must be set by the user; its effect on accuracy for out-of-domain series should be checked on validation data

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • One trained model can produce many sampled trajectories through different noise draws, so the spread of forecasts is available from the same model
  • Pre-training on diverse series is intended to support forecasting on new series without per-task training; whether this holds for a given target should be confirmed on held-out data

Applications

  • Forecasting many related series, such as demand or sensor streams, with one shared pre-trained model, where training a separate model per series is impractical
  • Generating sampled future paths for scenario analysis where the spread of outcomes matters
  • Forecasting in target domains with little history, where application without task-specific training is the intended mode

How it works

How it works

1

Input preprocessing is described in the original paper (arXiv:2502.00816). Check the exact preprocessing there before reproducing the pipeline; the patching and attention steps below are stated for the series as the model receives it.

Formula
\mathbf{x} = \mathbf{x}_{\text{trend}} + \mathbf{x}_{\text{seasonal}} + \mathbf{x}_{\text{residual}}, \quad \mathbf{x}_{\text{trend}} = \text{AvgPool}(\mathbf{x})
2

The series is cut into segments of length s, where segment i covers positions (i-1)s to is, so consecutive segments do not overlap. A learned linear projection maps each segment to a d-dimensional vector, giving a sequence of N tokens for the encoder. A series shorter than one segment yields no complete token.

Formula
\mathbf{P}_i = \text{Linear}\bigl(\mathbf{x}_{[(i-1)s:\, is]}\bigr) \in \mathbb{R}^{d}, \quad i = 1, \ldots, N
3

The patch embeddings are projected to queries, keys and values, which are combined by scaled dot-product attention as in the given formula. Each output token is a weighted mixture of all patch tokens, so the model can relate distant parts of the context. The formula shows a single attention step; the full multi-head configuration should be taken from the original paper.

Formula
\text{Attention}(Q,K,V) = \text{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right)V, \quad Q,K,V = \mathbf{P}W_Q,\mathbf{P}W_K,\mathbf{P}W_V
4

The encoder representation is combined with a noise vector drawn from a standard normal distribution, and a parameterized function maps the pair to the H future values. Different draws give different forecast trajectories, so their spread can serve as an indication of forecast uncertainty. The exact sampling procedure, the number of draws and how they are summarized into intervals are described in the original paper.

Formula
\hat{\mathbf{y}}_{t+1:t+H} = f_{\theta}\bigl(\mathbf{z}_{\text{enc}},\, \epsilon\bigr), \quad \epsilon \sim \mathcal{N}(0, I)

Common pitfalls

  • A context shorter than one patch length s contains no complete segment, so the patch-embedding step has nothing to encode; check that the context is long enough for the chosen s
  • Ignoring the domain shift between the pre-training corpus and the target series can produce prediction intervals that are poorly calibrated for the target data; check calibration on held-out target data
  • Reporting only one sample, or the mean of samples, as the forecast discards the uncertainty information the generative head provides
  • Choosing the patch length without validation on the target series, since the formulas fix the structure but not the value of s

Frequently asked questions

Does Sundial require fine-tuning on new data before deployment?

Sundial is intended to be applied to new series without task-specific training. Whether fine-tuning on a labeled sample from the target domain improves results should be tested on held-out data, and the original paper should be consulted for the evaluation protocol its authors used.

How does Sundial differ from Chronos and TimesFM?

All three are pre-trained time-series foundation models. The feature of Sundial highlighted here is its generative forecasting head, which produces sampled future trajectories. A detailed comparison with Chronos and TimesFM is not given on this page, so consult the original paper for each model before choosing between them.

Is Sundial appropriate for high-frequency financial tick data?

Before assuming coverage of tick-level financial data, check the composition of the pre-training corpus in the original paper. Test the model on held-out data from the target market, and choose the patch length by validation, since s is a setting rather than a fixed value.

Related methods

Sources

  1. Liu, Y., Qin, G., Shi, X., Hu, T., Wang, J., & Long, M. (2025). Sundial: A family of highly capable time series foundation models. ICML.

    Open publication reference