FreTS: Frequency-domain MLPs for Time Series Forecasting

Machine Learning
Introduced by
Kun Yi et al.
Year
2023
Type
Frequency-domain MLP forecasting model
Family
Time-series forecasting

What does it do?

FreTS is a time series forecasting architecture introduced by Yi et al. at NeurIPS 2023.

Unlike Transformer-based forecasters, it performs its learned mixing in the frequency domain: the input is transformed with the Discrete Fourier Transform, processed by complex-valued MLP layers, and mapped back to the time domain by an inverse transform and a linear projection head. The paper's title presents frequency-domain MLPs as more effective learners for time series forecasting. Comparative results against Transformer-based and MLP-based baselines are reported in the original paper, which should be consulted for exact figures.

The intuition behind the method

Instead of computing attention over raw time steps, FreTS rewrites each variable's series as a set of frequency coefficients using the Discrete Fourier Transform. Periodic structure, such as repeating daily or weekly cycles, shows up as a small number of large coefficients, so an MLP acting on these coefficients can model long-range periodic behaviour without the pairwise cost of self-attention. The model mixes information along the frequency axis (temporal mixing) and across variables (channel mixing), then returns to the time domain with an inverse transform and a linear projection to the forecast horizon. Slow trends and non-periodic changes are not represented compactly by a Fourier basis, so the method depends on the series having spectral structure.

History

FreTS was introduced by Kun Yi and colleagues at NeurIPS 2023, in the paper 'Frequency-domain MLPs are more effective learners in time series forecasting' (Yi, K., Zhang, Q., Fan, W., Wang, S., Wang, P., He, H., An, N., Lian, D., Cao, L., & Niu, Z., 2023). The paper frames frequency-domain MLPs as an alternative to Transformer-based forecasters for time series prediction.

When to use it

Consider FreTS for multivariate forecasting problems with long horizons in which the series has clear periodic or seasonal structure, such as electricity load, weather or traffic data. Its mixing operates on frequency bins rather than the full set of attention pairs, so it is a candidate when compute or memory is constrained and a Transformer would be costly. Do not expect large benefits on series without meaningful spectral structure, such as near white noise or irregular event data, where a frequency representation adds little. For strongly trending or non-stationary series, apply normalisation or differencing first, or consider a time-domain model. Alternatives named on this page are FEDformer for spectral mixing within a Transformer and TSMixer for channel-mixing MLPs.

Limitations and considerations

  • The Fourier basis is periodic over the input window, so trends and level shifts spread energy across many coefficients and are represented poorly by the spectrum alone. Preprocessing such as detrending or normalisation is a practical option for non-stationary series.
  • The channel-mixing weight matrix is sized to the number of variables, so a trained model is tied to a fixed channel count and does not transfer directly to datasets with a different number of variables.
  • As written in the mechanics, all non-redundant frequency bins enter the mixing layers, so the architecture itself does not filter high-frequency noise. Impulsive or irregular signals spread energy over many bins and may be hard to model.
  • Temporal mixing has no explicit locality: each frequency coefficient describes the whole input window, so recent local behaviour is not represented separately from long-range periodicity. Modelling local dynamics would require architectural changes.

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

Strengths

  • Lower cost in the mixing layers for long inputs: the layers operate on the T/2+1 non-redundant frequency bins instead of the T time steps.
  • Global periodic structure is represented compactly, since a few spectral coefficients can summarise repeating cycles that a time-domain model would need to learn from many lagged inputs, and no pairwise attention between time steps is computed.
  • The architecture is simple: the mechanics contain no positional encoding, tokenisation or attention blocks, which makes it straightforward to implement and tune.
  • The paper's framing is that frequency-domain MLPs are effective learners for time series forecasting, with comparative results against Transformer-based and MLP-based models reported in the original paper; the benchmarks and margins should be taken from there.

Applications

  • Electricity load and consumption forecasting, where daily and weekly cycles produce strong spectral peaks
  • Weather and climate variable prediction with seasonal components
  • Traffic speed and flow forecasting with repeating commuting patterns
  • Multivariate sensor series in which several variables share a common periodic driver, where channel mixing is most relevant
  • Financial series with pronounced cyclical components; benefit depends on whether such components are present in the data

How it works

How it works

1

The multivariate input, with N variables over T time steps, is transformed along the time axis by the Discrete Fourier Transform. Because the input is real-valued, only the T/2+1 non-redundant frequency bins are kept, giving a complex matrix of N by T/2+1 coefficients. Each coefficient carries amplitude and phase, so the subsequent layers can work with the global temporal pattern rather than individual time-step differences.

Formula
\hat{X} = \mathcal{F}(X) \in \mathbb{C}^{N \times T/2+1}, \quad \text{where } \mathcal{F} \text{ denotes the Discrete Fourier Transform (DFT) along the time axis}
2

The complex-valued MLP uses separate real and imaginary weight matrices. The formula combines them with the rule for complex multiplication: the real output is W_r times Re minus W_i times Im, and the imaginary output is W_r times Im plus W_i times Re. The activation sigma is then applied to the real and imaginary parts separately, so this is a split nonlinearity rather than a complex-valued activation. The layer can therefore change the amplitude and phase of individual frequency components. The equations give the core complex-valued operation; bias terms and other details of the published layer are described in the original paper.

Formula
H = \sigma(W_r \cdot \operatorname{Re}(\hat{X}) - W_i \cdot \operatorname{Im}(\hat{X})) + i\,\sigma(W_r \cdot \operatorname{Im}(\hat{X}) + W_i \cdot \operatorname{Re}(\hat{X}))
3

A second MLP is applied across the variable dimension of the frequency representation, using the channel weight matrix W^(c) on the transposed input as written in the formula. This step lets the model combine information across variables in spectral space, so variables that share periodic components can inform one another. Because the weight matrix is sized to the number of variables, the layer cannot be applied unchanged to data with a different number of channels. Confirm the tensor shapes and transpose convention in the original paper before implementation, since they determine the axis on which W^(c) acts.

Formula
H^{(c)} = \sigma(W^{(c)} \cdot H^{\top}) \in \mathbb{C}^{T/2+1 \times N}, \quad \text{channel-wise MLP applied in the frequency domain}
4

The mixed frequency representation is returned to the time domain by the inverse Fourier Transform, and the real part is taken. A linear projection W_proj then maps the reconstructed temporal features to the forecast horizon H. Because only the real part is used at the output, the final prediction is real-valued.

Formula
\hat{Y} = W_{\text{proj}} \cdot \operatorname{Re}(\mathcal{F}^{-1}(H^{(c)})) \in \mathbb{R}^{N \times H}, \quad \text{where } H \text{ is the forecast horizon}

Common pitfalls

  • The model receives spectral coefficients, so the input normalisation changes the spectrum itself and therefore the features the model learns. Report the normalisation used and compare variants on held-out data, since the choice can affect results.
  • Applying FreTS to aperiodic or white-noise-like series without first checking for spectral structure can produce results no better than a naive baseline. Inspect the amplitude spectrum of the data before relying on the model.
  • Comparing forecast errors across experiments is misleading if they use different normalisation, input window or horizon, because the window length directly determines the frequency bins. These settings should be held fixed in any comparison.
  • The complex-valued weights in the frequency layers add parameters. Large hidden sizes on a small dataset can overfit, so the hidden dimension and regularisation should be tuned.

Frequently asked questions

How does FreTS differ from FEDformer, which also uses frequency-domain operations?

Both use frequency-domain operations, but FEDformer is a Transformer-based model that applies frequency-domain operations within its architecture. FreTS removes the Transformer and performs its mixing with MLPs on the complex spectrum, with a time-domain projection at the output. The FreTS pipeline is therefore shorter: the DFT, two complex-valued MLP stages, the inverse DFT and a linear head.

Does FreTS require the time series to be strictly stationary?

The mechanics as written contain no stationarity assumption, but trends and level changes within a window spread energy across frequency bins and affect the representation the model learns. Detrending or differencing the series, or normalising each input window before the transform, are practical options for strongly trending data. Report the preprocessing used alongside results.

Can FreTS handle univariate forecasting, or is it only for multivariate settings?

FreTS can be applied to a univariate series. With one variable the channel-mixing layer reduces to a single weight, and the model becomes a frequency-domain MLP along the time axis. Its channel mixing is most useful when several correlated variables share spectral structure.

Related methods

Sources

  1. Yi, K., Zhang, Q., Fan, W., Wang, S., Wang, P., He, H., An, N., Lian, D., Cao, L., & Niu, Z. (2023). Frequency-domain MLPs are more effective learners in time series forecasting. NeurIPS.

    Open publication reference