Informer · time series

On this page 7

Informer is a Transformer architecture for long-sequence time series forecasting, introduced in 2021, that predicts hundreds of future values in a single pass while cutting the quadratic cost of standard self-attention. In time series & forecasting it marks the point where attention-based deep forecasters became practical for long input windows and long horizons.

The model combines three ideas: ProbSparse self-attention, which computes full attention only for the most informative queries; self-attention distilling, which halves the sequence length between encoder layers; and a generative-style decoder that outputs the whole forecast at once instead of step by step. Together they reduce time and memory complexity to roughly O(L log L) for an input of length L.

The problem Informer was designed to solve

Informer targets long sequence time series forecasting, where both the look-back window and the forecast horizon span hundreds of steps, for example predicting the next 720 hourly values of electricity load. A vanilla Transformer struggles here for three reasons.

  • Quadratic attention cost: every query attends to every key, so memory grows with the square of the sequence length.
  • Memory from stacked layers: deep encoders multiply the cost of long inputs.
  • Slow step-by-step decoding: recursive forecasting generates one value at a time, which is slow and lets errors accumulate.

Each of the three components of Informer answers one of these bottlenecks, as the table below shows.

BottleneckInformer componentResulting complexity
Self-attention costProbSparse self-attentionAbout O(L log L) per layer
Encoder memorySelf-attention distillingSequence halves each layer
Inference speedGenerative-style decoderOne forward pass per forecast
Bottlenecks and the Informer component that addresses each

How ProbSparse attention selects queries

ProbSparse attention rests on the observation that attention scores in time series models are long-tailed: a few queries produce sharp, informative distributions, while most produce nearly uniform ones. A uniform attention pattern simply returns an average of the values, so computing it exactly wastes effort.

Informer ranks queries with a sparsity measurement that approximates how far each query distribution is from uniform, using the gap between the maximum and the mean of its scores over a random sample of keys. Only the top u queries, with u proportional to ln L, receive full attention. The remaining lazy queries receive the mean of the value vectors.

This approximation works well when the data has strong periodic or recurring patterns, because a small set of time steps then carries most of the useful information. It is less reliable for noisy series with weak structure, where the ranking becomes unstable.

Encoder distilling and the one-pass decoder

Between encoder layers, self-attention distilling applies a one-dimensional convolution, an ELU activation and max pooling with stride 2. Each layer therefore passes on half as many time steps, keeping the dominant features while shrinking memory use. A shorter replica of the encoder stack is often added to improve robustness.

The decoder receives a start token made of a recent slice of known history, for example the last 48 steps, followed by placeholders for the target positions that carry only timestamp information. A masked attention layer and cross-attention to the encoder output then fill all placeholders in one forward pass, which avoids error accumulation from recursive forecasting.

The input embedding also matters. Informer adds a value projection, a positional encoding and global timestamp embeddings for features such as hour, weekday and month, which work as learned calendar features.

ParameterCommon settingWhat it controls
Input length96 to 720 stepsHow much history the encoder sees
Start token length48 stepsKnown context given to the decoder
Prediction length24 to 720 stepsForecast horizon
Sampling factor c5Number of active queries, c times ln L
Encoder layers2 to 3Depth and distilling steps
Typical Informer configuration on hourly benchmark data

Informer among deep forecasting models

Informer started a wave of efficient Transformer forecasters evaluated on the same benchmarks, mainly the ETT electricity transformer datasets, electricity consumption and weather data. Later models changed the core assumptions, and simple baselines exposed weaknesses.

ModelKey ideaRelation to Informer
InformerSparse query selection, one-pass decoderReference model
AutoformerSeries decomposition and auto-correlationReplaces point attention with period matching
FEDformerAttention in the frequency domainFurther improves long horizons
PatchTSTPatches and channel independenceUsually more accurate and simpler
DLinearOne linear layer on decomposed seriesOften beats Informer on benchmarks
Informer compared with related forecasters

The DLinear study was an important correction: on several standard benchmarks a single linear layer outperformed Informer, which suggested that point-wise attention partly ignores temporal order. Informer remains valuable as a historical milestone and a baseline, but it is rarely the most accurate choice today.

When to use Informer and common pitfalls

Informer is a reasonable candidate when the series is long, regular and multivariate, the horizon is long, and the team needs a well-documented deep baseline. Implementations are available in libraries such as GluonTS-style toolkits and open research repositories.

  • Skipping simple baselines: always compare with a naive forecast, a seasonal model and a linear model before trusting the result.
  • Leaky normalization: scaling statistics must come from the training period only.
  • Single split evaluation: use time series cross-validation with several rolling origins.
  • Ignoring scale: report MASE or a scaled error, not only MSE on normalized data.

A non-technical view

Informer is a computer model that predicts long stretches of future numbers, such as power use over the next month. It reads a long history and then writes the whole forecast at once.

Normal attention models compare every moment with every other moment. That gets very slow with long histories. Informer focuses only on the moments that matter most and treats the rest as background. It is like skimming a long report and reading closely only the pages with key numbers.

The result is faster forecasts with less memory. Newer and simpler models often do better today, but Informer showed the path.

A concrete example

A regional grid operator needs hourly load forecasts one week ahead, which means 168 future values, for about 40 substations. The data science team has three years of hourly load plus temperature readings, giving each substation more than 26,000 time steps of history.

They train Informer with a look-back window of 336 hours, a start token of 48 hours and a prediction length of 168, using temperature as an extra input channel. The sparse attention lets them fit the long window on a single GPU, which a vanilla Transformer of the same depth could not handle.

In a rolling evaluation over the final year, Informer clearly beats the seasonal naive forecast. However, a linear model with seasonal decomposition comes close at a fraction of the training cost, so the team keeps both models in production and combines their outputs for peak-hour planning.