N-BEATS Interpretable Forecasting
N-BEATS forecasts a time series with plain feedforward blocks that each explain a piece of their own prediction as trend, seasonality, or leftover residual, instead of hiding everything inside an opaque recurrent state.
Prerequisites: Recursive vs Direct Multi-Horizon Forecasting, Sliding-Window Supervision for Time Series
Most neural forecasters — recurrent networks, transformers — produce a number for tomorrow with no explanation of why. That is fine for raw accuracy but bad for trust: a risk manager cannot sign off on a forecast they cannot decompose. Classical statistical models like decomposing a series into trend plus seasonality plus noise are interpretable but rigid, forced into a fixed functional form chosen in advance. N-BEATS tries to get both: neural-network flexibility, but built so the forecast can still be read back as separate, human-meaningful pieces.
The analogy: a relay team where each runner explains their leg
Picture a relay of specialists building a forecast in stages. The first runner looks at the recent history, extracts whatever smooth long-run drift they can find, subtracts it out, and hands the leftover to the next runner along with their own partial forecast contribution. The second runner looks at what's left, extracts whatever repeating cyclical pattern they can find, subtracts that too, and hands the remainder onward. By the end, the final forecast is just the sum of every runner's partial contribution, and you can inspect each one separately — "this much came from trend, this much from seasonality" — because each stage explicitly reported its piece.
The mechanics: stacked blocks with backcast and forecast
N-BEATS is built from stacked blocks, each a plain fully-connected feedforward network (no recurrence, no convolution, no attention). Block takes an input window (either the raw history, for the first block, or the residual left by earlier blocks) and produces two outputs: a backcast , its reconstruction of the input window, and a forecast , its contribution to the prediction:
In words: each block reads whatever input signal is left over from previous blocks, produces its best explanation of that input (the backcast) and a forecast contribution built from the same internal features, then the backcast is subtracted from the input to leave a residual for the next block to explain, and the final prediction is simply the sum of every block's forecast contribution. In the interpretable configuration, blocks are grouped into a trend stack (whose backcast/forecast functions are restricted to low-order polynomials, so they can only express smooth drift) and a seasonality stack (restricted to Fourier terms, so they can only express repeating cycles) — the restriction on each stack's functional form is exactly what makes its contribution readable as "trend" or "seasonality" rather than an arbitrary black-box number.
Worked example 1: decomposing a 4-step forecast by hand
Suppose the trend stack outputs forecast contribution for the next 4 days (a steady linear drift), and the seasonality stack outputs (an alternating pattern) using whatever residual was left after the trend stack subtracted its backcast. The final forecast is their sum: . A risk desk reading this output sees "underlying drift up about 0.1/day, riding a 2-day alternating cycle worth ±0.3" — a decomposition a plain LSTM's hidden state could never hand back directly.
Worked example 2: residual shrinking across blocks
Say the raw input window has magnitude (sum of squares) 100. After the trend block subtracts its backcast, residual magnitude drops to 40 — trend explained 60% of the input's variation. After the seasonality block subtracts its backcast from that residual, magnitude drops to 12 — another 28 percentage points explained. The remaining 12% is whatever a later generic (unrestricted) stack has to model as noise. Watching this residual shrink block by block is a direct, numeric check on how much each interpretable component accounts for.
A trend block restricted to low-order polynomials can only trace shapes like this — smooth and monotone or gently curving — which is precisely what stops it from secretly encoding seasonality or noise.
What this means in practice
N-BEATS and its successor N-HiTS Hierarchical Interpolation are used where forecast accountability matters as much as accuracy — regulatory, risk, and planning contexts where "the model said up" isn't sufficient and "up, because of a 3-month drift plus a weekly cycle" is. The tradeoff against pure accuracy-first models like DeepAR Probabilistic Forecasting is real: restricting a stack's functional form to stay interpretable can leave some genuine signal unmodeled, pushed into the residual for a generic stack to (less interpretably) pick up.
N-BEATS builds a forecast as a sum of contributions from stacked blocks, each explaining and removing a piece of the input signal before passing the residual on — restricting some stacks to trend-only or seasonality-only functional forms is what makes the final forecast decomposable, not just accurate.
Practice
- If a trend block's backcast leaves a residual of magnitude 25 out of an original 100, what fraction of the input did it explain?
- Explain why restricting a stack to low-order polynomials, rather than letting it be a fully general network, is necessary for interpretability.
- Why does using a "generic" (unrestricted) stack alongside trend and seasonality stacks trade away some interpretability for accuracy?
The common confusion is assuming N-BEATS is interpretable because it uses stacked residual blocks. It isn't — a fully generic (unrestricted) stack subtracts residuals too, but its contribution is just as much a black box as an LSTM's hidden state. Interpretability comes specifically from constraining certain stacks' functional form to polynomials or Fourier terms, so their output can only ever represent trend or seasonality — the architecture is a delivery mechanism; the constraint does the interpretability work.
Related concepts
Practice in interviews
Further reading
- Oreshkin et al., N-BEATS: Neural basis expansion analysis for interpretable time series forecasting (2020)