Principle:Sktime Pytorch forecasting NHiTS Architecture
| Knowledge Sources | |
|---|---|
| Domains | Time_Series, Forecasting, Deep_Learning, Signal_Processing |
| Last Updated | 2026-02-08 09:00 GMT |
Overview
Neural Hierarchical Interpolation for Time Series (N-HiTS) is a multi-rate signal sampling architecture that extends N-BEATS with hierarchical interpolation and input pooling to achieve efficient long-horizon forecasting.
Description
N-HiTS addresses the computational and accuracy challenges of long-horizon time series forecasting by introducing two key innovations on top of the N-BEATS doubly-residual architecture: multi-rate input pooling and hierarchical interpolation. The model is organized into multiple stacks, each containing one or more blocks. Each stack operates at a different temporal resolution by applying pooling (max or average) to the input signal with a stack-specific kernel size. This allows early stacks to capture coarse, low-frequency patterns using aggressive downsampling, while later stacks focus on fine-grained, high-frequency details with minimal pooling.
Within each block, the pooled input is passed through a multi-layer perceptron (MLP) that produces two sets of expansion coefficients: backcast theta (for reconstructing the input) and forecast theta (for generating predictions). The forecast theta has a reduced dimensionality determined by the downsample frequency parameter. The compressed forecast coefficients are then upsampled to the full prediction length via interpolation (linear, nearest, or bicubic), which is the hierarchical interpolation step. This dramatically reduces the number of parameters needed for long horizons because each block only needs to predict a small number of interpolation knots rather than the full forecast vector.
Residual learning proceeds as in N-BEATS: each block subtracts its backcast from the input signal, passing the residual to the next block. An optional naive level (last observed value) is added as a baseline forecast. The final prediction is the sum of all block-level forecasts. N-HiTS supports static covariates, encoder covariates, and decoder covariates through embedding layers and concatenation with the pooled target signal.
Usage
Use N-HiTS for long-horizon univariate or multivariate time series forecasting when: (1) the prediction horizon is large relative to the lookback window, (2) the time series exhibits patterns at multiple temporal scales, (3) computational efficiency matters compared to full-resolution models like N-BEATS. The model requires fixed encoder and decoder lengths (min_encoder_length == max_encoder_length and min_prediction_length == max_prediction_length). Pooling sizes and downsample frequencies are automatically set via heuristics if not provided, scaling exponentially across stacks.
Theoretical Basis
Multi-rate input pooling: Each stack s applies pooling with kernel size to the input, reducing the temporal dimension:
where is the context length. Pooling sizes are ordered from large (coarse) to small (fine) across stacks.
Block MLP and theta generation: Each block concatenates the pooled target, encoder covariates, decoder covariates, and static features into a single vector, which is processed by an MLP:
The backcast theta has dimension (full context length). The forecast theta has reduced dimension , where is the prediction length and is the downsample frequency for stack s.
Hierarchical interpolation: The compressed forecast coefficients are interpolated to the full prediction length:
using linear, nearest-neighbor, or bicubic interpolation.
Doubly-residual stacking: Residuals propagate through blocks via subtraction:
where is the backcast and is the encoder mask. The final forecast is the sum:
where is the last observed value repeated across the horizon (when naive_level is enabled).
Backcast loss: An optional backcast loss term regularizes the reconstruction quality:
where the weights are derived from the backcast_loss_ratio parameter.