N-BEATS

Also known as: Neural Basis Expansion Analysis for Time Series

On this page 7

N-BEATS, short for Neural Basis Expansion Analysis for Time Series, is a deep learning architecture for univariate forecasting that predicts future values using only stacks of fully connected layers and residual connections. In artificial intelligence, it is a landmark among deep-learning forecasters because it showed that a pure neural network without statistical components could beat strong hybrid and classical methods on major forecasting competitions.

The model was introduced in 2019 and published at ICLR 2020. It achieved state-of-the-art accuracy on the M4, M3 and tourism benchmarks and offered an interpretable variant whose outputs decompose into trend and seasonality, a property that made it attractive to forecasting practitioners who had long distrusted black-box models.

How N-BEATS produces a forecast

N-BEATS takes a lookback window of recent observations and outputs the whole forecast horizon at once, which makes it a direct multi-step forecaster rather than a recursive one. The lookback window is typically set to two to seven times the horizon length.

The basic unit is a block containing about four fully connected layers with ReLU activations. The block outputs two sets of expansion coefficients, which are multiplied by basis functions to produce two signals: a backcast, which reconstructs the input window, and a forecast, which covers the horizon.

Blocks are connected through doubly residual stacking. Each block subtracts its backcast from its input, so the next block only sees the part of the signal that remains unexplained, while all partial forecasts are summed into the final prediction. This design lets very deep networks train stably and allows each block to specialize.

ComponentFunctionTypical setting
BlockMaps input window to backcast and forecastAbout 4 dense layers
StackGroup of blocks sharing a basis type1 to several blocks
BackcastRemoves the explained part of the inputSame length as lookback
Forecast outputPartial prediction added to the totalSame length as horizon
Basis functionsShape the coefficients into a time profileLearned, polynomial or Fourier
Core components of the N-BEATS architecture

Generic and interpretable N-BEATS variants

N-BEATS comes in two configurations that differ only in their basis functions. The choice decides whether accuracy or interpretability is the priority.

PropertyGeneric (N-BEATS-G)Interpretable (N-BEATS-I)
Basis functionsLearned linear projectionsPolynomial trend and Fourier seasonality
Typical structureMany stacks of single blocksOne trend stack and one seasonality stack
Output meaningNo explicit componentsSeparate trend and seasonal curves
Constraint on shapeNoneLow-degree polynomial, harmonic terms
Main useMaximum accuracyExplainable forecasts for analysts
Comparison of the two N-BEATS configurations

In the interpretable version, the trend stack restricts its output to a low-degree polynomial, usually of degree two or three, and the seasonality stack uses Fourier terms. Analysts can therefore plot each component separately, similar to an STL decomposition, but learned end to end.

Training and ensembling

N-BEATS is usually trained as a global forecasting model: one network learns from windows sampled across many related series. Training windows are drawn from the most recent part of each history, and series are often scaled per window so that series of very different magnitudes can share the same weights.

The original competition results relied on a large ensemble of about 180 models. Members differed in loss function (sMAPE, MASE and MAPE), lookback length and random initialization, and the final forecast was the median of all members. Much of the reported accuracy comes from this ensemble, so a single model typically scores somewhat worse.

HyperparameterTypical rangeEffect
Lookback multiple2 to 7 times the horizonLonger windows capture slower patterns
Layer width256 to 512 unitsWider layers fit more complex shapes
Number of blocksSeveral to about 30More blocks increase capacity and cost
Training losssMAPE, MASE or MAPEChanges how errors are weighted
Ensemble sizeSingle model up to about 180Larger ensembles reduce variance
Key hyperparameters and their effect

N-BEATS compared with other forecasters

N-BEATS sits between classical statistical methods and newer transformer and foundation models. Its main distinction is a simple, purely feed-forward design that is fast to train and does not need recurrence or attention.

MethodCore ideaDifference from N-BEATS
ETS and ARIMAStatistical models fitted per seriesLocal, few parameters, explicit assumptions
DeepARAutoregressive recurrent networkProbabilistic and recursive, uses covariates
N-HiTSHierarchical successor of N-BEATSMulti-rate sampling, better on long horizons
Temporal Fusion TransformerAttention with variable selectionBuilt for rich covariates and quantiles
PatchTSTTransformer over series patchesStronger on long multivariate horizons
N-BEATS relative to related forecasting methods

A later extension, N-BEATSx, adds exogenous covariates such as prices or weather, and N-HiTS reduces computation for long horizons through hierarchical interpolation. Both keep the backcast and forecast logic of the original.

Limitations and practical cautions

N-BEATS is strong on short and medium univariate horizons, but several limits matter in production work.

  • No covariates in the original model: holidays, promotions or weather cannot be used without the N-BEATSx extension.
  • Point forecasts by default: prediction intervals require quantile losses or conformal methods added on top.
  • Data requirements: a global model needs many related series; a single short series rarely benefits.
  • Ensemble cost: reproducing competition accuracy requires training dozens of models.
  • Long horizons: memory and accuracy degrade as the horizon grows, which motivated N-HiTS.

Teams should always compare N-BEATS against a seasonal naive forecast and a tuned ETS model using time series cross-validation. When the neural model does not clearly beat these baselines on MASE, the simpler method is usually the better operational choice.

Understanding it simply

N-BEATS is a computer model that looks at recent numbers and predicts the next ones. It works like a team of specialists in a row. The first one explains as much of the pattern as it can. It then passes on only what it could not explain.

Each next specialist works on the leftover part. At the end, all their guesses are added together. One version even shows its reasoning. It splits the forecast into a long-term direction and a repeating seasonal pattern, so people can check whether the prediction makes sense.

Applied in practice

A regional retail chain needs weekly sales forecasts for about 2,000 product categories, 13 weeks ahead. Its analysts train one global N-BEATS model on three years of history from all categories, using a lookback of 52 weeks and per-window scaling, and they build a small ensemble of ten models trained with different seeds and losses.

Backtesting with rolling-origin cross-validation shows a clear reduction in MASE compared with per-series ETS models for categories with stable seasonality. Planners use the interpretable variant to review trend and seasonal curves before approving orders. For categories driven by promotions, the team keeps a covariate-aware model, because the original N-BEATS cannot see promotion calendars.