DeepAR is a supervised learning algorithm based on an autoregressive recurrent neural network (RNN) that learns a global model from a set of related time series. Unlike single-series methods, it trains on hundreds or thousands of related histories simultaneously, using Long Short-Term Memory (LSTM) cells to capture complex seasonal patterns and long-range dependencies. The model outputs the parameters of a user-specified parametric distribution—typically Gaussian or negative binomial—at each time step, generating a full probability distribution rather than a single point estimate.
Glossary
DeepAR

What is DeepAR?
DeepAR is an autoregressive recurrent neural network architecture developed by Amazon for producing calibrated probabilistic forecasts from multiple related time series.
The architecture's key innovation is its ability to handle cold-start scenarios by incorporating static categorical and real-valued covariates, such as product category or location, directly into the network. During training, DeepAR uses teacher forcing with observed lagged values; at inference, it samples from its own predicted distribution to generate multi-step-ahead Monte Carlo forecast paths. This enables the direct calculation of quantile forecasts for any service level, making it particularly effective for intermittent demand patterns and inventory optimization where quantifying aleatoric uncertainty is critical.
Key Features of DeepAR
DeepAR is an autoregressive recurrent neural network model developed by Amazon that produces probabilistic forecasts by learning a parametric distribution from multiple related time series. Unlike point-forecast models, it outputs full prediction intervals that quantify uncertainty for risk-aware supply chain decisions.
Global Model Training Across Multiple Time Series
DeepAR trains a single global model on hundreds or thousands of related time series simultaneously, rather than fitting separate models per SKU or location. This approach enables the model to learn shared seasonal patterns, trend behaviors, and demand correlations across the entire product hierarchy. By pooling information from high-volume items, the model improves forecast accuracy for low-volume or intermittent-demand products that lack sufficient individual history. The architecture uses an encoder-decoder LSTM that conditions predictions on both historical values and known future covariates such as planned promotions, pricing changes, or calendar events.
Probabilistic Output with Parametric Distributions
Instead of predicting a single demand number, DeepAR outputs the parameters of a chosen probability distribution at each forecast time step. Common distributions include:
- Gaussian for real-valued data with symmetric uncertainty
- Negative Binomial for overdispersed count data common in retail demand
- Beta for constrained values like fill rates or service levels
- Student's t for heavy-tailed distributions with outlier demand spikes
The model learns to predict distribution parameters directly, enabling the generation of quantile forecasts at any service level—such as the 10th, 50th, and 90th percentiles—without retraining. This allows inventory planners to set safety stock based on explicit prediction intervals rather than heuristic buffers.
Cold-Start Forecasting for New Products
DeepAR addresses the cold-start problem by leveraging embeddings learned from similar items during global training. When a new SKU enters the catalog with zero or minimal sales history, the model uses item-level categorical features—such as product category, brand, price tier, or warehouse location—to generate an initial forecast based on the behavior of comparable products. As the first sales observations arrive, the model dynamically updates its predictions through the autoregressive LSTM structure. This capability is critical for fashion retail, electronics launches, and pharmaceutical rollouts where new product introductions are frequent and historical data is absent.
Covariate Integration for Context-Aware Forecasts
DeepAR natively ingests two categories of external features that shape demand predictions:
- Static covariates: Time-invariant attributes like product category, store size, or geographic region that define the identity of each time series
- Dynamic covariates: Time-varying inputs known in advance across the forecast horizon, such as planned promotions, holiday calendars, price changes, or marketing spend
The model learns complex interactions between these covariates and historical demand patterns. For example, it can capture how a 20% price discount during a holiday weekend affects demand differently for premium versus budget product categories. This context-aware conditioning makes DeepAR particularly effective for promotional demand sensing and scenario planning.
Autoregressive Sampling for Multi-Step Uncertainty
DeepAR generates probabilistic forecasts through ancestral sampling: at each time step, the model draws a value from the predicted distribution and feeds it back as input for the next step. This autoregressive process is repeated hundreds or thousands of times to build an empirical distribution of possible future trajectories. The resulting sample paths capture the compounding uncertainty that grows with the forecast horizon—a phenomenon that point-forecast models ignore. Supply chain planners can use these trajectories to run Monte Carlo simulations for inventory optimization, calculating metrics like expected stockout probability or fill rate under different reorder policies.
Likelihood-Based Training with Pinball Loss Alternative
DeepAR is trained by maximizing the log-likelihood of observed values under the predicted distribution, which is a strictly proper scoring rule that encourages well-calibrated probabilistic outputs. This contrasts with models trained on point-error metrics like MAE or RMSE, which ignore uncertainty quantification. For practitioners who prefer direct quantile estimation, the architecture can alternatively be trained using pinball loss, an asymmetric loss function that penalizes over-prediction and under-prediction differently depending on the target quantile. The choice between likelihood and pinball loss depends on whether the downstream application requires full distributional information or specific quantile thresholds for safety stock calculation.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about Amazon's DeepAR probabilistic forecasting algorithm, designed for engineers and supply chain data scientists.
DeepAR is an autoregressive recurrent neural network (RNN) model developed by Amazon for probabilistic forecasting. Unlike models that output a single point estimate, DeepAR learns the parameters of a user-specified parametric distribution (e.g., Gaussian, negative binomial) at each time step. It works by training a single global model across hundreds or thousands of related time series, using an encoder-decoder architecture built on Long Short-Term Memory (LSTM) cells. The encoder processes the historical context, while the decoder generates multi-step-ahead predictions by sampling from the predicted distribution. This allows DeepAR to produce full prediction intervals and quantile forecasts, quantifying both aleatoric uncertainty (inherent noise) and epistemic uncertainty (model uncertainty) for each forecast horizon.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Explore the core concepts and complementary architectures that contextualize DeepAR within the broader landscape of probabilistic time series forecasting.
Probabilistic Forecasting
Unlike point forecasts that output a single number, probabilistic forecasting estimates a full probability distribution of future demand. DeepAR achieves this by parameterizing a likelihood function (e.g., Gaussian, negative binomial) and outputting its parameters at each time step. This allows supply chain systems to quantify risk and set safety stock levels based on specific quantiles (e.g., P90 for high service levels).
Autoregressive Recurrent Networks
DeepAR is built on an encoder-decoder architecture using Long Short-Term Memory (LSTM) cells. The encoder compresses the historical context of a time series, while the decoder generates predictions one step at a time, feeding its own previous output as input. This autoregressive loop allows the model to capture complex, non-linear temporal dynamics across thousands of related products.
Cold-Start Forecasting
A key advantage of DeepAR is its ability to generate forecasts for items with little to no sales history. By learning a global model from a portfolio of similar time series, the network infers patterns from item-level features (e.g., category, brand, price) and the behavior of analogous products. This is critical for new product introductions where traditional statistical methods fail.
Demand Sensing
While DeepAR excels at mid-to-long-range forecasting, it is often paired with demand sensing techniques for short-term adjustments. Demand sensing ingests real-time downstream signals—such as daily point-of-sale data or warehouse withdrawals—to correct the probabilistic forecast in the near term, reducing latency before the next full model retraining cycle.
Continuous Ranked Probability Score
Evaluating a probabilistic forecast requires a proper scoring rule. The Continuous Ranked Probability Score (CRPS) measures the integrated squared difference between the predicted cumulative distribution function and the empirical observation. It is the standard metric for assessing DeepAR's output, penalizing both miscalibration and lack of sharpness in a single value.
Hierarchical Reconciliation
DeepAR generates forecasts at the most granular level (e.g., SKU-location). To ensure that bottom-up forecasts sum correctly to category, regional, and national totals, hierarchical reconciliation methods are applied post-hoc. Optimal reconciliation adjusts each level's forecast proportionally to its variance, producing a mathematically coherent view of demand across the entire supply chain.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us