AI Logic

Datasets and Benchmarks

ETT

Updated:

How ETT is built and used. The left side shows the flow: the oil temperature and 6 kinds of load of two transformers are recorded every 15 minutes for 2 years, turned into four CSVs (ETTm1 and ETTm2 every 15 minutes, ETTh1 and ETTh2 hourly), and split in time order into 12 months for training, 4 months for validation, and 4 months for test. The right side shows the 8 columns of the CSV, how windows are cut to predict future values from a past window, the univariate and multivariate settings, and the evaluation protocol of standardizing with the training mean and standard deviation before measuring MSE and MAE.

Overview

ETT (Electricity Transformer Temperature) is a time-series dataset recording the oil temperature of substation transformers and 6 kinds of power load every 15 minutes over 2 years. Zhou et al. of Beihang University released data collected with a system built together with a power company (Beijing Guowang Fuda Science & Technology Development Company), and presented it in the AAAI 2021 paper Informer.

Oil temperature indicates how much strain a transformer is under. Power demand changes with the day of the week, holidays, seasons, and weather, so predicting it accurately far ahead is hard, and in practice equipment was operated with estimates well above actual demand. If oil temperature can be predicted far ahead, transformers can be run with less waste without damaging them. The data contains this single target value alongside the load values that affect it.

In current deep learning, it is used mainly as a benchmark for long sequence time-series forecasting. A model takes a fixed-length window of past values as input, predicts the next 96–720 steps, and is compared by MSE and MAE on standardized values. Since Informer, papers such as Autoformer, FEDformer, PatchTST, and DLinear have reported results on the four forms of ETT.

ETT values mix short daily and weekly cycles, long seasonal cycles, trends spanning years, and irregular changes. According to the publisher's description, the load values show clear 24-hour and 7-day cycles, whereas the oil temperature varies smoothly over short ranges.

Contents: Construction, Format, and Splits

Construction proceeds as follows.

  1. Record two transformers. Transformer 1 and Transformer 2, located in two regions of the same province in China, were recorded for about 2 years, from July 1, 2016 to June 26, 2018.
  2. Take values every 15 minutes. With 4 readings per hour, each transformer has 69,680 points, each listing the oil temperature and 6 kinds of load.
  3. Also make an hourly version. For quick experiments, a version downsampled to hourly intervals (17,420 points) is also distributed.

These combinations give the following four CSVs (counts checked against Table 2 of the PatchTST paper and the row counts of the distributed CSVs).

NameTransformerIntervalTime stepsColumns (excluding datetime)
ETTh111 hour17,4207
ETTh221 hour17,4207
ETTm1115 minutes69,6807
ETTm2215 minutes69,6807

The original Informer paper used three of them: ETTh1, ETTh2, and ETTm1. Today, the standard is to list all four, including ETTm2, in the form compiled by the authors of the Autoformer paper (according to the PatchTST paper).

Format: a CSV with one time step per row. The 8 columns are the datetime (date), high useful load (HUFL), high useless load (HULL), middle useful load (MUFL), middle useless load (MULL), low useful load (LUFL), low useless load (LULL), and oil temperature (OT). The forecasting target is OT. According to the publisher's description, the load column names abbreviate "useful load" and "useless load".

Splits: the data is divided in time order into 12 months for training, 4 months for validation, and 4 months for test. The official Informer implementation counts a month as 30 days, so for the hourly version it uses the first 8,640, 2,880, and 2,880 points (20 months in total). The remaining 4 or so months are not used. At the start of the validation and test sets, the input window is allowed to extend into the preceding segment.

Standardization is done per column using the mean and standard deviation of the training segment, and the same values are applied to validation and test. The evaluation MSE and MAE are also measured on these standardized values.

Evaluation Protocol

Evaluation takes the form of predicting future values from a past window and reporting MSE and MAE on standardized values for each prediction length.

  1. From the time series, extract every pair of an input window of length LL and the ground truth of length TT immediately after it, sliding by one step at a time.
  2. The model predicts the values y^\hat{y} up to TT steps ahead.
  3. Average over all test windows and steps (and columns in the multivariate case) to obtain MSE and MAE.
  4. Repeat for different TT and list the results in a table. The current standard is T∈{96,192,336,720}T \in \{96, 192, 336, 720\}.
MSE=1n∑i=1n(yi−y^i)2,MAE=1n∑i=1n∣yi−y^i∣\mathrm{MSE} = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2, \qquad \mathrm{MAE} = \frac{1}{n} \sum_{i=1}^{n} |y_i - \hat{y}_i|

There are two settings.

  • Multivariate: all 7 columns are input, and the future of all 7 columns is predicted. Most main tables in current papers use this setting.
  • Univariate: only the oil temperature (OT) is input, and the future of OT is predicted.

MSE heavily penalizes predictions that are far off, while MAE counts the size of the errors as is. Listing both makes it possible to distinguish predictions that occasionally miss badly from predictions that are always slightly off.

Multivariate results on ETTh1 reported in the PatchTST paper are as follows (Table 3; DLinear results are for input length L=336L = 336; FEDformer, Autoformer, and Informer are the best results after the PatchTST authors tried 6 values of LL from 24 to 720).

ModelInput length LLMSE (T=96T = 96)MAE (T=96T = 96)MSE (T=720T = 720)MAE (T=720T = 720)
InformerBest of 60.9410.7691.1440.857
AutoformerBest of 60.4350.4460.5150.517
FEDformerBest of 60.3760.4150.4690.492
DLinear3360.3750.3990.4720.490
PatchTST/423360.3750.3990.4490.466

DLinear, which does not use a Transformer, achieves values as good as or better than many Transformer-based models. ETT is small, with only 7 columns, so more complex models are not necessarily at an advantage.

ETT numbers change greatly with the input length LL, the prediction length TT, multivariate versus univariate, and whether they were measured on standardized values. The original Informer paper used TT from 24 to 720, a different setting from later papers, so the values in its tables cannot be compared directly. When comparing, check that these settings match.

Usage and Historical Significance

ETT is the dataset that made it possible to compare time-series research on "forecasting far ahead" with a common yardstick.

  • Raising the problem of long-horizon forecasting (2021): the Informer paper showed on ETT that the error of an LSTM increases sharply when the prediction length is extended beyond 48, and tackled long-horizon forecasting with a Transformer whose self-attention computation was reduced. The paper received the AAAI 2021 Best Paper Award.
  • A venue for comparing Transformer-based forecasting (2021–2023): Autoformer, FEDformer, and others reported results in common tables listing the four forms of ETT alongside electricity, traffic, weather, and other data. The tables in the PatchTST paper also include Pyraformer and others.
  • Re-examining simple models (2022–2023): DLinear, which does not use a Transformer, showed results on par with Transformer-based models on ETT and other data, and PatchTST further reduced the error by splitting series into small segments (patches) and treating each column independently.

Because its shape, one target value alongside a few related values, is common in real-world operations, it continues to be used as the first testbed for new time-series models.

Caveats

License: the license of the publisher's GitHub repository (zhouhaoyi/ETDataset) is CC BY-ND 4.0 (Attribution-NoDerivatives). When using it, credit the authors and source; the publisher asks users to cite the Informer paper.

CC BY-ND does not permit distributing modified data. If you want to distribute a processed version of ETT (with added columns, imputed values, re-segmentation, etc.), share only the original CSV and the processing steps, or confirm permission with the authors. Commercial use itself is permitted under the CC BY-ND terms as long as attribution is given.

Small size: each hourly version has 17,420 points, of which 8,640 are for training. With only 7 columns, large models easily overfit, and the variation of values across random seeds is also large. The PatchTST paper, too, switches to a setting with fewer parameters for these datasets.

Splits in time order: training, validation, and test are arranged in time order, so the test period contains seasonal changes and trends not present in the training period. Splitting windows randomly mixes future values into training and makes results look too good, so keep the time-ordered split.

Mismatch between standardization and evaluation: the standard is to measure MSE and MAE on standardized values. They cannot be compared with numbers in papers measured in the original units (°C or load values).

Shift in the target value: in the publisher's plots, the oil temperature shows large seasonal changes and gradual changes over the 2 years. Since standardization uses the mean and standard deviation of the 12 training months, errors can come out large if the range of values in the test period is shifted. PatchTST uses Instance Normalization, which normalizes each input window, to mitigate such distribution shifts.

Comparison with Similar Datasets

The datasets commonly used together for long-horizon time-series forecasting, compared from the same perspectives, are as follows (counts are from Table 2 and Appendix A.1.1 of the PatchTST paper).

DatasetContentsColumnsTime stepsInterval
ETTh1, ETTh2Transformer oil temperature and loads717,4201 hour
ETTm1, ETTm2Same (every 15 minutes)769,68015 minutes
WeatherGerman weather (humidity, temperature, etc.)2152,696―
ElectricityPower consumption of 321 customers32126,3041 hour
TrafficRoad occupancy measured by sensors on San Francisco freeways86217,544―
ILIRatio of patients with influenza-like illness79661 week

Rough guidelines for choosing are as follows.

  • To quickly try out a new forecasting model, use ETTh1 and ETTh2. They are small, and training and evaluation finish in a short time.
  • To assess the ability to handle fine intervals and long inputs, use ETTm1 and ETTm2. Over the same 2 years, they have 4 times as many time steps.
  • To assess robustness with many columns (how relationships between columns are used), also use Electricity and Traffic. The PatchTST paper also notes that larger datasets are less prone to overfitting and give more stable results.
  • When reporting results in a paper, the standard is to list not only the four ETT datasets but also these larger datasets.

PyTorch example

Show code
python
import numpy as np
import pandas as pd
import torch
from torch.utils.data import DataLoader, Dataset

"""
Load the ETT-small CSVs (ETTh1.csv etc.) with the same splits and standardization as the official Informer implementation
  Columns: date, HUFL, HULL, MUFL, MULL, LUFL, LULL, OT (OT is the forecasting target)
  Splits: in time order, 12 months training, 4 months validation, 4 months test (a month counts as 30 days)
"""


class ETT(Dataset):
  def __init__(self, path='ETTh1.csv', split='train', seq_len=96, pred_len=96, multivariate=True, steps_per_hour=1):
    # steps_per_hour: 1 for ETTh, 4 for ETTm (every 15 minutes)
    df = pd.read_csv(path)
    cols = df.columns[1:] if multivariate else ['OT']  # multivariate uses 7 columns, univariate uses OT only
    values = df[cols].values.astype(np.float32)

    month = 30 * 24 * steps_per_hour
    starts = [0, 12 * month - seq_len, 16 * month - seq_len]  # the first windows of validation and test may extend into the preceding segment
    ends = [12 * month, 16 * month, 20 * month]
    i = ['train', 'val', 'test'].index(split)

    train = values[:ends[0]]
    self.mean, self.std = train.mean(0), train.std(0)  # standardization uses only the mean and std of the training segment
    self.data = (values[starts[i]:ends[i]] - self.mean) / self.std
    self.seq_len, self.pred_len = seq_len, pred_len

  def __len__(self):
    return len(self.data) - self.seq_len - self.pred_len + 1  # number of windows sliding one step at a time

  def __getitem__(self, k):
    x = self.data[k:k + self.seq_len]
    y = self.data[k + self.seq_len:k + self.seq_len + self.pred_len]
    return torch.from_numpy(x), torch.from_numpy(y)  # [L, columns], [T, columns]


@torch.no_grad()
def evaluate(model, loader):
  # MSE and MAE on standardized values, averaged over all windows, steps, and columns
  model.eval()
  se, ae, n = 0.0, 0.0, 0
  for x, y in loader:
    pred = model(x)  # [B, T, columns]
    se += ((pred - y) ** 2).sum().item()
    ae += (pred - y).abs().sum().item()
    n += y.numel()
  return se / n, ae / n


for pred_len in [96, 192, 336, 720]:
  train_loader = DataLoader(ETT(split='train', pred_len=pred_len), batch_size=32, shuffle=True)
  test_loader = DataLoader(ETT(split='test', pred_len=pred_len), batch_size=32)
  # train with model.train() (the loss is usually MSE), then get MSE and MAE with evaluate(model, test_loader)

FAQ

Q. How do ETTh1 and ETTm1 differ?
A.

They are data from the same Transformer 1 over the same period, recorded at different intervals. ETTm1 is every 15 minutes (69,680 points), and ETTh1 is the hourly version of it (17,420 points). Even with the same T=96T = 96, ETTh1 predicts 4 days ahead, whereas ETTm1 predicts 1 day ahead.

Q. Papers report MSE of about 0.4, so how many degrees off is the oil temperature?
A.

MSE and MAE in papers are measured on values standardized with the mean and standard deviation of the training segment. To know the error in the original units (°C), multiply the predictions and ground truth by the standard deviation, add the mean to restore them, and then measure. It helps to think of MSE on standardized values as an average in which the scale of variation of each column has been equalized.

Q. Can ETT be used to develop commercial products?
A.

The publisher's license is CC BY-ND 4.0, which permits commercial use as long as the authors and source are credited. However, distributing modified data is not permitted, so check with the authors before distributing processed data.

References

  1. Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., & Zhang, W. (2021). Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting. AAAI 2021, 35(12), pp. 11106–11115. arXiv:2012.07436.
  2. zhouhaoyi/ETDataset (publisher of ETT; CSVs, column descriptions, license CC BY-ND 4.0).
  3. zhouhaoyi/Informer2020 (official Informer implementation; splits and standardization in data/data_loader.py).
  4. Nie, Y., Nguyen, N. H., Sinthong, P., & Kalagnanam, J. (2023). A Time Series is Worth 64 Words: Long-term Forecasting with Transformers. ICLR 2023. arXiv:2211.14730.