A Dynamic Bayesian Network Model for Inventory Level Estimation in Retail Marketing

04/04/2016
by   Luis I. Reyes-Castro, et al.
0

Many retailers today employ inventory management systems based on Re-Order Point Policies, most of which rely on the assumption that all decreases in product inventory levels result from product sales. Unfortunately, it usually happens that small but random quantities of the product get lost, stolen or broken without record as time passes, e.g., as a consequence of shoplifting. This is usual for retailers handling large varieties of inexpensive products, e.g., grocery stores. In turn, over time these discrepancies lead to stock freezing problems, i.e., situations where the system believes the stock is above the re-order point but the actual stock is at zero, and so no replenishments or sales occur. Motivated by these issues, we model the interaction between sales, losses, replenishments and inventory levels as a Dynamic Bayesian Network (DBN), where the inventory levels are unobserved (i.e., hidden) variables we wish to estimate. We present an Expectation-Maximization (EM) algorithm to estimate the parameters of the sale and loss distributions, which relies on solving a one-dimensional dynamic program for the E-step and on solving two separate one-dimensional nonlinear programs for the M-step.

READ FULL TEXT VIEW PDF

Authors

page 1

page 2

page 3

page 4

06/04/2016

One-dimensional Cutting Stock Problem with Divisible Items

This paper considers the one-dimensional cutting stock problem with divi...
08/29/2019

Real-time stock analysis for blending recipes in industrial plants

Many companies use Excel spreadsheets to keep stock records and to calcu...
11/04/2019

Model uncertainty estimation using the expectation maximization algorithm and a particle flow filter

Model error covariances play a central role in the performance of data a...
02/19/2018

Stock management (Gestão de estoques)

There is a great need to stock materials for production, but storing mat...
10/08/2021

Volumetric Dimensioning of Strategic Stock; SOP, a step further toward a better flow control

This paper is presenting a real case study. It focuses on a drug stock m...
01/03/2016

A Unified Approach for Learning the Parameters of Sum-Product Networks

We present a unified approach for learning the parameters of Sum-Product...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

Keywords

Inventory Management, Inventory Record Inaccuracies, Inventory Shrinkage, Dynamic Bayesian Networks.

1 Introduction

We consider the sale and replenishment of a product in a store over a time horizon of time periods. We let denote the initial inventory level, and for each period we let denote the inventory level at the end of that period. Furthermore, for each period we let denote the random but observed number of units of the product sold during that period. Moreover, we assume that replenishments happen after all the sales of the period have been completed, e.g., after the store closes for the day, and for each period we let denote the non-random and observed number of units of the product replenished at the end of that period. Finally, and most importantly, we assume that on each time period some number of units of the product may be lost, broken or stolen without knowledge of the store’s manager, i.e., without record. In particular, for each period we let

denote the random and unobserved number of units of the product lost, broken or stolen during that period. For modeling reasons, we further assume that in each period all losses occur after all sales have been completed but before any replenishments arrive, although in reality sale, loss and replenishment epochs may intertwine.

Since the product losses are unobserved, so are the inventory levels, which motivates the main problem of this paper: Estimating the (unknown) sale and loss distribution parameters along with the (unobserved) inventory levels. This problem is important because having a good model of the inventory level history of a product is essencial to knowing when to re-order it so as to keep it available to the customers. Unfortunately, most studies so far have focused on qualitatively describing the problem and on proposing heuristic replenishment and inspection policies; the reader is refered to Refs.

[1, 2, 3, 4, 5, 6] for a sample of previous work. For instance, Ref. [5], which in our opinion is the study most closely related to our paper, describes a method for estimating the aforementioned parameters by collecting statistics of past inventory inspection data and pooling the statistics associated with similar products. In contrast, we propose an algorithm capable of estimating the parameters even in the absence of past inspection data.

2 Assumptions, Problem Statement, and Solution Method

As usual, we assume that for each time period the physical inventory level at the end of the period is equal to the physical inventory level at the end of the previous period, minus the product sales and losses during the period, plus the replenishments at the end of the period. I.e.: 

(1)

Furthermore, for each period we assume that

has a truncated Poisson distribution with parameter

and upper bound . I.e., if

is a sequence of i.i.d. Poisson random variables with parameter

then for each we have . We choose the Poisson distribution because it is commonly used to model random demands, although it is fairly straighforward to extend our model to one with a different sales distribution, e.g., Bernoulli, Geometric, Binomial, etc. The truncation is justified because in each period the number of units of the product that the store can sell is limited by the product’s physical inventory level at the end of the previous period; we do not allow backordering. Moreover, since the value of is all we need to describe the distribution of , we observe that conditional on the random variable is independent of all inventory levels up to period and of all sales, losses and replenishments up to period . More precisely, for each :

(2)

In addition, for each period we assume that

has a truncated Bernoulli distribution with parameter

and upper bound , i.e., if is a sequence of i.i.d. Bernoulli random variables with parameter then for each we have . We choose the Bernoulli distribution because we are interested in modeling small loss rates (i.e., rates of no more than a unit per period), but our model also allows other discrete distributions. The truncation relies on the fact that in each period all losses occur once all sales have been completed but before any replenishments. Also, since the values of and completely specify the distribution of , we see that conditional on and the random variable is independent of all inventory levels up to period and of all sales, losses and replenishments up to period . More precisely, for each :

(3)

Now, we can continue building our model without product loss variables (i.e., ’s) if we note, from Equation (1), that for each :

(4)

Furthermore, combining Equations (3) and (4), we see that conditional on , and the random variable is independent of all inventory levels up to period and of all sales, losses and replenishments up to period . Moreover, since our assumptions require that for each period all sales and losses occur before any replenishments, we see that , and so replacing using Equation (1) we obtain the bound . In turn, combining this bound with the same equation and the fact that surely, we have:

(5)

Finally, the problem we seek to solve is that of finding a Maximum Likelihood Estimate (MLE) of the sale and loss distribution parameters , respectively, and of the unobserved inventory level history , given an initial inventory level , a sales history , and a replenishment history . More precisely, we seek to solve the following Mixed-Integer Nonlinear Program (MINLP):

maximize: (6)
subject to the constraints: (7)

Unfortunately, to the best of our knowledge there are no efficient methods for computing a global maximizer to Problem (6)-(7) with provable guarantees. Therefore, in this work we present an Expectation-Maximization (EM) Algorithm, which is a greedy algorithm, to compute a local maximizer of the aforementioned function (see Ref. [7]). The algorithm itself is quite simple, relying on the following iteration:

  1. Select initial guesses for the MLEs of the sale and loss distribution parameters, denoted .

  2. For each iteration :

    1. E-step: Using the previous iteration’s MLEs of the sale and loss parameters, i.e., , compute the current MLE of the inventory level history, denoted .

    2. M-step: Using the current MLE of the inventory level history, i.e., , compute the current MLEs of the sale and loss parameters, denoted .

    3. If the sale and loss parameters haven’t changed, i.e., if , then terminate.

Execution of the E-step and of the M-step is explained in the following two sections.

3 E-step: Estimation of the Inventory Level History

In this section we seek to compute an inventory level history of maximum log-likelihood, among all those which satisfy Inequality (5), given the sale and loss distribution parameters and and conditional on the initial inventory level , the sales history , and the replenishment history . To start, we note that since , and are fixed, so is their joint likelihood, i.e., . Therefore, instead of seeking an inventory level history of maximum conditional log-likelihood, we can search for one that maximizes the joint log-likelihood of all the variables, i.e., the function .

Next, we recognize that the joint likelihood of all the variables can be factored as a Dynamic Bayesian Network (DBN), i.e., a Bayesian Network with a chain-like structure where each type of node represents a time history (see Ref. [8]). Certainly, from the statistical assumptions put forth in Section 2, we can represent the joint likelihood function as a DBN where each variable is a node, and where the nodes’ parents are as follows:

  • Nodes , , , and have no parents.

  • For each period , the parent of node is node .

  • For each period , the parents of node are nodes , and .

Figure 1: Our Dynamic Bayesian Network (DBN) model. Here, deterministic variable nodes are shown in green, observed random variable nodes are shown in blue, and unobserved random variable nodes are shown in red.

Now, with this representation in mind we can factor the joint log-likelihood function as follows:

(8)

Furthermore, if for each we define the function

(9)

then it is clear that our problem is equivalent to that of maximizing the function:

(10)

Moreover, the function above can be maximized sequentially by means of a Dynamic Programming (DP) approach. Indeed, notice the following:

(11)

Hence, in light of the previous arguments, Algorithm 1 computes a sequence of feasible inventory levels which maximizes function among all feasible inventory level histories.

Data: Sale and loss distribution parameters and , initial inventory level ,
sales history , replenishment history .
Result: Maximum likelihood estimate (MLE) of the inventory level history .
// SETUP: Computes upper bounds on the feasible inventory levels
1 let
2 foreach   do
3      let
4 end foreach
// BACKWARD PASS: Computes the optimal ’s as functions of the ’s
5 let be a zero function, i.e.,
6 foreach   do
7       foreach   do
8             let be the maximum with respect to , and be a maximizing value of , respectively, of the function:
Note: This is a finite maximization, which can be carried by considering all values of such that the pair satisfies Inequality (5).
9       end foreach
10      
11 end foreach
// FORWARD PASS: Constructs the optimal sequence of ’s
12 foreach   do
13       let
14 end foreach
return
Algorithm 1 Dynamic Programming Algorithm for the E-step

4 M-step: Estimation of the Sale and Loss Distribution Parameters

In this section we seek to compute values of the sale and loss distribution parameters and , given the initial inventory level , a feasible inventory level history , the sales history , and the replenishment history . To start, we note that in light of the arguments put forth in Section 3, this task is equivalent to that of maximizing function over all feasible values of the parameters and . In turn, from Equations (8)-(10) we recognize that the aforementioned function is the sum of functions which depend only on the parameter with the sum of functions which depend only on the parameter . Indeed:

(12)

Therefore, computing the optimal values of the parameters and can be readily carried by separately computing the maximizers of the single-argument functions and over their respective domains, which in turn can be executed using any method for optimizing continuously differentiable nonlinear functions, e.g., gradient ascent, Newton’s Method, BFGS, etc.

5 Inventory Level Estimation

Once the sale and loss distribution parameters have been estimated, the probability distribution over inventory levels conditional on the initial inventory and on the sales and replenishments up to period

, i.e., 

(13)

can be easily and efficiently computed. For this purpose, we first note that can be computed directly given the assumptions put forth in Section 2. Next, as noted in Ref. [5], the probability distributions associated with periods can be sequentially computed according to the following recursion:

(14)

Lastly, once we have computed , we can calculate the Marginal Maximum Likelihood Estimate (MMLE) of the inventory level conditional on all the information observed up to time as:

(15)

6 Experiments and Results

In this section we experimentally evaluate the performance of our EM Algorithm by means of simple simulations. In particular, we simulate a ‘naive’ inventory management system which computes the current inventory as the previous inventory minus current sales plus current replenishments (i.e.,  for each period ) and follows a policy. The system begins with an initial inventory level of units and it re-orders an amount of units every time the inventory level reaches or falls below units. We simulate the naive system’s evolution by feeding it random sales with the distributions described in Section 2 and parameter , which is sampled considering the true physical inventory. Furthermore, we setup random losses with parameter , which over a time horizon of periods usually causes the naive system to freeze.

With this setup in place, we estimate the true physical inventory by running our EM Algorithm until the absolute changes of the estimates of and are within 0.01 units, respectively. Regarding the initial guesses of the parameters, we choose to be the average of the sales during the experiment’s horizon, as it seems like a reasonable choice, and we choose , as it is the midpoint of the interval . The E-step is carried exactly as described in Section 3, while the M-step is carried approximately using 20 iterations of gradient ascent. Figure 2 shows the sale and inventory level histories for a typical simulation, where the inventory level according to the naive system is shown in red, the MMLE of the inventory level conditional on all previous observations (see Equation (15)) is shown in blue, and the true physical inventory level is shown in green.

Noteworthily, for most of the examples we simulated our EM Algorithm terminated after less than five iterations.

Figure 2: Sales and inventory time histories for a typical simulation. Here the initial guesses where and , respectively. For this example, our EM Algorithm terminated after only two iterations, with estimates and .

7 Future Research

There are several lines of future research which can stem from the work presented in this paper. For instance, the performance of our EM Algorithm should be evaluated on real data and compared to the performance of similar methods proposed in the literature. This would be interesting because in the real world the true physical inventory levels are not known. Another avenue of research is the extension of our model to one that can optimally decide on product re-orders and inventory inspections. This would be challenging because it leads to a Partially-observable Markov Decision Process (POMDP) formulation, and its is well-known that even approximating the optimal policies for POMDPs can be, in general, computationally intractable.

Acknowledgements

The authors would like to thank the Board of Directors of Tiendas Industriales Asociadas Sociedad Anónima (TIA S.A.), a leading grocery retailer in Ecuador, for authorizing their company to provide the authors with time history data of sales, replenishments and inventory levels for hundreds of their products and several of their stores. Explorative analysis of this data lead to the discovery of products which seem to have suffered from stock freezing, which in turn lead to the design of our DBN model and our EM algorithm.

References

References

  • [1] Yun Kang and Stanley B Gershwin. Information Inaccuracy in Inventory Systems: Stock Loss and Stockout. IIE Transactions, 37(9):843–859, 2005.
  • [2] Donald L Iglehart and Richard C Morey. Inventory Systems with Imperfect Asset Information. Management Science, 18(8):B–388, 1972.
  • [3] Ananth Raman, Nicole DeHoratius, and Zeynep Ton. Execution: The Missing Link in Retail Operations. California Management Review, 43(3):136–152, 2001.
  • [4] Nicole DeHoratius and Ananth Raman. Inventory Record Inaccuracy: An Empirical Analysis. Management Science, 54(4):627–641, 2008.
  • [5] Nicole DeHoratius, Adam J Mersereau, and Linus Schrage. Retail Inventory Management when Records are Inaccurate. Manufacturing & Service Operations Management, 10(2):257–277, 2008.
  • [6] Li Chen and Adam J Mersereau. Analytics for Operational Visibility in the Retail Store: The Cases of Censored Demand and Inventory Record Inaccuracy. In Retail Supply Chain Management, pages 79–112. Springer, 2015.
  • [7] Christopher M Bishop. Pattern Recognition and Machine Learning. Springer, 2006.
  • [8] Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT press, 2009.