TimeMixer: Decomposable Multiscale Mixing for Time Series Forecasting

Machine Learning
Introduced by
Shiyu Wang et al.
Year
2024
Type
MLP-based multiscale time-series forecasting model
Family
Time-series forecasting

What does it do?

TimeMixer is an attention-free time-series forecasting architecture introduced by Shiyu Wang et al. at ICLR 2024.

It builds several coarser versions of the input by average pooling, separates seasonal and trend components at each scale, and mixes information with MLP blocks. Predictions made at the individual scales are then combined into a single forecast.

The intuition behind the method

Think of viewing a series through several zoom levels at once. Coarser views make slow movements clearer, while finer views keep short oscillations. TimeMixer produces such views by pooling, decomposes each one into seasonal and trend parts, processes them with MLP layers, and combines the per-scale forecasts. Because the architecture uses no attention mechanism, it does not compute pairwise scores between time steps. Whether this removes a practical bottleneck on a given task, in speed or memory, has to be measured rather than assumed.

History

TimeMixer was proposed by Shiyu Wang and colleagues and published at ICLR 2024 (Wang et al., 2024).

When to use it

Choose TimeMixer for forecasting problems where the series shows trend and seasonal behaviour that is plausibly separable at more than one temporal scale, such as energy, weather, traffic or economic data. It is a reasonable candidate when an attention-free model is preferred, for example for compute reasons on long inputs, provided that any efficiency gain is measured on the target data and hardware. It is a poor choice when the series is highly irregular, has strong structural breaks, or is non-stationary without preprocessing, because the decomposition assumption then does not hold. If the task depends on rich pairwise dependencies across time steps, attention-based forecasters such as Autoformer or PatchTST are a different design family to compare against.

Limitations and considerations

  • The scale pyramid is determined by the pooling kernel sizes k_m, which must be chosen for each task.
  • The model relies on the series being decomposable into trend and seasonal parts; series without a clear seasonal structure give the decomposition little to separate.
  • The number of scales M, the pooling kernel sizes and the MLP widths are all configuration choices that must be set per dataset.
  • The contribution of each scale to the final forecast depends on the aggregation weights w_m, so the relative influence of coarse and fine scales should be examined on the target data.

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

Strengths

  • The architecture uses MLP blocks and no self-attention, so it does not compute the pairwise token-to-token score matrix that attention-based models require.
  • Seasonal and trend components are separated explicitly at each scale, so the model works with a structured intermediate representation.
  • Scale-specific predictions are combined in the final output, so coarse and fine temporal patterns can both contribute to the forecast.
  • Average pooling is a simple, parameter-free operation for building the scale pyramid, which keeps the multiscale construction easy to implement and audit.

Applications

  • Long-horizon electricity load and energy consumption forecasting
  • Weather and climate variable prediction across multiple temporal resolutions
  • Traffic flow and speed forecasting in transportation networks
  • Economic and financial indicator forecasting with mixed trend-seasonal dynamics
  • IoT sensor data forecasting in industrial monitoring systems

How it works

How it works

1

The input sequence of length T is average-pooled with kernel size k_m at each of M scales, giving progressively coarser representations. Pooling at larger kernel sizes smooths out fine-grained variation and keeps slower movements, while the finest scale retains local detail. The number of scales and the kernel sizes are configuration choices that are set for each application.

Formula
\text{Given input } \mathbf{X} \in \mathbb{R}^{T \times C}, \text{ downsample to } M \text{ scales: } \mathbf{X}^{(m)} = \text{AvgPool}(\mathbf{X},\, k_m), \quad m = 1, \ldots, M
2

At each scale, the representation is split into seasonal and trend components, written as Decomp in the mechanics. An MLP block then mixes these components to produce a scale-specific representation for that temporal resolution.

Formula
\text{At each scale, apply seasonal-trend decomposition and mix across scales via MLP: } \mathbf{S}^{(m)}, \mathbf{T}^{(m)} = \text{Decomp}(\mathbf{X}^{(m)}), \quad \hat{\mathbf{X}}^{(m)} = \text{MLP}_{\text{mix}}(\mathbf{S}^{(m)}, \mathbf{T}^{(m)})
3

Each scale produces its own horizon-length prediction of shape H by C. These predictions are combined as a weighted sum with weights w_m, so the final forecast reflects contributions from all scales.

Formula
\text{Generate scale-specific future predictions } \hat{\mathbf{Y}}^{(m)} \in \mathbb{R}^{H \times C} \text{ via separate predictors, then aggregate: } \hat{\mathbf{Y}} = \sum_{m=1}^{M} w_m \hat{\mathbf{Y}}^{(m)}
4

A linear projection, with weight matrix W_proj and bias b, maps the combined multiscale representation to the H-step forecast for all C variates.

Formula
\text{Final forecast obtained by a linear projection head: } \hat{\mathbf{Y}} = \mathbf{W}_{\text{proj}} \cdot \hat{\mathbf{Y}} + \mathbf{b}, \quad \hat{\mathbf{Y}} \in \mathbb{R}^{H \times C}

Common pitfalls

  • Choosing too many or too few scales without validation can degrade results; the scale pyramid should be checked against the dominant periods visible in the data.
  • Applying TimeMixer to non-decomposable or irregular series without first checking stationarity or trend structure may produce forecasts that look plausible but rest on a poor decomposition.
  • Distribution shift between training and test segments should be handled explicitly, for example with an input normalisation step validated on the target data.
  • Reported accuracy gains come from the authors' benchmarks; any advantage over other methods should be re-measured on the target data against task-appropriate baselines.

Frequently asked questions

How does TimeMixer differ from TSMixer?

The distinguishing components of TimeMixer are the average-pooled multiscale pyramid and the seasonal-trend decomposition applied at each scale before mixing. For how TSMixer mixes its inputs, see the TSMixer page.

Is TimeMixer suitable for univariate as well as multivariate forecasting?

The formulation is written for C variates, so univariate use corresponds to C equal to one. How multivariate inputs are handled across variates should be confirmed against the original implementation before use, and performance should be validated on the target dataset.

What preprocessing is recommended before using TimeMixer?

Normalisation of the input should be chosen and validated explicitly; removing gross outliers and scaling each variate are common practice. Choosing an input length that covers at least one full dominant period is a common heuristic and should be validated on the target data, since the seasonal-trend decomposition is easier to interpret when a complete cycle is visible.

Related methods

Sources

  1. Wang, S., Wu, H., Shi, X., Hu, T., Luo, H., Ma, L., Zhang, J. Y., & Zhou, J. (2024). TimeMixer: Decomposable multiscale mixing for time series forecasting. ICLR.

    Open publication reference