Inferensys

Glossary

DeepAR

An autoregressive recurrent neural network model that produces probabilistic forecasts by learning a parametric distribution over future time steps, natively handling cold-start items across related time series.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
PROBABILISTIC FORECASTING

What is DeepAR?

DeepAR is an autoregressive recurrent neural network (RNN) model developed by Amazon for producing accurate probabilistic time series forecasts by learning a parametric distribution over future time steps.

DeepAR is a supervised deep learning algorithm that generates probabilistic forecasts by training a global model across hundreds of related time series. Unlike classical methods like ARIMA, it uses an autoregressive recurrent neural network architecture based on Long Short-Term Memory (LSTM) units to capture complex, non-linear seasonal patterns and long-range dependencies. The model outputs the parameters of a user-specified likelihood distribution, such as Gaussian or negative binomial, enabling it to produce full prediction intervals with associated quantiles rather than single point estimates.

A key advantage of DeepAR is its native ability to handle the cold start problem by learning shared patterns across a portfolio of time series and incorporating static item-specific covariates. It also gracefully manages intermittent demand with zero-inflated distributions. During training, the network learns to predict the next time step given the previous ground-truth values; at inference, it samples from the predicted distribution to generate multiple future trajectories, allowing for robust quantification of forecast uncertainty.

Probabilistic Forecasting Architecture

Key Features of DeepAR

DeepAR is an autoregressive recurrent neural network that produces probabilistic forecasts by learning a parametric distribution over future time steps, natively handling cold-start items across related time series.

01

Probabilistic Output via Parametric Distributions

Unlike point-forecast models, DeepAR learns the parameters of a user-specified likelihood function at each time step. The model outputs mu and sigma for a Gaussian or alpha for a negative binomial, enabling it to predict entire prediction intervals.

  • Quantifies forecast uncertainty with quantile regression
  • Trained by maximizing the log-likelihood of observed data
  • Supports Gaussian, Beta, Negative Binomial, and Student's t distributions
02

Native Cold-Start Handling

DeepAR uses static categorical features—such as product category, brand, or location—to learn a global model across thousands of related time series. For new items with no history, the model conditions on these static covariates to generate reasonable initial forecasts.

  • Shares information across similar time series via learned embeddings
  • Eliminates the need for separate fallback models for new SKUs
  • Critical for retail catalogs with high product churn
03

Autoregressive Recurrent Architecture

The model uses an LSTM encoder-decoder structure. The encoder summarizes the historical context into a hidden state, while the decoder generates predictions one step at a time, feeding each sampled output back as input for the next step.

  • Captures complex, non-linear temporal dependencies
  • Handles variable-length time series without padding or truncation
  • Supports multi-horizon forecasting with a single model
04

Scale Handling via Item-Level Normalization

DeepAR applies per-item normalization by dividing each time series by its historical mean before training. This prevents high-volume items from dominating the loss function and allows the model to learn patterns across items with vastly different sales volumes.

  • Stabilizes training across heterogeneous product portfolios
  • Enables a single model to forecast both fast-movers and long-tail items
  • Predicted samples are re-scaled to the original magnitude post-inference
05

Sample Path Generation for Decision-Making

During inference, DeepAR generates multiple sample paths from the predicted distribution. These Monte Carlo samples can be used to compute empirical quantiles for safety stock optimization or to simulate complex downstream supply chain scenarios.

  • Compute any quantile (P10, P50, P90) without retraining
  • Evaluate risk metrics like expected stockout probability
  • Integrate directly with stochastic inventory optimization systems
06

Covariate Integration for Contextual Awareness

DeepAR ingests both time-varying covariates (price, promotions, day-of-week) and static covariates (product category, location) to condition forecasts on known future information and item metadata.

  • Time-varying known features are fed directly to the decoder
  • Static features are embedded and concatenated with the LSTM input
  • Enables causal forecasting by incorporating planned marketing activities
DEEP LEARNING FOR PROBABILISTIC FORECASTING

Frequently Asked Questions

DeepAR is an autoregressive recurrent neural network architecture developed by Amazon Research for producing accurate probabilistic forecasts across related time series. Below are common questions about its mechanisms, advantages, and implementation.

DeepAR is a supervised deep learning model based on an autoregressive recurrent neural network (RNN) that produces probabilistic forecasts by learning a parametric distribution over future time steps. Unlike classical models that forecast a single point, DeepAR outputs the parameters of a user-specified likelihood function—typically a Gaussian for real-valued data or a negative binomial for count data—at each prediction step. The architecture uses an LSTM encoder to summarize the historical context of a time series into a fixed-length hidden state, then an LSTM decoder recursively generates predictions. At each step, the model's own previous sample or the ground-truth value is fed back as input, making it autoregressive. Crucially, DeepAR is trained on a portfolio of related time series simultaneously, learning a global model that shares statistical strength across items. This allows it to generate forecasts for items with little or no history by leveraging patterns from similar series, directly addressing the cold-start problem that plagues traditional univariate methods.

PROBABILISTIC DEEP LEARNING VS. CLASSICAL STATISTICS

DeepAR vs. Traditional Forecasting Models

A feature-level comparison of Amazon's DeepAR algorithm against ARIMA and Exponential Smoothing for demand forecasting at scale.

FeatureDeepARARIMAExponential Smoothing

Model Family

Autoregressive RNN (Deep Learning)

Classical Statistical Model

Classical Statistical Model

Output Type

Probabilistic (full distribution)

Point forecast

Point forecast

Handles Cold-Start Items

Learns Across Multiple Time Series

Native Support for External Regressors

Handles Intermittent Demand

Requires Stationarity

Scalability (Thousands of Series)

High (shared parameters)

Low (one model per series)

Low (one model per series)

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.