Course contentsShow
← Machine Learning and Deep Learning
Lesson 2416 of 3,53852. Time Series and ForecastingFree lesson

N-BEATS: Neural Basis Expansion

Understand the N-BEATS architecture that decomposes forecasts into trend and seasonality components.

N-BEATS: Neural Basis Expansion

What you'll learn: How N-BEATS uses specialized neural blocks to automatically decompose time series forecasts into interpretable trend and seasonality components.

The Core Idea

N-BEATS (Neural Basis Expansion Analysis for Time Series) is a deep learning architecture specifically designed for univariate time series forecasting. Unlike generic neural networks, N-BEATS is interpretable by design—it explicitly separates your forecast into meaningful components like trend and seasonality, similar to classical decomposition methods, but learned end-to-end.

How It Works

Think of N-BEATS as a team of specialized experts, each handling one aspect of your time series:

The architecture uses stacks of blocks, where each stack focuses on one component:

  • A trend stack learns smooth, long-term patterns using polynomial basis functions
  • A seasonality stack captures repeating cycles using Fourier-like basis functions

Each block performs "basis expansion"—it doesn't just output raw predictions, but instead learns coefficients for interpretable mathematical functions (like polynomials for trends or sinusoids for seasonality). The block combines:

  1. A backward component that reconstructs the input (helping the network learn good representations)
  2. A forward component that produces the actual forecast

The stacks work residually: the first stack makes its best prediction, then passes what it couldn't explain to the next stack. This is like peeling layers off an onion—each layer handles what remains.

Why It Matters

N-BEATS achieves state-of-the-art forecasting performance while remaining interpretable. You can literally visualize which part of your forecast comes from trend versus seasonality, making it trustworthy for business decisions.

Key Takeaway: N-BEATS combines the interpretability of classical decomposition with the flexibility of deep learning through specialized stacks that learn basis expansion coefficients for trend and seasonal components.