wikillm

Paper · 2022-05-26 · cs.AI, cs.LG

Are Transformers Effective for Time Series Forecasting?

LTSF-Linear: one linear layer maps the last 336 values of each variate to the next T values in one shot. DLinear adds a trend/seasonal split, NLinear subtracts the last value. On nine benchmarks the best linear model has lower MSE than the best Transformer forecaster in all 36 dataset-horizon cells, often by a wide margin. Author-reported.

Time series forecastingAttention mechanismDirect multi-step forecastingSeries decompositiontime-seriesforecastingtransformerlinear-model

arXivPDFCodeMarkdown18 min read

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

In plain words

Transformers became the dominant architecture for language and images, and a wave of papers then used them to predict long stretches of future values in a time series, such as electricity load or road traffic. This paper asks whether that works. Its argument is that attention treats its inputs as an unordered set, so it loses the order of the points unless extra position signals are added, and in a time series the order is most of the information.

To test this, the authors build LTSF-Linear, a single linear layer that reads the recent values and writes out all the future values at once. Two variants add a split into a slow trend and a remainder (DLinear), or shift the input so that it is centred on its last value to handle drifting levels (NLinear). On nine public benchmarks, the best of these simple models beats the published Transformer forecasters in every dataset and horizon the paper tests, often by a large margin.

The takeaway is not that linear models are the answer. It is that the claims for Transformers need stricter checks, and that a simple linear baseline should be the first thing a new forecaster has to beat.

TL;DR

Long-term forecasting (LTSF) is the task of predicting many future steps from a long look-back window. The paper argues that self-attention's permutation invariance discards temporal order, and tests this with LTSF-Linear. Its three linear models, one layer each, are trained with MSE and reach lower MSE than the best published Transformer forecaster in each of the 36 dataset-horizon cells of the main table (author-reported, tab. 2). Each model is a few lines of code, but the comparison uses different look-back lengths for the two families, so a fair reuse needs the same look-back on both sides.

Problem

Long-term forecasting asks for many future steps at once. Earlier baselines were mostly iterated multi-step (IMS) models, which feed each prediction back as an input and so accumulate error over the horizon §1 §2. Transformer-based LTSF models (Informer, Autoformer, FEDformer, Pyraformer, LogTrans and others) were reported to beat those baselines. The paper hypothesises that the gains come largely from the direct multi-step (DMS) strategy these models use §4.

The paper's concern is attention itself. Self-attention is permutation-invariant, and positional encodings or sub-series tokens only partly restore order, which the paper says leaves "inevitable" temporal information loss §1 §3. The paper also measures the efficiency claim behind these models (cutting the O(L^2) cost of attention). Against a vanilla Transformer with the same decoder, most variants are slower and have more parameters §5.3 tab. 8. The evidence is limited to the nine benchmarks in §5.1 and app. B.1; the authors call for revisiting Transformers on other time series tasks, such as anomaly detection §1.

The authors present LTSF-Linear as a baseline for future work, not as the final model §6.

Method

The paper does not propose a new Transformer. It defines a baseline and two variants, all one-layer linear networks that map a look-back window to a forecast window, and treats them as a reference for LTSF-Transformers §4.

  1. Linear. For each variate i, the forecast is \hat{X}_i = W X_i, with W \in \mathbb{R}^{T \times L} a single linear layer along the time axis. The same W is shared across all variates, so no cross-variate correlation is modelled §4. The paper's formula has no bias term; the code has one (see Paper vs code).
  2. DLinear. The input is split into a trend, a moving average with kernel size 25, and a remainder (seasonal) part §4 app. B.2. Two independent linear layers map each part to the horizon, and the two outputs are summed §4. The paper says the decomposition is borrowed from Autoformer and FEDformer §3 §4.
  3. NLinear. The last observed value of the input is subtracted from the whole window, the linear layer runs, and the value is added back to the output §4. The stated purpose is to reduce distribution shift between training and test periods §4 app. D.1.

Training uses MSE on the forecast window exp_main.py. The hyperparameters are in the next section. The paper's formulas are inline and unnumbered, so they are cited by section.

Pseudocode
# LTSF-Linear  [§4] [code: models/Linear.py#L24]
# Input:  x (B, L, C)   Output: y_hat (B, T, C)

def ltsf_linear(x, weight, bias):
    # Move time last, so one layer maps L past steps to T steps  [§4]
    series = transpose(x, (0, 2, 1))              # (B, C, L)
    # One (T, L) weight shared by all C variates  [§4]
    # The paper's formula has no bias; the code adds one
    # [code: models/Linear.py#L24]
    y_hat = series @ weight.T + bias              # (B, C, T)
    return transpose(y_hat, (0, 2, 1))            # (B, T, C)
Pseudocode
# DLinear  [§4] [code: models/DLinear.py#L17-L18, L48, L86]
# Input:  x (B, L, C)   Output: y_hat (B, T, C)

def dlinear(x, seasonal_layer, trend_layer):
    # Trend: moving average, kernel 25; first and last values repeated at
    # both ends so the length stays L  [§4] [app. B.2]
    trend = moving_average(x, kernel=25)          # (B, L, C)
    # Remainder: what the moving average leaves behind  [§3] [§4]
    seasonal = x - trend                          # (B, L, C)
    # One linear layer per component, then sum the two forecasts  [§4]
    seasonal_hat = seasonal_layer(transpose(seasonal, (0, 2, 1)))
    trend_hat = trend_layer(transpose(trend, (0, 2, 1)))
    return transpose(seasonal_hat + trend_hat, (0, 2, 1))   # (B, T, C)
Pseudocode
# NLinear  [§4] [code: models/NLinear.py#L28-L37]
# Input:  x (B, L, C)   Output: y_hat (B, T, C)

def nlinear(x, linear):
    # Anchor on the last observed value of each variate  [§4]
    # The code detaches the anchor, so no gradient flows through it
    # [code: models/NLinear.py#L28]
    last = stop_gradient(x[:, -1:, :])            # (B, 1, C)
    # Forecast the offsets from the anchor, then add the anchor back  [§4]
    y_hat = linear(x - last) + last               # (B, T, C)
    return y_hat

Hyperparameters

The paper states the look-back length, the decomposition kernel and the dataset splits. Learning rate, batch size, epochs, patience and the optimiser are not in the paper text; it says "For more hyper-parameters of LTSF-Linear, please refer to our code" app. B.2. The values below come from the released code at code_commit.

Per-dataset run settings, from the scripts in scripts/EXP-LongForecasting/Linear/:

DatasetHorizons TLook-back LBatchLearning rateWhere
ETTh196, 192, 336, 720336320.005etth1.sh etth1.sh
ETTh296, 192, 336, 720336320.05etth2.sh
ETTm196, 192, 336, 72033680.0001ettm1.sh
ETTm296, 192 / 336, 720336320.001 / 0.01ettm2.sh ettm2.sh
Electricity96, 192, 336, 720336160.001electricity.sh
Traffic96, 192, 336, 720336160.05traffic.sh
Weather96, 192, 336, 720336160.0001 (no flag, default)weather.sh run_longExp.py
Exchange-Rate96, 192 / 336, 7203368 / 320.0005exchange_rate.sh exchange_rate.sh
ILI24, 36, 48, 60104320.01ili.sh ili.sh

Global settings, with the paper's stated value where there is one:

NameValueWhereNotes
look-back L (default)336app. B.2paper: "L=336 for LTSF-Linear and L=96 for Transformers by default"
DLinear moving-average kernel25app. B.2 DLinear.pysame as Autoformer app. B.2
variatesETT 7, Traffic 862, Electricity 321, Exchange 8, Weather 21, ILI 7tab. 1the ETT figure is per dataset
max epochs10run_longExp.pynot stated in paper
early-stopping patience3 epochsrun_longExp.py tools.pyon validation MSE
optimiserAdam, default settingsexp_main.pyno weight decay set
lossMSEexp_main.py
learning-rate schedulemultiply by 0.5 per epoch, type1tools.py exp_main.pysee Pitfalls for the exact epoch
seed2021run_longExp.py
runs per setting1 (--itr 1)etth1.sh
ETT split8640 / 2880 / 2880 hourly steps (12 / 4 / 4 months of 30 days); ×4 for 15-minute datadata_loader.py data_loader.pyvalidation and test start L steps early for context
other splits70% / 10% / 20% of rows, train / validation / testdata_loader.py
normalisationz-score with the training split's mean and stddata_loader.py data_loader.py data_loader.pyfit on train only

Datasets, from tab. 1 (the paper lists ETT at "5min" granularity, which the appendix and code contradict; see Paper vs code):

DatasetVariatesTimestepsGranularity
ETTh1, ETTh2717,4201 hour
ETTm1, ETTm2769,6805 min (see Paper vs code)
Traffic86217,5441 hour
Electricity32126,3041 hour
Exchange-Rate87,5881 day
Weather2152,69610 min
ILI79661 week

Results

Author-reported. Setup: nine benchmarks, MSE and MAE, horizons T in {96, 192, 336, 720} (ILI: {24, 36, 48, 60}) §5.1 tab. 2. The Linear family uses L=336 and the Transformers L=96 (ILI: 104 in the code) app. B.2. The table note says its Transformer numbers, except Pyraformer, are copied from the FEDformer paper, not re-run. Pyraformer and the three linear models are the authors' runs tab. 2. Each linear setting is one run in the scripts (see Hyperparameters).

Main comparison, MSE / MAE, from tab. 2:

DatasetTLinearNLinearDLinearFEDformerAutoformerInformer
Electricity960.140 / 0.2370.141 / 0.2370.140 / 0.2370.193 / 0.3080.201 / 0.3170.274 / 0.368
Electricity1920.153 / 0.2500.154 / 0.2480.153 / 0.2490.201 / 0.3150.222 / 0.3340.296 / 0.386
Electricity3360.169 / 0.2680.171 / 0.2650.169 / 0.2670.214 / 0.3290.231 / 0.3380.300 / 0.394
Electricity7200.203 / 0.3010.210 / 0.2970.203 / 0.3010.246 / 0.3550.254 / 0.3610.373 / 0.439
Exchange960.082 / 0.2070.089 / 0.2080.081 / 0.2030.148 / 0.2780.197 / 0.3230.847 / 0.752
Exchange1920.167 / 0.3040.180 / 0.3000.157 / 0.2930.271 / 0.3800.300 / 0.3691.204 / 0.895
Exchange3360.328 / 0.4320.331 / 0.4150.305 / 0.4140.460 / 0.5000.509 / 0.5241.672 / 1.036
Exchange7200.964 / 0.7501.033 / 0.7800.643 / 0.6011.195 / 0.8411.447 / 0.9412.478 / 1.310
Traffic960.410 / 0.2820.410 / 0.2790.410 / 0.2820.587 / 0.3660.613 / 0.3880.719 / 0.391
Traffic1920.423 / 0.2870.423 / 0.2840.423 / 0.2870.604 / 0.3730.616 / 0.3820.696 / 0.379
Traffic3360.436 / 0.2950.435 / 0.2900.436 / 0.2960.621 / 0.3830.622 / 0.3370.777 / 0.420
Traffic7200.466 / 0.3150.464 / 0.3070.466 / 0.3150.626 / 0.3820.660 / 0.4080.864 / 0.472
Weather960.176 / 0.2360.182 / 0.2320.176 / 0.2370.217 / 0.2960.266 / 0.3360.300 / 0.384
Weather1920.218 / 0.2760.225 / 0.2690.220 / 0.2820.276 / 0.3360.307 / 0.3670.598 / 0.544
Weather3360.262 / 0.3120.271 / 0.3010.265 / 0.3190.339 / 0.3800.359 / 0.3950.578 / 0.523
Weather7200.326 / 0.3650.338 / 0.3480.323 / 0.3620.403 / 0.4280.419 / 0.4281.059 / 0.741
ILI241.947 / 0.9851.683 / 0.8582.215 / 1.0813.228 / 1.2603.483 / 1.2875.764 / 1.677
ILI362.182 / 1.0361.703 / 0.8591.963 / 0.9632.679 / 1.0803.103 / 1.1484.755 / 1.467
ILI482.256 / 1.0601.719 / 0.8842.130 / 1.0242.622 / 1.0782.669 / 1.0854.763 / 1.469
ILI602.390 / 1.1041.819 / 0.9172.368 / 1.0962.857 / 1.1572.770 / 1.1255.264 / 1.564
ETTh1960.375 / 0.3970.374 / 0.3940.375 / 0.3990.376 / 0.4190.449 / 0.4590.865 / 0.713
ETTh11920.418 / 0.4290.408 / 0.4150.405 / 0.4160.420 / 0.4480.500 / 0.4821.008 / 0.792
ETTh13360.479 / 0.4760.429 / 0.4270.439 / 0.4430.459 / 0.4650.521 / 0.4961.107 / 0.809
ETTh17200.624 / 0.5920.440 / 0.4530.472 / 0.4900.506 / 0.5070.514 / 0.5121.181 / 0.865
ETTh2960.288 / 0.3520.277 / 0.3380.289 / 0.3530.346 / 0.3880.358 / 0.3973.755 / 1.525
ETTh21920.377 / 0.4130.344 / 0.3810.383 / 0.4180.429 / 0.4390.456 / 0.4525.602 / 1.931
ETTh23360.452 / 0.4610.357 / 0.4000.448 / 0.4650.496 / 0.4870.482 / 0.4864.721 / 1.835
ETTh27200.698 / 0.5950.394 / 0.4360.605 / 0.5510.463 / 0.4740.515 / 0.5113.647 / 1.625
ETTm1960.308 / 0.3520.306 / 0.3480.299 / 0.3430.379 / 0.4190.505 / 0.4750.672 / 0.571
ETTm11920.340 / 0.3690.349 / 0.3750.335 / 0.3650.426 / 0.4410.553 / 0.4960.795 / 0.669
ETTm13360.376 / 0.3930.375 / 0.3880.369 / 0.3860.445 / 0.4590.621 / 0.5371.212 / 0.871
ETTm17200.440 / 0.4350.433 / 0.4220.425 / 0.4210.543 / 0.4900.671 / 0.5611.166 / 0.823
ETTm2960.168 / 0.2620.167 / 0.2550.167 / 0.2600.203 / 0.2870.255 / 0.3390.365 / 0.453
ETTm21920.232 / 0.3080.221 / 0.2930.224 / 0.3030.269 / 0.3280.281 / 0.3400.533 / 0.563
ETTm23360.320 / 0.3730.274 / 0.3270.281 / 0.3420.325 / 0.3660.339 / 0.3721.363 / 0.887
ETTm27200.413 / 0.4350.368 / 0.3840.397 / 0.4210.421 / 0.4150.433 / 0.4323.379 / 1.338

Remaining baselines, MSE / MAE, same source tab. 2:

DatasetTPyraformerLogTransRepeat (last value)
Electricity960.386 / 0.4490.258 / 0.3571.588 / 0.946
Electricity1920.386 / 0.4430.266 / 0.3681.595 / 0.950
Electricity3360.378 / 0.4430.280 / 0.3801.617 / 0.961
Electricity7200.376 / 0.4450.283 / 0.3761.647 / 0.975
Exchange960.376 / 1.1050.968 / 0.8120.081 / 0.196
Exchange1921.748 / 1.1511.040 / 0.8510.167 / 0.289
Exchange3361.874 / 1.1721.659 / 1.0810.305 / 0.396
Exchange7201.943 / 1.2061.941 / 1.1270.823 / 0.681
Traffic962.085 / 0.4680.684 / 0.3842.723 / 1.079
Traffic1920.867 / 0.4670.685 / 0.3902.756 / 1.087
Traffic3360.869 / 0.4690.734 / 0.4082.791 / 1.095
Traffic7200.881 / 0.4730.717 / 0.3962.811 / 1.097
Weather960.896 / 0.5560.458 / 0.4900.259 / 0.254
Weather1920.622 / 0.6240.658 / 0.5890.309 / 0.292
Weather3360.739 / 0.7530.797 / 0.6520.377 / 0.338
Weather7201.004 / 0.9340.869 / 0.6750.465 / 0.394
ILI241.420 / 2.0124.480 / 1.4446.587 / 1.701
ILI367.394 / 2.0314.799 / 1.4677.130 / 1.884
ILI487.551 / 2.0574.800 / 1.4686.575 / 1.798
ILI607.662 / 2.1005.278 / 1.5605.893 / 1.677
ETTh1960.664 / 0.6120.878 / 0.7401.295 / 0.713
ETTh11920.790 / 0.6811.037 / 0.8241.325 / 0.733
ETTh13360.891 / 0.7381.238 / 0.9321.323 / 0.744
ETTh17200.963 / 0.7821.135 / 0.8521.339 / 0.756
ETTh2960.645 / 0.5972.116 / 1.1970.432 / 0.422
ETTh21920.788 / 0.6834.315 / 1.6350.534 / 0.473
ETTh23360.907 / 0.7471.124 / 1.6040.591 / 0.508
ETTh27200.963 / 0.7833.188 / 1.5400.588 / 0.517
ETTm1960.543 / 0.5100.600 / 0.5461.214 / 0.665
ETTm11920.557 / 0.5370.837 / 0.7001.261 / 0.690
ETTm13360.754 / 0.6551.124 / 0.8321.283 / 0.707
ETTm17200.908 / 0.7241.153 / 0.8201.319 / 0.729
ETTm2960.435 / 0.5070.768 / 0.6420.266 / 0.328
ETTm21920.730 / 0.6730.989 / 0.7570.340 / 0.371
ETTm23361.201 / 0.8451.334 / 0.8720.412 / 0.410
ETTm27203.625 / 1.4513.048 / 1.3280.521 / 0.465

Counts from these tables: the best linear model has lower MSE than the best of the Transformer baselines (FEDformer, Autoformer, Informer, Pyraformer, LogTrans) in all 36 cells. On Exchange-Rate, the Repeat baseline (last value) ties DLinear at T=96 on MSE (0.081) and beats it on MAE (0.196 vs 0.203) tab. 2.

Other results, author-reported:

  • Look-back and temporal relations §5.3 fig. 4 app. C.2: as L grows, the linear models improve, while the Transformer baselines stay flat or get worse (figure only; the text gives no numbers).
  • Close vs far input tab. 3: MSE with the same 720-step target, from the 96 steps just before the horizon ("Close") or 96 steps earlier ("Far").
ModelDatasetCloseFar
FEDformerElectricity0.2510.265
AutoformerElectricity0.2550.287
FEDformerTraffic0.6310.645
AutoformerTraffic0.6770.675
  • Informer simplified to one linear layer tab. 4 (look-back 96, per its caption): MSE for Informer, with attention replaced by linear (Att.-Linear), with other blocks dropped (Embed + Linear), and as a single Linear layer.
DatasetTInformerAtt.-LinearEmbed + LinearLinear
Exchange960.8471.0030.1730.084
Exchange1921.2040.9790.4430.155
Exchange3361.6721.4981.2880.301
Exchange7202.4782.1022.0260.763
ETTh1960.8650.6130.4540.400
ETTh11921.0080.7590.6860.438
ETTh13361.1070.9210.8210.479
ETTh17201.1810.9021.0510.515
  • Input shuffling tab. 5: the paper reports the average drop in MSE after shuffling the input order (Shuf.) or swapping its halves (Half-Ex.), averaged over horizons and five runs. Per-horizon values are in tab. 5.
ModelExchange: Shuf. / Half-Ex.ETTh1: Shuf. / Half-Ex.
Linear27.26% / 46.81%81.06% / 4.78%
FEDformer-0.09% / 0.20%73.28% / 3.44%
Autoformer0.09% / 1.12%56.91% / 0.46%
Informer-0.12% / -0.18%1.98% / 0.18%
  • Embeddings tab. 6: removing positional or timestamp embeddings from Informer, FEDformer and Autoformer on Traffic (values in tab. 6).
  • Shortened training data tab. 7, Traffic, MSE (full vs one year of training data):
ModelTFullOne year
FEDformer960.5870.568
FEDformer1920.6040.584
FEDformer3360.6210.601
FEDformer7200.6260.608
Autoformer960.6130.594
Autoformer1920.6160.621
Autoformer3360.6220.621
Autoformer7200.6600.650
  • Cost tab. 8: Electricity, L=96, T=720, averaged over five runs.
MethodMACsParametersTimeMemory
DLinear0.04G139.7K0.4 ms687 MiB
Transformer (same one-step decoder)4.03G13.61M26.8 ms6091 MiB
Informer3.93G14.39M49.3 ms3869 MiB
Autoformer4.41G14.91M164.1 ms7607 MiB
Pyraformer0.80G241.4M (236.7M from its linear decoder)3.4 ms7017 MiB
FEDformer4.41G20.68M40.5 ms4143 MiB

The univariate ETT results app. C.1 show NLinear winning most settings; the table itself is in the appendix and is not copied here.

Paper vs code

Discrepancies found between the paper and the official code at code_commit:

  • Bias term. The paper's formula is \hat{X}_i = W X_i with no bias §4, and the appendix counts parameters as T \cdot L per linear layer app. B.2. The code builds nn.Linear layers, which include a bias [code: models/Linear.py#L24] DLinear.py. Table 8's DLinear count of 139.7K matches the biased count: 2·96·720 + 2·720 = 139,680, while the appendix's 2·T·L gives 138,240 tab. 8 app. B.2. (This arithmetic is mine, from the code and the table.)
  • Look-back for ILI. The paper gives L=336 for LTSF-Linear by default app. B.2. The ILI script sets seq_len=104 ili.sh.
  • ETTm granularity. tab. 1 lists ETTm at 5-minute granularity. The appendix says the ETTm data is at 15-minute level app. B.1, the loader splits it into blocks of 30-day months ×4 data_loader.py and bins minutes by 15 data_loader.py. The 69,680 steps in tab. 1 is also 4 × 17,420, consistent with 15 minutes. The 5-minute value looks like a typo.
  • Per-variate variant. The paper describes weights shared across variates §4. The code also has a per-channel --individual option for DLinear and the linear model run_longExp.py DLinear.py, run from scripts/EXP-LongForecasting/Linear-I.sh with different learning rates Linear-I.sh. The paper text does not mention it, and the per-dataset scripts in Linear/ do not set it.
  • Error scale. The paper does not say what scale its errors are on. The code computes MSE and MAE on standardised predictions: test() never inverts the scaler exp_main.py before calling the metric exp_main.py. These are not the original units.
  • Repeat baseline and other baselines. The table note says the Transformer numbers are from FEDformer tab. 2; the code for those baselines is not in this repository, so the paper's Transformer numbers were not reproduced here.
  • Consistent items. Decomposition kernel 25 app. B.2 DLinear.py and the NLinear subtract-then-add structure §4 NLinear.py match.

Pitfalls

  • Unequal look-back. The Linear family uses L=336 and the Transformers L=96 app. B.2. The main table therefore compares models at different input lengths. The look-back study §5.3 fig. 4 is a figure with no numbers in the text, so the paper's table does not show Transformers at L=336. For an architecture-only comparison, run both at the same L.
  • "In all cases" needs qualifying. The abstract says LTSF-Linear beats the Transformers "in all cases" [abstract]. Table 2 supports this for the best linear model per cell, but not for every linear model: plain Linear has MSE 0.698 vs FEDformer's 0.463 at ETTh2, T=720, and DLinear 0.605 tab. 2.
  • Single run, no variance. Each linear setting runs once with seed 2021 run_longExp.py etth1.sh. Table 2 gives no run count or spread. Table 5 and Table 8 say five runs. Small gaps between the linear models cannot be read as significant without spread: ETTh1 at T=96 gives 0.375, 0.374 and 0.375 MSE for Linear, NLinear and DLinear tab. 2.
  • Hyperparameters are per dataset. The learning rate varies from 0.0001 to 0.05 across datasets and changes with horizon for ETTm2 [code: scripts/EXP-LongForecasting/Linear/ettm2.sh#L24-L52]. Batch size changes too. None of these is in the paper.
  • Learning-rate schedule. type1 multiplies the learning rate by 0.5 per epoch, with the first halving before the third epoch tools.py exp_main.py. The schedule is called with epoch + 1 after each epoch, so the first two epochs use the base rate.
  • Early stopping. Selection uses validation MSE with patience 3, up to 10 epochs exp_main.py. The test loss is printed each epoch but not used for selection exp_main.py. Keep it that way when you reproduce the numbers.
  • Scaling. Fit the scaler on the training split only data_loader.py and report errors on the standardised scale, as the code does (see Paper vs code).
  • Batch details. Training and validation both use the shuffled loader that drops the last incomplete batch data_factory.py. The validation MSE is a mean of batch means over that loader. Test does not shuffle or drop data_factory.py.
  • NLinear gradient. The last-value anchor is detached, so the gradient ignores its effect on the offset NLinear.py. The paper does not say this.
  • DLinear edge padding. The moving average repeats the first and last values (kernel 25) to keep the length at L DLinear.py. The paper does not state the padding.
  • Table 4 is not Table 2. Table 4's Linear column uses L=96 tab. 4, so its values differ from Table 2's L=336 values (e.g. ETTh1, T=720: 0.515 vs 0.624).
  • IMP. column. The "IMP." column in Table 2 is described only in its caption. It does not match a plain MSE ratio: for ETTh1, T=96 the best linear and best Transformer MSEs (0.374 vs 0.376) give about 0.5%, not 0.80%. It is not reproduced here.
  • Costs are measured, not general. The timing and memory figures are for one GPU and one setting (Electricity, L=96, T=720) tab. 8. Parameter counts include the bias terms (see Paper vs code).
  • Interpretation is a single view. The paper reads the learned weights on Traffic as daily and weekly periodicity app. D.3. That reading comes from the weight plots of one model; the paper does not test it on other models.

Lineage

  • Builds on: decomposition with a moving average from Autoformer and FEDformer §3 §4; direct multi-step output from Informer §3.
  • Compared against: FEDformer, Autoformer, Informer, Pyraformer, LogTrans, and the Repeat baseline §5.1.
  • Superseded by: not recorded in this wiki.

Source and license

Adapted from “Are Transformers Effective for Time Series Forecasting?” by Ailing Zeng, Muxi Chen, Lei Zhang, Qiang Xu (arXiv:2205.13504), 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/cure-lab/LTSF-Linear at commit 0c113668a3b8 (Apache-2.0). Any quoted code is shown under that license.