TSMixer: All-MLP Architecture for Time Series Forecasting

Machine Learning
Introduced by
Si-An Chen et al. (Google)
Year
2023
Type
All-MLP multivariate time-series forecasting model
Family
Time-series forecasting

What does it do?

TSMixer is a multivariate time-series forecasting model introduced by Si-An Chen and colleagues at Google in 2023.

It is built from a stack of MLP blocks that alternate between mixing along the time axis and mixing across feature channels, with no attention or recurrent layers. The original paper presents it as a simpler alternative to Transformer-based forecasters.

The intuition behind the method

Think of the input as a table with one row per time step and one column per variable. TSMixer repeatedly applies two small MLPs with nonlinearities: one combines information down each column across rows, to capture temporal patterns, and one combines information across columns within each row, to capture dependencies between variables. Residual connections keep the original signal in each block, and stacking several blocks lets the model build more abstract representations without any attention mechanism.

History

TSMixer was introduced in 2023 by Si-An Chen, Chun-Liang Li, Nate Yoder, Sercan O. Arik and Tomas Pfister of Google, in the paper 'TSMixer: An all-MLP architecture for time series forecasting' (arXiv:2303.06053). The work presents MLP-based mixing along the time and feature axes as an alternative to attention-based forecasting models.

When to use it

Choose TSMixer when you forecast several related variables together and expect them to carry information about one another, since the feature-mixing step is what models those links. It fits data on a regular time grid, where every sample can be given a look-back window of the same length. The channel set must also stay the same between training and deployment, because the feature-mixing weights are tied to a fixed number of channels. Do not choose it for a single series with no useful cross-series information, where the feature-mixing step has little to work with; a linear model such as DLinear is a simpler first benchmark. It is also a poor fit for irregularly sampled data unless that data is resampled, and for tasks where the input length must vary from sample to sample, because the look-back length is built into the temporal weights.

Limitations and considerations

  • The feature-mixing step adds little when the variables are weakly correlated or when the task is univariate, so its extra structure does not help in those cases
  • The temporal weights are sized for one look-back length, so the context length is fixed at training time and cannot change per sample without retraining
  • The architecture has no built-in decomposition into trend and seasonal parts, which some domain-specific forecasters include explicitly
  • Its behaviour depends on the look-back length, the number of Mixer Blocks and the MLP hidden sizes, so these need validation for each dataset

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

Strengths

  • Uses only shared MLP layers with residual connections and no attention or recurrent computation, so the block structure is compact and is set out in the four formulas in mechanics
  • Models dependence across time and dependence across variables as two separate, explicit steps, so each axis can be inspected or ablated on its own
  • The original paper reports competitive accuracy on multivariate forecasting benchmarks using MLP layers alone

Applications

  • Electricity consumption and load forecasting
  • Weather and climate variable prediction
  • Traffic flow and speed forecasting
  • Financial time series and demand forecasting
  • IoT sensor data and industrial telemetry monitoring

How it works

How it works

1

A two-layer MLP is applied along the time dimension, with the same weights shared across all feature channels. It takes the normalised look-back window as input and learns mappings over time steps, which can capture temporal patterns such as trends, seasonality and short-range dependencies. The residual connection adds the input back to the output, so the block refines the signal rather than replacing it.

Formula
\hat{X} = X + W_2^T \sigma(W_1^T \text{Norm}(X)) \in \mathbb{R}^{T \times C}
2

A second two-layer MLP is applied across the channel dimension separately at each time step, so it combines information from different variables observed at the same time index. Because the same weights are used at every time step, the operation behaves like a pointwise feedforward layer over channels. A residual connection again preserves the input.

Formula
\hat{X} = X + \sigma(\text{Norm}(X) W_3) W_4 \in \mathbb{R}^{T \times C}
3

One Mixer Block applies temporal mixing and then feature mixing, each with normalisation and a residual connection. Blocks are stacked in sequence, so later blocks operate on representations that have already been mixed along both axes.

Formula
\text{MixerBlock}(X) = \text{FeatureMix}(\text{TimeMix}(X)), \quad X \in \mathbb{R}^{T \times C}
4

The output of the last block is a T by C array, where T is the look-back length and C the number of channels. A linear map applied along the time axis converts the T look-back steps into H forecast steps for every channel, so all channels are predicted together. Because this map has a fixed output size, the forecast horizon is set when the model is built, and no step-by-step decoding is needed.

Formula
\hat{Y} = W_h^T X_{\text{out}} \in \mathbb{R}^{H \times C}

Common pitfalls

  • The model expects a regular time grid with a fixed look-back window, so irregularly sampled or gappy series need resampling or imputation first; the formulas do not define how to handle raw irregular timestamps
  • Each mixing step applies a normalisation Norm(X) before its MLP, but the formulas do not define Norm. Choose and validate a normalisation scheme, because without one, shifts in level between training and test periods reach the MLPs unchanged
  • A look-back window that is short relative to the forecast horizon gives the temporal MLP little history to mix, since the forecasting head maps those same T steps onto H outputs
  • Using TSMixer as a drop-in replacement for a Transformer forecaster without checking that the target variables are correlated; if they are not, the feature-mixing layers add parameters without a clear benefit

Frequently asked questions

How does TSMixer differ from DLinear?

DLinear decomposes a series into trend and remainder components and applies linear layers along the time axis, without modelling interactions between variables. TSMixer adds a feature-mixing step over channels, so it can model cross-variable dependencies directly through its alternating temporal and feature MLP blocks. Whether that extra step helps depends on whether the variables in your data are correlated.

Does TSMixer use any attention mechanism?

No. TSMixer is an all-MLP architecture. It replaces self-attention with shared MLP layers applied alternately along the time and feature axes, and the formulas on this page contain no attention weights. The original paper reports competitive accuracy with this design on multivariate forecasting benchmarks.

What look-back window length should I use with TSMixer?

The look-back length sets the size of the temporal MLP weights, so it is fixed when the model is built. Choose it by validation on a held-out split, and check whether longer windows help with the temporal patterns that dominate your data. Compare the chosen value against a naive baseline and a linear model such as DLinear on the same split before drawing conclusions.

Related methods

Sources

  1. Chen, S.-A., Li, C.-L., Yoder, N., Arik, S. O., & Pfister, T. (2023). TSMixer: An all-MLP architecture for time series forecasting. Transactions on Machine Learning Research.

    Open publication reference