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.
| Component | Function | Typical setting |
|---|---|---|
| Block | Maps input window to backcast and forecast | About 4 dense layers |
| Stack | Group of blocks sharing a basis type | 1 to several blocks |
| Backcast | Removes the explained part of the input | Same length as lookback |
| Forecast output | Partial prediction added to the total | Same length as horizon |
| Basis functions | Shape the coefficients into a time profile | Learned, polynomial or Fourier |
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.
| Property | Generic (N-BEATS-G) | Interpretable (N-BEATS-I) |
|---|---|---|
| Basis functions | Learned linear projections | Polynomial trend and Fourier seasonality |
| Typical structure | Many stacks of single blocks | One trend stack and one seasonality stack |
| Output meaning | No explicit components | Separate trend and seasonal curves |
| Constraint on shape | None | Low-degree polynomial, harmonic terms |
| Main use | Maximum accuracy | Explainable forecasts for analysts |
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.
| Hyperparameter | Typical range | Effect |
|---|---|---|
| Lookback multiple | 2 to 7 times the horizon | Longer windows capture slower patterns |
| Layer width | 256 to 512 units | Wider layers fit more complex shapes |
| Number of blocks | Several to about 30 | More blocks increase capacity and cost |
| Training loss | sMAPE, MASE or MAPE | Changes how errors are weighted |
| Ensemble size | Single model up to about 180 | Larger ensembles reduce variance |
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.
| Method | Core idea | Difference from N-BEATS |
|---|---|---|
| ETS and ARIMA | Statistical models fitted per series | Local, few parameters, explicit assumptions |
| DeepAR | Autoregressive recurrent network | Probabilistic and recursive, uses covariates |
| N-HiTS | Hierarchical successor of N-BEATS | Multi-rate sampling, better on long horizons |
| Temporal Fusion Transformer | Attention with variable selection | Built for rich covariates and quantiles |
| PatchTST | Transformer over series patches | Stronger on long multivariate horizons |
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.