Using Deep Learning to Improve Long-Term Demand Forecasts for Retail Supply

The Challenge

Retailers rely on purchasing, acquiring, storing, and selling hundreds of items every day to serve their customers. Retailers  also have real limitations in  storage space capacity for items with a short shelf life, but running out of any one item can impair the customer buying process and experience. The same problem exists on a much larger scale for distribution centers (DCs) that those stores rely on. Elder Research engaged with one of our trusted clients that wanted to design an effective and efficient supply chain model to ensure that its network (i.e., the client’s ability to impact and manage capacity across many processes, locations, and people across the end-to-end supply chain) could efficiently meet store demand without overburdening any DC.

Supply chain networks are planned years in advance and must robust enough to handle growth (and attrition) at existing stores while balancing the  future openings of new stores. To facilitate this planning, our client needed accurate long-term demand forecasts for inventory across each of its thousands of locations, totaling more than a million individual forecasts. They also needed to aggregate the item/store forecasts up to item/DC forecasts with robust confidence intervals. This type of analysis required innovative approaches while balancing the nuances and dynamics of this organization’s supply chain network.

The Solution

Elder Research teamed with our client leveraging a robust Agile Data Science process. Our team methodically engaged customer and stakeholder needs with best-in-class data science methods with deployment and change management requirements. The result is that our data science team built two custom Long Short Term Memory (LSTM) forecast models with different time horizons to vastly improve the client’s network analysis and planning. Candidate models ranged from established time series methodologies (e.g., ARIMA, exponential smoothing) to more sophisticated techniques (e.g., Facebook’s prophet, Amazon’s DeepAR). Two primary considerations were used to evaluate alternatives: accuracy and computational feasibility.


Item demand at stores is incredibly varied and heterogeneous. Some items are ordered once per quarter while others require hundreds of cases each month. Common metrics used to evaluate accuracy are not useful when comparing across items when volumes vary by several orders of magnitude. Even if a universal metric existed, there is no way to aggregate hundreds of thousands of accuracies into a single, meaningful value. So, we compared distributions of accuracies. In every case, our custom LSTM model outperformed the other methodologies tested; thus giving our client a more accurate perspective on true forecasted demand. Shown below are distributions of mean absolute errors for low volume items, and mean absolute percent errors for high volume items (where that metric is more appropriate). The median of each distribution is marked by a vertical bar.

Computational Feasibility

By using GPU-enabled cloud computing, one LSTM model generated predictions for every item, location, and time period in the same time and cost compared to “simpler” techniques that require separate models for each item/location combination. A second LSTM model with a longer forecast time horizon extended how far into the future the client can plan.

Our LSTM model and DeepAR were the only techniques that could natively forecast future store openings. But unlike DeepAR, which is offered by AWS as a prepackaged solution, Elder Research delivered and handed-off the custom LSTM model code and its intellectual property rights to our client. Because the models are owned they can be:

  • Used without ongoing model licensing fees
  • Deployed on any platform
  • Adapted as their data evolves
  • Tailored for use on similar initiatives across the organization

We employed Monte Carlo simulations to generate confidence intervals for any combination of items and locations, allowing the client to view their supply chain at multiple levels of detail and make informed, risk-conscious decisions.


Prior to partnering with Elder Research, the client’s supply chain analysts leaned on less precise forecasts and rules of thumb to make their network analysis and planning decisions. Now, with the state-of-the-art LSTM model we deployed, analysts and non-technical stakeholders have an interactive dashboard with which to explore the latest — more accurate — forecasts, and even evaluate hypothetical DC allocations. With this knowledge, our client can make more informed decisions on planning and allocation, ultimately saving them a tremendous amount of time and money.