Skip to content
ML Academy

Time series and forecasting · insight-1252

Match a foundation model's context window to your longest seasonal cycle

Evidence type
empirical finding
Difficulty
medium
Roles
Data scientist, ML engineer, Applied AI
Industries
energy, telecom, logistics

Summary: situation, action, reason, boundary

  1. Situation

    Hourly electricity demand has weekly and annual cycles, and a pretrained forecaster gets the last 512 hours as context.

  2. Action

    Compute the context needed (longest cycle times at least two repeats) and compare it with the model's supported length. If short, forecast a seasonally adjusted series, add calendar covariates, or use a longer-context model, and backtest context length.

  3. Reason

    Chronos was trained with a context of 512, and its ablation found gains up to 1024 before saturation. TimesFM notes a rise from 2048 to 16k, so supported lengths differ by model and version.

  4. Boundary

    High-frequency data with long cycles such as hourly load, minute-level traffic or daily series with annual seasonality.

Symptom or risk

The model sees about three weeks and not last year's level at the same date, so annual seasonality is silently absent.

Exceptions

If a seasonally adjusted or calendar-augmented series is supplied, a short window may be enough.

Trade-offs

Longer contexts raise inference cost and did not always improve accuracy in the Chronos ablation.

Pitfalls

Assuming that a longer context window in the API means the model uses it well.

Example

Hypothetical: two annual cycles of hourly data are 2 x 8,760 = 17,520 observations, about 34 times a 512-step context.

Lessons and concepts

Claims and their sources