BlockRNN

BlockRNN is a type of Recurrent Neural Network (RNN) architecture used for time series forecasting. It's specifically designed to capture temporal dependencies in sequential data.

🧠 What is BlockRNN?

BlockRNN is a modular RNN forecasting model that stacks RNN layers and dense layers in blocks to predict future time series values. It is similar in structure to models like DeepAR but provides a more flexible way to configure blocks of neural layers.

🔧 Core Features

  • Sequential modeling: It uses LSTM or GRU units to capture time dependencies.

  • Probabilistic forecasting: Outputs are usually probabilistic (e.g., Gaussian or Student-T distribution), not just point estimates.

  • Flexible architecture: Can configure number of layers, hidden units, distribution output, etc.

  • Handling covariates: Supports dynamic and static features, such as holiday indicators, item categories, etc.

🔁 Architecture

Typical BlockRNN architecture includes:

  • Embedding layers for categorical inputs (like item ID, day-of-week, etc.)

  • LSTM/GRU blocks for sequential input

  • Feedforward layers post-RNN

  • Distribution projection layer that outputs parameters for a target distribution (like mean & std for Gaussian)

When to Use BlockRNN

  • You have time series data with strong temporal dependencies.

  • You need probabilistic forecasts, not just point predictions.

  • You want a deep learning alternative to traditional models like ARIMA or Prophet.

📈 Pros vs. Traditional Models

Feature BlockRNN ARIMA / Prophet
Seasonality Learns from data Explicitly modeled
Scalability High (with GPU) Lower for many series
Uncertainty Probabilistic outputs Some (in Prophet)
Feature Inputs Supports covariates Limited

BlockRNN Model Parameters

Param Name Description Param Value (Default)
BLOCKRNN-TYPE Type of RNN block used (e.g., LSTM, GRU) in BlockRNN model. LSTM
HIDDEN-DIM Number of hidden units in each RNN layer. 124
RNN-LAYERS Number of stacked RNN layers in the model. 2
DROPOUT Dropout rate applied between RNN layers to reduce overfitting. 0.0
EPOCHS Total number of epochs to train the model. 100
LEARNING-RATE Learning rate for the optimizer used in training. 0.001
BATCH-SIZE Number of samples per training batch. 32
RANDOM-STATE Seed used to ensure reproducibility across runs. 42
FORCE-RESET Whether to reset hidden states between sequences. True
OUTPUT-CHUNK-LENGTH Number of steps the model predicts in each forward pass. 1