wikillm

Paper · 2023-11-10 · cs.LG, cs.AI

Frequency-domain MLPs are More Effective Learners in Time Series Forecasting

Forecasts with two MLPs that run on a discrete Fourier transform of the input: one mixes channels, one mixes time steps. A feed-forward head then predicts the horizon. Author-reported: MAE 0.120 on Solar and 0.011 on Traffic at 12-step horizons, and the best MAE on most long-term benchmarks; PatchTST wins on Traffic at two horizons and on one Electricity horizon.

Time series forecastingMulti-layer perceptron (MLP)Frequency-domain learningtime-series-forecastingmulti-layer-perceptronfrequency-domaindiscrete-fourier-transform

arXivPDFCodeMarkdown20 min read

AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Forecasting means predicting the next stretch of a series, such as power use, traffic counts or exchange rates, from its recent past. Small multi-layer perceptrons (MLPs) are a cheap way to do this, but they look at the series one point at a time, and they can get lost in the noise between neighbouring points.

FreTS takes the input series and rewrites it as a spectrum, the same kind of view you get from a music equaliser. In that view, each component describes the whole series at once, and the important patterns (the repeating daily or weekly rhythms) sit in a few large components. The model runs small MLPs on those components: one pass mixes information across the series, and another mixes it across time. The result is turned back into a time series and passed to a simple head that outputs the forecast in a single step.

The authors report that this beats several recent forecasting models on most of the benchmarks they ran, while staying simple. The numbers are their own.

TL;DR

  • Learns forecasts with two frequency-domain MLPs. One mixes channels and one mixes time steps, applied after a discrete Fourier transform §3.1 eq. 1 eq. 3 eq. 4.
  • Each frequency-domain MLP is a complex-valued linear layer, written as real and imaginary parts §3.2 eq. 6 eq. 7.
  • Author-reported: MAE 0.120 on Solar and 0.011 on Traffic at horizon 12 tab. 1. On long-term forecasting it is best on most rows of tab. 2.
  • The released code is official, Apache-2.0, and covers the long-term experiments only. Several details differ from the paper, notably the frequency MLP (diagonal weights only) and the channel learner, which the code never runs. See Paper vs code.

Problem

Multivariate forecasting asks for the next τ values of N series given a lookback window of length L §3. The authors argue that point-wise MLPs capture the temporal mapping poorly, cannot model global dependencies, and suffer an information bottleneck on volatile local patterns §1. Transformer and graph models capture more structure but cost more §1 §4.3.

The assumptions behind the method are that the series is regularly sampled, the DFT is a good basis for its periodic and trend structure §3.1, and that most of the signal energy sits in a few frequency components §3.2. Baselines and data are described in §4 and app. B.1–app. B.2.

Method

Overview. The model has three stages §3.1 fig. 2:

  1. Dimension extension. Each input value is multiplied by a learnable vector, so each series element becomes a d-dimensional vector. The authors compare this to word embeddings §3.1.
  2. Frequency learning. A frequency channel learner runs over the N axis for every timestamp, and a frequency temporal learner runs over the L axis for every channel. Both use a discrete Fourier transform, a frequency-domain MLP, and an inverse transform §3.1 eq. 1 eq. 2 eq. 3 eq. 4.
  3. Projection. A two-layer feed-forward network maps the flattened learned representation to τ outputs in one step, avoiding autoregressive error accumulation §3.1 eq. 5.

Domain conversion. The DFT of a signal H is written as the integral of H(v) times e^(−j2πfv) eq. 1. In the discrete setting, the code uses a real FFT, which gives L//2+1 bins for a length-L signal FreTS.py FreTS.py. The paper writes L/2 complex components §3.1. The inverse transform is given by eq. 2. Real and imaginary parts of each component are kept separately §3.1.

Frequency channel learner. For each timestamp l, the learner takes the N-by-d matrix H(:,l) and computes a DFT along the channel axis. It applies one frequency-domain MLP with weights W_chan and biases B_chan, then inverts the transform §3.1 eq. 3. Weights are shared across the L timestamps §3.1.

Frequency temporal learner. For each channel n, the learner computes a DFT along the time axis, applies a frequency-domain MLP with weights W_temp and biases B_temp, then inverts the transform §3.1 eq. 4. Weights are shared across the N channels §3.1.

Frequency-domain MLP. For a complex input H of shape m-by-d and a complex weight matrix W of shape d-by-d with bias B, one layer is σ(HW + B) with σ an activation §3.2 eq. 6. Expanding the complex product gives the real and imaginary outputs eq. 7. The activation σ is not named in the paper. The authors implement the real and imaginary parts as separate real-valued computations and stack them back into a complex tensor §3.2. Each learner uses one such layer by default app. B.3.

Projection. The output is σ(S_t φ1 + b1) φ2 + b2, where S_t is the temporal learner output, φ1 has shape (L·d)-by-d_h, φ2 has shape d_h-by-τ, and d_h is the hidden width §3.1 eq. 5. The activation σ is not named.

Theoretical claims. The paper states two results. (i) Parseval-type energy equality: the energy of a series in time equals its energy in frequency §3.2 eq. 8. The authors use it to argue that energy concentrates in few components §3.2 fig. 1. (ii) A frequency-domain MLP with complex weights equals a global circular convolution in the time domain §3.2 eq. 9. Both proofs are in app. D.1 and app. D.2.

Pseudocode for the whole model (the [code: …] tags show where the released implementation lives, see Paper vs code):

Pseudocode
# FreTS forward pass  [§3.1] [fig. 2] [eq. 5]
# [code: models/FreTS.py#L88-L101]
# Input: series (B, L, N); output: forecast (B, tau, N)

def frets(series):
    # Dimension extension: lift each value to d dimensions  [§3.1]
    # [code: models/FreTS.py#L34-L40]
    lifted = series_to_hidden(series)            # (B, N, L, d)
    # Frequency channel learner, runs along the N axis  [§3.1] [eq. 3]
    hidden = frequency_channel_learner(lifted)   # (B, N, L, d)
    # Frequency temporal learner, runs along the L axis  [§3.1] [eq. 4]
    hidden = frequency_temporal_learner(hidden)  # (B, N, L, d)
    # The released code adds the lifted input back here; eq. 5 has no
    # such term  [code: models/FreTS.py#L93] [code: models/FreTS.py#L99]
    hidden = hidden + lifted                     # (B, N, L, d)
    # Two-layer feed-forward head maps the flattened window to tau steps
    # [eq. 5]
    forecast = feed_forward(flatten(hidden))     # (B, N, tau)
    return transpose(forecast)                   # (B, tau, N)
Pseudocode
# Frequency channel learner  [§3.1] [eq. 3]
# [code: models/FreTS.py#L51-L60]
# Input and output: hidden (B, N, L, d)

def frequency_channel_learner(hidden):
    # Real DFT along the channel axis, one signal per timestamp  [eq. 1]
    spectrum = rfft(move_axis(hidden, to=channel))  # (B, L, N//2+1, d)
    # One frequency-domain MLP, weights shared over the L timestamps  [§3.2]
    spectrum = frequency_mlp(spectrum, channel_weights, channel_biases)
    # Inverse DFT back to N channels, then restore the axis order  [eq. 2]
    return move_axis(irfft(spectrum, n=N), to=time)  # (B, N, L, d)
Pseudocode
# Frequency temporal learner  [§3.1] [eq. 4]
# [code: models/FreTS.py#L43-L48]
# Input and output: hidden (B, N, L, d)

def frequency_temporal_learner(hidden):
    # Real DFT along the time axis, one signal per channel  [eq. 1]
    spectrum = rfft(hidden, axis=time)           # (B, N, L//2+1, d)
    # One frequency-domain MLP, weights shared over the N channels  [§3.1]
    spectrum = frequency_mlp(spectrum, temporal_weights, temporal_biases)
    # Inverse DFT back to L steps  [eq. 2]
    return irfft(spectrum, n=L, axis=time)       # (B, N, L, d)
Pseudocode
# One frequency-domain MLP layer  [§3.2] [eq. 6] [eq. 7]
# [code: models/FreTS.py#L65-L86]
# Input: complex spectrum (B, M, F, d); weights and biases are complex

def frequency_mlp(spectrum, weights, biases):
    # Split the complex input into real and imaginary parts  [eq. 7]
    x_real = real(spectrum)
    x_imag = imag(spectrum)
    # Real part of the complex product plus bias  [eq. 7]
    out_real = x_real @ real(weights) - x_imag @ imag(weights)
    out_real = out_real + real(biases)
    # Imaginary part of the complex product plus bias  [eq. 7]
    out_imag = x_real @ imag(weights) + x_imag @ real(weights)
    out_imag = out_imag + imag(biases)
    # Activation sigma is not named in the paper; the code uses ReLU
    # on each part, then a soft-shrink  [code: models/FreTS.py#L71-L84]
    out_real = activation(out_real)
    out_imag = activation(out_imag)
    # Stack the two parts back into one complex tensor  [§3.2]
    return complex(out_real, out_imag)           # (B, M, F, d)

Hyperparameters

Values in quotes are as written in the paper. "Not stated" means the paper does not give the value. Code defaults are listed where the code provides them, with the caveat that the released code covers the long-term experiments only.

NameValueWhereNotes
embedding size d128app. B.3 FreTS.pyHard-coded in the code, not a command-line flag
hidden size d_h256app. B.3 FreTS.pyHidden width of the feed-forward head eq. 5
frequency MLP layers per learner1app. B.3"one layer" by default
channel learner, long-termoff for τ = 336 and 720app. B.3Channel-independent mode, temporal learner only
short-term batch size32 (Solar, METR-LA, ECG, COVID-19, Electricity); 4 (Wiki, Traffic)app. B.3
batch size search{4, 8, 16, 32}app. B.3Tuned on the validation set for some datasets
lossMSE§4 exp_main.py
metricsMAE, RMSE§4
normalisationmin-max, fit on training split§4 data_loader.py
split, most datasets7:2:1§4ETT is not 7:2:1 in the code, see Paper vs code
split, COVID-196:2:2§4
short-term lookback and horizon12 and 12§4.1 tab. 1Multi-step: horizons 3, 6, 9, 12 app. F.1
long-term lookback96 (Traffic: 48 per text)§4.1 app. B.3The caption of tab. 2 says 96 for all except Traffic; see Pitfalls
long-term horizons{96, 192, 336, 720}; Traffic {48, 96, 192, 336}§4.1 tab. 2
optimizerNot stated in paper; code uses Adamexp_main.py
learning rateNot stated in paper; code default 0.0001run_longExp.py
epochsNot stated in paper; code default 10run_longExp.py
early-stopping patienceNot stated in paper; code default 3run_longExp.py
learning-rate scheduleNot stated in paper; code halves the rate each epochtools.py exp_main.py
weight initialisation scaleNot stated in paper; code uses 0.02 times a standard normalFreTS.py
embedding initialisationNot stated in paper; code uses a standard normal, no scaleFreTS.py
soft-shrink thresholdNot stated in paper; code uses 0.01FreTS.py FreTS.py
activation σ (frequency MLP)Not stated in paper; code uses ReLUFreTS.py
activation (head)Not stated in paper; code uses LeakyReLUFreTS.py
random seedNot stated in paper; code fixes 2021run_longExp.py
hardware and framework1 × NVIDIA RTX 3080 10 GB, PyTorch 1.8§4

Results

Author-reported. Setup: thirteen benchmarks, as described in §4 and app. B.1. Table 1 covers six short-term datasets with horizon 12 and thirteen baselines. Table 2 covers six long-term datasets. The paper does not state random seeds and reports no variance. The text says the paper uses seven short-term benchmarks (the seventh is METR-LA, in app. F.1).

Short-term, horizon 12 tab. 1. Columns are MAE and RMSE per dataset.

ModelSolar MAESolar RMSEWiki MAEWiki RMSETraffic MAETraffic RMSEECG MAEECG RMSEElectricity MAEElectricity RMSECOVID-19 MAECOVID-19 RMSE
VAR0.1840.2340.0520.0940.5351.1330.1200.1700.1010.1630.2260.326
SFM0.1610.2830.0810.1560.0290.0440.0950.1350.0860.1290.2050.308
LSTNet0.1480.2000.0540.0900.0260.0570.0790.1150.0750.1380.2480.305
TCN0.1760.2220.0940.1420.0520.0670.0780.1070.0570.0830.3170.354
DeepGLO0.1780.4000.1100.1130.0250.0370.1100.1630.0900.1310.1690.253
Reformer0.2340.2920.0470.0830.0290.0420.0620.0900.0780.1290.1520.209
Informer0.1510.1990.0510.0860.0200.0330.0560.0850.0740.1230.2000.259
Autoformer0.1500.1930.0690.1030.0290.0430.0550.0810.0560.0830.1590.211
FEDformer0.1390.1820.0680.0980.0250.0380.0550.0800.0550.0810.1600.219
GraphWaveNet0.1830.2380.0610.1050.0130.0340.0930.1420.0940.1400.2010.255
StemGNN0.1760.2220.1900.2550.0800.1350.1000.1300.0700.1010.4210.508
MTGNN0.1510.2070.1010.1400.0130.0300.0900.1390.0770.1130.3940.488
AGCRN0.1230.2140.0440.0790.0840.1660.0550.0800.0740.1160.2540.309
FreTS (this model)0.1200.1620.0410.0740.0110.0230.0530.0780.0500.0760.1230.167

Source: tab. 1. The paper reports an average gain of 9.4% in MAE and 11.6% in RMSE over the baselines §4.1. This average is not recomputed here.

Long-term tab. 2. Cells are MAE / RMSE.

DatasetHorizonFreTSPatchTSTLTSF-LinearFEDformerAutoformerInformerReformer
Weather960.032 / 0.0710.034 / 0.0740.040 / 0.0810.050 / 0.0880.064 / 0.1040.101 / 0.1390.108 / 0.152
Weather1920.040 / 0.0810.042 / 0.0840.048 / 0.0890.051 / 0.0920.061 / 0.1030.097 / 0.1340.147 / 0.201
Weather3360.046 / 0.0900.049 / 0.0940.056 / 0.0980.057 / 0.1000.059 / 0.1010.115 / 0.1550.154 / 0.203
Weather7200.055 / 0.0990.056 / 0.1020.065 / 0.1060.064 / 0.1090.065 / 0.1100.132 / 0.1750.173 / 0.228
Exchange960.037 / 0.0510.039 / 0.0520.038 / 0.0520.050 / 0.0670.050 / 0.0660.066 / 0.0840.126 / 0.146
Exchange1920.050 / 0.0670.055 / 0.0740.053 / 0.0690.064 / 0.0820.063 / 0.0830.068 / 0.0880.147 / 0.169
Exchange3360.062 / 0.0820.071 / 0.0930.064 / 0.0850.080 / 0.1050.075 / 0.1010.093 / 0.1270.157 / 0.189
Exchange7200.088 / 0.1100.132 / 0.1660.092 / 0.1160.151 / 0.1830.150 / 0.1810.117 / 0.1700.166 / 0.201
Traffic480.018 / 0.0360.016 / 0.0320.020 / 0.0390.022 / 0.0360.026 / 0.0420.023 / 0.0390.035 / 0.053
Traffic960.020 / 0.0380.018 / 0.0350.022 / 0.0420.023 / 0.0440.033 / 0.0500.030 / 0.0470.035 / 0.054
Traffic1920.019 / 0.0380.020 / 0.0390.020 / 0.0400.022 / 0.0420.035 / 0.0530.034 / 0.0530.035 / 0.054
Traffic3360.020 / 0.0390.021 / 0.0400.021 / 0.0410.021 / 0.0400.032 / 0.0500.035 / 0.0540.035 / 0.055
Electricity960.039 / 0.0650.041 / 0.0670.045 / 0.0750.049 / 0.0720.051 / 0.0750.094 / 0.1240.095 / 0.125
Electricity1920.040 / 0.0640.042 / 0.0660.043 / 0.0700.049 / 0.0720.072 / 0.0990.105 / 0.1380.121 / 0.152
Electricity3360.046 / 0.0720.043 / 0.0670.044 / 0.0710.051 / 0.0750.084 / 0.1150.112 / 0.1440.122 / 0.152
Electricity7200.052 / 0.0790.055 / 0.0810.054 / 0.0800.055 / 0.0770.088 / 0.1190.116 / 0.1480.120 / 0.151
ETTh1960.061 / 0.0870.065 / 0.0910.063 / 0.0890.072 / 0.0960.079 / 0.1050.093 / 0.1210.113 / 0.143
ETTh11920.065 / 0.0910.069 / 0.0940.067 / 0.0940.076 / 0.1000.086 / 0.1140.103 / 0.1370.120 / 0.148
ETTh13360.070 / 0.0960.073 / 0.0990.070 / 0.0970.080 / 0.1050.088 / 0.1190.112 / 0.1450.124 / 0.155
ETTh17200.082 / 0.1080.087 / 0.1130.082 / 0.1080.090 / 0.1160.102 / 0.1360.125 / 0.1570.126 / 0.155
ETTm1960.052 / 0.0770.055 / 0.0820.055 / 0.0800.063 / 0.0870.081 / 0.1090.070 / 0.0960.065 / 0.089
ETTm11920.057 / 0.0830.059 / 0.0850.060 / 0.0870.068 / 0.0930.083 / 0.1120.082 / 0.1070.081 / 0.108
ETTm13360.062 / 0.0890.064 / 0.0910.065 / 0.0930.075 / 0.1020.091 / 0.1250.090 / 0.1190.100 / 0.128
ETTm17200.069 / 0.0960.070 / 0.0970.072 / 0.0990.081 / 0.1080.093 / 0.1260.115 / 0.1490.132 / 0.163

Source: tab. 2. Lookback 96 except Traffic (48 per §4.1). The paper says FreTS "outperforms all baselines on all datasets" §4.1. Table 2 does not support that wording for Traffic at horizons 48 and 96, or for Electricity at horizon 336 (see Pitfalls). The paper reports an average MAE and RMSE improvement of more than 20% over the best Transformer-based model §4.1.

Channel and temporal learner ablation tab. 3. Cells are MAE / RMSE. FreCL removes the temporal learner and FreTL removes the channel learner. Note that the released code cannot run the channel learner (see Paper vs code).

VariantElectricity 12/12METR-LA 12/12Exchange 96/336Weather 96/336
FreCL0.054 / 0.0800.086 / 0.1680.067 / 0.0860.051 / 0.094
FreTL0.058 / 0.0860.085 / 0.1670.065 / 0.0850.047 / 0.091
FreTS0.050 / 0.0760.080 / 0.1660.062 / 0.0820.046 / 0.090

Source: tab. 3 §4.2.

Frequency MLP as a drop-in for DLinear and NLinear tab. 4. The paper replaces the linear layers in DLinear and NLinear with the frequency-domain MLP. Lookback 96. Cells are MAE / RMSE.

ModelExchange 96Exchange 192Exchange 336Exchange 720Weather 96Weather 192Weather 336Weather 720
DLinear0.037 / 0.0510.054 / 0.0720.071 / 0.0950.095 / 0.1190.041 / 0.0810.047 / 0.0890.056 / 0.0980.065 / 0.106
DLinear (FreMLP)0.036 / 0.0490.053 / 0.0710.063 / 0.0710.086 / 0.1010.038 / 0.0780.045 / 0.0860.055 / 0.0970.061 / 0.100
NLinear0.037 / 0.0510.051 / 0.0690.069 / 0.0930.115 / 0.1460.037 / 0.0810.045 / 0.0890.052 / 0.0980.058 / 0.106
NLinear (FreMLP)0.036 / 0.0500.049 / 0.0670.067 / 0.0910.109 / 0.1390.035 / 0.0760.043 / 0.0840.050 / 0.0940.057 / 0.103

Source: tab. 4 §4.2.

Multi-step short-term on METR-LA tab. 8 app. F.1. Lookback 12, horizons 3, 6, 9 and 12. Cells are MAE / RMSE. Some baselines use pre-defined graphs (STGCN, DCRNN, TAMP-S2GCNets, not in this table).

Modelh=3h=6h=9h=12
Reformer0.086 / 0.1540.097 / 0.1760.107 / 0.1930.118 / 0.206
Informer0.082 / 0.1560.094 / 0.1760.108 / 0.1930.125 / 0.214
Autoformer0.087 / 0.1490.091 / 0.1620.106 / 0.1780.099 / 0.184
FEDformer0.064 / 0.1270.073 / 0.1450.079 / 0.1600.086 / 0.175
DCRNN0.160 / 0.2040.191 / 0.2430.216 / 0.2690.241 / 0.291
STGCN0.058 / 0.1330.080 / 0.1770.102 / 0.2090.128 / 0.238
GraphWaveNet0.180 / 0.3660.184 / 0.3750.196 / 0.3820.202 / 0.386
MTGNN0.135 / 0.2940.144 / 0.3070.149 / 0.3280.153 / 0.316
StemGNN0.052 / 0.1150.069 / 0.1410.080 / 0.1620.093 / 0.175
AGCRN0.062 / 0.1310.086 / 0.1650.099 / 0.1880.109 / 0.204
FreTS (this model)0.050 / 0.1130.066 / 0.1400.076 / 0.1580.080 / 0.166

Source: tab. 8. The text says FreTS beats all baselines at all steps app. F.1. In tab. 8, FreTS has the lowest value in every cell; the closest baseline is StemGNN (MAE 0.052 at h=3 against 0.050 for FreTS).

Multi-step short-term on COVID-19 tab. 9 app. F.1. Lookback 12. Cells are MAE / RMSE.

Modelh=3h=6h=9h=12
Reformer0.212 / 0.2820.139 / 0.1860.148 / 0.1970.152 / 0.209
Informer0.234 / 0.3120.190 / 0.2450.184 / 0.2420.200 / 0.259
Autoformer0.212 / 0.2800.144 / 0.1910.152 / 0.2010.159 / 0.211
FEDformer0.246 / 0.3280.169 / 0.2420.175 / 0.2470.160 / 0.219
GraphWaveNet0.092 / 0.1290.133 / 0.1790.171 / 0.2250.201 / 0.255
StemGNN0.247 / 0.3180.344 / 0.4290.359 / 0.4420.421 / 0.508
AGCRN0.130 / 0.1720.171 / 0.2180.224 / 0.2770.254 / 0.309
MTGNN0.276 / 0.3790.446 / 0.5130.484 / 0.5480.394 / 0.488
TAMP-S2GCNets0.140 / 0.1900.150 / 0.2000.170 / 0.2300.180 / 0.230
FreTS (this model)0.071 / 0.1030.093 / 0.1310.109 / 0.1480.124 / 0.164

Source: tab. 9. In tab. 9, FreTS has the lowest value in every cell; the closest baseline at h=3 is GraphWaveNet (MAE 0.092 against 0.071 for FreTS).

Efficiency §4.3 fig. 4. The paper states complexity O(N log N + L log L). On Wiki (N from 1000 to 5000, horizon 12), it reports the number of parameters does not depend on N, and against AGCRN, about 30% fewer parameters and about 20% less training time §4.3. On Exchange (horizon 96 to 480), it reports at least 3× fewer parameters than FEDformer, Autoformer and Informer, and training 3× faster than Informer, 5× faster than Autoformer and more than 10× faster than FEDformer §4.3. These are author-reported.

Parameter sensitivity app. E.3 fig. 6. On ECG with horizon 12, the paper sweeps input length over {6, 12, ..., 60} and embedding size over {32, 64, 128, 256, 512}. It reports that accuracy first rises and then falls with input length, and with embedding size app. E.3. The per-value numbers are only in the figure.

Learned weights §4.4 fig. 5 app. E.2 app. B.4. Visualisations of the real and imaginary weight matrices on Traffic show clear diagonal patterns §4.4 fig. 5. The paper claims the real part matters more than the imaginary part app. E.2. The ablation table for real and imaginary inputs is tab. 7. This table is not transcribed here.

Paper vs code

The official code is at code and code_commit (repository: aikunyi/FreTS). Its LICENSE is Apache-2.0. Its header line reads "Copyright 2022 DLinear Authors", so the code appears to be derived from the DLinear/LTSF-Linear codebase. The repository only contains the long-term experiments run_longExp.py. The short-term experiments, including Solar, Wiki, METR-LA, ECG and COVID-19 in tab. 1, tab. 8 and tab. 9, have no script in the repository.

Differences between the paper and the code at code_commit:

  • Frequency MLP weights are used diagonally. The paper writes the layer as a complex d-by-d matrix product §3.2 eq. 6 eq. 7. The code computes einsum('bijd,dd->bijd', x, r), which multiplies each feature by the diagonal entry r[d, d] and drops the off-diagonal entries [code: models/FreTS.py#L71-L81]. The off-diagonal entries of r1, i1, r2 and i2 get no gradient and have no effect.
  • The channel learner is never executed. The code tests self.channel_independence == '1' FreTS.py. The flag is parsed as an integer run_longExp.py, so the comparison is always false. The temporal learner is the only one that runs. This also means the channel-learner results in tab. 3 cannot be reproduced from the code as shipped. The paper says the channel learner is part of the default model app. B.3 §3.1.
  • Residual connection. The code adds the lifted input back before the head FreTS.py FreTS.py. Equation 5 has no such term eq. 5.
  • Activation and soft-shrink. The paper leaves σ unnamed §3.2 eq. 6. The code applies ReLU to the real and imaginary parts, then a soft-shrink with threshold 0.01 FreTS.py. The soft-shrink is not in the paper.
  • Head activation. The code's head is Linear, LeakyReLU, Linear [code: models/FreTS.py#L27-L31]. The paper leaves σ unnamed eq. 5.
  • Rfft length. The code uses L//2+1 bins FreTS.py. The paper writes L/2 §3.1.
  • Dataset split for ETT. The paper uses 7:2:1 §4. The ETT loader uses fixed borders of 12, 4 and 4 months (8640, 2880 and 2880 hours) [code: data_provider/data_loader.py#L47-L48].
  • Training configuration. The paper leaves the optimizer, learning rate, epochs and patience unstated. The code uses Adam, learning rate 1e-4, batch size 8, 10 epochs, patience 3, and halves the rate each epoch [code: exp/exp_main.py#L43] run_longExp.py [code: utils/tools.py#L11-L12]. The code default batch size (8) lies in the paper's search set {4, 8, 16, 32} app. B.3, but the paper does not say which value it used for the long-term tables.
  • Traffic lookback. §4.1 gives lookback 48 for Traffic. The caption of tab. 2 gives lookback 96 for all datasets except Traffic, whose horizons are 48 to 336. The code has no Traffic script, so this cannot be checked.
  • No discrepancy found for embedding width 128, hidden width 256, MSE loss exp_main.py, min-max normalisation fitted on the training split data_loader.py, or lookback 96 and horizons for ETT and Weather run_longExp.py.

Pitfalls

  • Diagonal versus full weight matrix. Implementations that follow eq. 6 and eq. 7 will have d² trainable weights per layer and will not match the released model. Implementations that follow the code will train only d diagonal entries per weight. Theorem 2 eq. 9 is stated for the full complex matrix, so it does not directly describe the released layer.
  • The channel learner is off in the released code. Results for FreCL/FreTL tab. 3 and any short-term setup that depends on the channel learner cannot be checked with this repository.
  • Activation and initialisation are unstated. The σ in the frequency MLP and the head, the initial scale of the frequency weights and the embedding, and the soft-shrink threshold are not in the paper. The code choices are in the Hyperparameters table and may change results.
  • Residual term. The code's residual connection (lifted input added back before the head) is not in the paper's equations. Reproductions that follow the paper alone will differ from the code.
  • Numerical sensitivity of the frequency representation. The frequency representation uses an orthonormal FFT (norm='ortho') in the code [code: models/FreTS.py#L45] FreTS.py, and the inverse uses the same normalisation FreTS.py. Changing the normalisation changes the scale of every frequency component, and the paper does not state it.
  • Claims in the text are stronger than the tables. §4.1 says FreTS "outperforms all baselines on all datasets" for long-term forecasting. In tab. 2, PatchTST has the lower MAE and RMSE on Traffic at horizons 48 and 96 (MAE 0.016 vs 0.018 and 0.018 vs 0.020), and on Electricity at horizon 336 (MAE 0.043 vs 0.046). LTSF-Linear ties FreTS on ETTh1 at horizon 720.
  • Baseline count. §4 refers to thirteen baselines for short-term forecasting, which matches tab. 1. app. B.2 refers to eighteen baselines.
  • Short-term data loading is not in the repository. Solar, Wiki, METR-LA, ECG and COVID-19 short-term settings have no code. The ECG and COVID-19 CSVs are in dataset/, but the repository does not contain the short-term training loop.
  • Averages are not recomputed. The paper's averaged gains (9.4% MAE, 11.6% RMSE for short-term; more than 20% for long-term against Transformers) are given in the text and can be checked against tab. 1 and tab. 2 only by computing them yourself.
  • No variance reported. The paper gives no repeated runs or significance tests. The code fixes seed 2021 run_longExp.py. Gaps of 0.001 in MAE, as in several rows of tab. 2, have no error bars to judge them by.

Lineage

  • Builds on: Discrete Fourier transform eq. 1 eq. 2. The paper adopts the LTSF-Linear experimental protocol for long-term forecasting app. B.3 and reuses the DLinear and NLinear linear-model setups as ablation targets §4.2 tab. 4. The lookback of 96 follows FEDformer and Autoformer app. B.3.
  • Compared against: VAR, SFM, LSTNet, TCN, DeepGLO, Reformer, Informer, Autoformer, FEDformer, GraphWaveNet, StemGNN, MTGNN, AGCRN (short-term); PatchTST, LTSF-Linear, FEDformer, Autoformer, Informer, Reformer (long-term) §4 tab. 1 tab. 2. The paper also names TAMP-S2GCNets, DCRNN and STGCN for graph-based short-term comparisons §4 tab. 9 tab. 8.
  • Related frequency-domain forecasters named by the authors: SFM, StemGNN, Autoformer, FEDformer, CoST and FiLM §2. These are not cards in this wiki yet, so they are not linked.
  • Superseded by: not known from content in this wiki.

Source and license

Adapted from “Frequency-domain MLPs are More Effective Learners in Time Series Forecasting” by Kun Yi, Qi Zhang, Wei Fan, Shoujin Wang, Pengyang Wang, Hui He, Defu Lian, Ning An, Longbing Cao, Zhendong Niu (arXiv:2311.06184), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/aikunyi/FreTS at commit 6de28ab19f83 (Apache-2.0). Any quoted code is shown under that license.