betaFeedback

WorksComputer Science

Bellman Error Minimization Via Linear Programming Normalization

Abstract

This paper proposes a new functional approximation approach to reduce Bellman error in high-dimensional dynamic programming and Reinforcement Learning problems. Using a classic dynamic programming problem (network capacity control in revenue management) as the motivational example, the paper illustrates that deep neural networks and linear programming approximation algorithms can be combined to derive approximate solutions to dynamic programming problems. Simulation results show the proposed approximation algorithms achieves competitive performance when compared with benchmark.

Introduction

Finding the optimal policy for high-dimensional dynamic programming problems remains the central challenge in reinforcement learning [11] and dynamic programming [1]. In high-dimensional problems, it is well known that DP suffers from the curse of dimensionality. Approximation algorithms is often the last resort.

When it comes to approximation, two broad classes of efforts exist. The first class attempts to find algorithms applicable to any DP problems by approximating the value function using a flexible (often nonparametric) family of functions ((Bertsekas & Tsitsiklis, 1996); (Sutton & Barto, 1998); (Powell, 2007);(Mnih et al., 2013)). The second class develops customized approximation based on industry and problem-specific structure; see examples like [10] and [12].

Is there opportunity to unify the two approaches, that is, using the special structure of problem to reduce complexity, and taking full advantage the deep learning’s ability to approximate complex nonlinear structure? We explore

Presented at the Reinforcement Learning and Decision Making Conference (RLDM), 2019.

such opportunity in this paper. We are motivated by the following observations: on one hand, general approximation algorithms are often easy to implement, potentially reducing development time in practical applications. Meanwhile, a liberal interpretation to the no-free-lunch theorem [14] implies that performance of such universal algorithms can be limited by lack of customization. Customized algorithms, on the other hand, often can take advantage of specific problem structure and reduce the problem complexity. For specialized classes of problems, it is often possible to find customized approximation algorithms or even prove performance guarantee. At the same time, the custom-made nature of the solution often makes it difficult to be included as part of the machine learning pipeline.

We perform a case study on the network capacity control problem [13]. This classic dynamic programming problem makes it an ideal candidate to our study because it satisfies two criteria. First, its high-dimensional state space defies standard dynamic programming and justifies the need to pursue approximation. Secondly, its rich literature in approximation algorithms [12] (Bertsimas & Popescu, 2003) makes benchmark possible. We propose a value function approximation that combines a deep neural network with customized linear programming (LP) formulation. We compare the performance of our approach with state-of-the-art approximation algorithms.

Problem Setup

We define the network capacity control problem following Chapter 3 of [13]. A firm sells NN types of products. When every unit of product nn is sold, n=1,…,Nn = 1, \ldots, N, the firm collects revenue rnr_n. Selling a unit of product nn also consumes an,ma_{n,m} units of resource mm, where m=1,…,Mm = 1, \ldots, M. For simplicity we assume an,m∈{0,1}a_{n,m} \in\{0,1\}, an=(an,1,…,an,M)a_n = (a_{n,1}, \ldots, a_{n,M}) and matrix A=(an,m)\mathbf{A} = (a_{n,m}) as shorthand when convenient.

Time is discretized into TT time steps, t=0t = 0 being the earliest. For any time step tt, let p=(p1,…,pN)\mathbf{p} = (p_1, \ldots, p_N) be the probability vector for product n=1,…,Nn = 1, \ldots, N to arrive. We assume that the arrival processes for multiple products are independent, and that ∑n=1,…,Npn≪1\sum_{n=1,\ldots,N} p_n \ll1 aka no two requests arrive in the same time step. At time tt, let xm(t)x_m(t) be the remaining capacity of resource mm, m=1,…,Mm = 1,\ldots,M. The vector x(t)=(x1(t),…,xM(t))\mathbf{x}(t) = (x_1(t),\ldots,x_M(t)) captures the state of the network. If product nn is sold, the state of the network changes to x(t)−an\mathbf{x}(t) - \mathbf{a}_n.

The goal of the firm is to maximize total undiscounted reward (revenue) for the entire time horizon TT. The central problem for the network capacity control problem is: at time tt, given current resource capacity x(t)\mathbf{x}(t) and a request for product nn, should the firm accept or reject the request? A policy u(x(t),t,n)u(\mathbf{x}(t),t,n) is a function that maps state (x(t),t,n)(\mathbf{x}(t),t,n) to a binary decision of acception / rejection. We use u=1u = 1 for acception and u=0u = 0 for rejection. For notational convenience, we will drop the time dimension in the following derivation.

Under optimal policy, the expected reward function Vt(x)V_t(\mathbf{x}) satisfies the Bellman Equation:

Vt(x)=E{max⁡u∈Ψ(x)[rnu(x,t,n)+Vt+1(x−au)]}(1)V_t(\mathbf{x}) = \mathbb{E}\left\{\max_{u \in\Psi(\mathbf{x})}\left[r_n u(\mathbf{x},t,n) + V_{t+1}(\mathbf{x} - \mathbf{a}u)\right]\right\} \tag*{(1)}

with boundary condition

VT(x)=0, ∀x(2)V_T(\mathbf{x}) = 0,\ \forall\mathbf{x} \tag*{(2)}

In the above equation, Ψ(x)\Psi(\mathbf{x}) is the set of all valid policy functions. We assume there is no back-order, i.e., if x≥an\mathbf{x} \ge\mathbf{a}_n is not true, u(x,t,n)=0u(\mathbf{x},t,n) = 0.

Given any value function Vt(x)V_t(\mathbf{x}), the opportunity cost for any request for product nn is Vt(x)−Vt(x−an)V_t(\mathbf{x}) - V_t(\mathbf{x} - \mathbf{a}_n). The policy below then can be used to accept/reject any request:

u(x,t,n)=1 iff x≥an and rn≥Vt(x)−Vt(x−an)(3)u(\mathbf{x},t,n) = 1\ \text{iff}\ \mathbf{x} \ge\mathbf{a}_n\ \text{and}\ r_n \ge V_t(\mathbf{x}) - V_t(\mathbf{x} - \mathbf{a}_n) \tag*{(3)}

Please note that equation (3) defines a policy given any value function. To emphasize this point, we can rewrite the above equation as u(x,t,n)=Π(Vt(x))u(\mathbf{x},t,n) = \Pi(V_t(\mathbf{x})).

The network capacity control problem is of central importance to profitability of many companies, including but not limited to most companies in airline and hospitality industries. Thus Problem (1) has been extensively studied; see [13] for details. For a typical network with 10 resources, 100 units of initial capacity for initial capacity, and 1,000 time steps, the number of possible state and time combination is 102310^{23}, too large to calculate by backward induction. Currently, best approximation algorithms is based on decomposition approaches, e.g., in [12] and (Bertsimas & Popescu, 2003). In such algorithms, the dynamic programming problem in high-dimensional space is split into multiple (often independent) one-dimensional resource control problem. The latter set of problems can be solved by backward induction.

Policy Generation

Functional Approximation and Linear Programming Normalization

To generate a good policy u∗(x,t,n)u^*(\mathbf{x},t,n), [2] proposes approximating the value function Vt(x)V_t(\mathbf{x}) with Vt∗(x)V_t^*(\mathbf{x}), an approximate value function defined by a deep neural network. In theory, it is well known that a “big enough” neural network can capture complex nonlinearity for a large family of continuous functions. In reality, however, a vanilla neural network can lead to poor performance and long development time.

We define a LP-normalized functional approximator as:

Vt∗(x∣θ)=Ut(x)Wt(x∣θ)(4)V_t^*(\mathbf{x}|\theta) = U_t(\mathbf{x})W_t(\mathbf{x}|\theta) \tag*{(4)}

VV is the product of two functions, WW and UU. Wt(x∣θ)W_t(\mathbf{x}|\theta) is the output of a neural network. x\mathbf{x} and tt are its input; θ\theta are weights and biases. Independent from θ\theta, Ut(x)U_t(\mathbf{x}) is the solution to the LP:

Ut(x)=max⁡rTys.t.Ay≤x0≤y≤pT(T−t)\begin{aligned} U_t(\mathbf{x}) &= \max\mathbf{r}^{T}\mathbf{y}\\ \text{s.t.}\quad&\mathbf{A}\mathbf{y} \le\mathbf{x}\\ &0 \le\mathbf{y} \le\mathbf{p}^{T}(T-t) \end{aligned}

where tt and x\mathbf{x} are inputs and y\mathbf{y} are continuous decision variables.

This LP is a custom approximation algorithm that maximizes total revenue subject to capacity constraints. It also uses the expected demand pt\mathbf{p}t as the upper bound for solution. It is worth noting that the LP formulation is an upper bound to the DP problem (1). That is, Ut(x)≥Vt(x)U_t(\mathbf{x}) \ge V_t(\mathbf{x}). This problem can be solved in a fraction of second with standard LP solver on commodity hardware. This allows us to consider it as an “on-demand” function call.

In the current formulation, the LP component Ut(x)U_t(\mathbf{x}) serves as a normalizer for (4). First of all, it captures first-order effect, i.e., the capacity-demand trade-off in the dynamic programming problem (1) and leaves the nonlinear higher-order effect with neural network. Secondly, the LP formulation naturally captures the monotonicity of VV with respect to x\mathbf{x} and tt. Last but definitely not least, Vt∗(x∣θ)V_t^*(\mathbf{x}|\theta) satisfies boundary condition (2) automatically, since Ut(x)=0U_t(\mathbf{x}) = 0 when t=Tt = T. Using LP as a normalizer to neural networks differs the current paper from earlier LP research, e.g., in (Bertsimas & Popescu, 2003) and [5].

The LP ignores a few key elements of the network capacity control problem. Most notably, demand is treated as deterministic and continuous. As a result, I(Ut(x))\mathbb{I}(U_t(\mathbf{x})), the policy generated by LP approximation, has been shown to perform unsatisfactorily by empirical study. Refining the control policy with neural networks is the task of the next subsection.

Bellman Error Minimization and Stratified Sampling

Given the functional approximator Vt∗(x∣θ)V_t^*(x|\theta), we now derive an approach to optimize it. Based on (1), let us first define the Bellman error as

Qt(x∣θ)=Vt∗(x)−Eu∈Ψ(x)[max⁡u∈Ψ(x){rnu(x,t,n)+Vt+1∗(x−anu)}]Q_t(x|\theta)=V_t^*(x)-E_{u\in\Psi(x)}\left[\max_{u\in\Psi(x)}\left\{r_nu(x,t,n)+V_{t+1}^*(x-a_nu)\right\}\right]

Combining the above equation with (4) yields:

\begin{aligned} Q_t(x|\theta) &=U(x,t)W(x,t|\theta)-\sum_{0\le n\le N}p_n\left[\max_{u\in\Psi(x)}\left(r_nu\right.\\ &\qquad\left.+U_{t+1}(x-a_nu)W_{t+1}(x-a_nu|\theta)\right)\right] \end{aligned}

This leads to the following minimization problem:

min⁡θ∑x,tL(Qt(x∣θ))(5)\min_{\theta}\sum_{x,t}L(Q_t(x|\theta)) \tag*{(5)}

where L(⋅)L(\cdot) is the loss function. We choose to use L2L^2 norm of QQ as the loss in the paper, but other loss function can be used too.

Problem (5) is difficult for a few reasons. First, Qt(x)Q_t(x) is nonlinear, likely non-convex, and can be locally nondifferentiable. This makes optimization hard. Secondly, the sum needs to be taken on all combinations of xx and tt, but the number of combination is practically infinite.

On the first challenge, empirical findings in deep learning literature suggest a gradient-based algorithm (such as SGD) can often reduce error to a satisfactory level, even though finding global minimum remains very difficult. Furthermore, policy Π(Vt∗(x))\Pi(V_t^*(x)) as the opportunity cost can and (3) can still be a good approximation to Π(Vt(x))\Pi(V_t(x)), the true optimal policy.

On the second challenge, instead of optimizing ∑x,tL(Qt(x∣θ))\sum_{x,t}L(Q_t(x|\theta)), we optimize the following surrogate:

min⁡θ∑x,t∈ΦL(Qt(x∣θ))(6)\min_{\theta}\sum_{x,t\in\Phi}L(Q_t(x|\theta)) \tag*{(6)}

where Φ\Phi is a list of x,tx,t pairs that is representative of the entire state space. To generate Φ\Phi for a specific problem case, we perform Monte-Carlo simulation using a simple first-come-first-serve control policy; see Algorithm 1 for details.

Algorithm 1 Data Generation

Input: time horizon TT, initial capacity x(0)x(0), probability vector p\mathbf{p}, and number of sample paths needed SS

Initialize Φ=∅\Phi=\emptyset

for s=0s=0 to S−1S-1 do

Initialize x=x0\mathbf{x}=\mathbf{x}_0

for t=0t=0 to T−1T-1 do

Draw a sample nn from the discrete distribution

Pr(X=n)=pnPr(X=n)=p_n

Add (x,t)(x,t) to Φ\Phi

if x≥anx\ge a_n then

x=x−anx=x-a_n

end if

end for

end for

Return Φ\Phi

Parameter Estimation

Given the Bellman error QQ and an error function LL, let us use ∇L(Qt(x∣θ))\nabla L(Q_t(x|\theta)) to denote the gradient of loss with respect to neural network parameter θ\theta. We use a deep feedforward network to model Wt(x)W_t(x). The network has 5 hidden layers and 64 hidden units with sigmoid activation in each layer.

For training, we split data Φ\Phi into minibatches. Each minibatch contains B=64B=64 samples of (xb,tb)(x_b,t_b), b=1,…,Bb=1,\ldots,B. This allows us to approximate ∇L(Qt(x∣θ))\nabla L(Q_t(x|\theta)) with the following minibatch proxy:

H(θ)=1B∑b=1,…,B∇L(Qtb(xb∣θ))H(\theta)=\frac{1}{B}\sum_{b=1,\ldots,B}\nabla L(Q_{t_b}(x_b|\theta))

For each sample, we call an LP solver to calculate Ut(x)U_t(x) and then feed the results from LP into a gradient-based algorithm to update θ\theta; see (7). We choose to use Adamgrad (Duchi et-al., [6]) algorithm in Tensorflow to update the parameters, using adjustable learning rates in the range between 0.01 and 0.5.

θk+1=f(θk,H(θk))\theta_{k+1}=f(\theta_k,H(\theta_k))

Validation

We benchmark performance of the proposed algorithm (“DNN”) using trained policy Π(Ut(x)Wt(x∣θ))\Pi(U_t(x)W_t(x|\theta)), with three other policies: a) the first-come-first-serve policy (“FCFS”), b) the naive LP-based policy(“LP”) using policy Π(Ut(x))\Pi(U_t(x)), and most importantly, c) a decomposition-based approximation algorithm (“DECOMP”, see Chapter 3.4 of Talluri & van Ryzin, [13]) using a sophisticated combination of LP and single-resource dynamic programming algorithms.

Different benchmarks serves different purposes. Comparison with FCFS policy helps us understand how much value there exists in network capacity control. Comparison with LP ensures that the neural network provides a better approximation to the value function than LP alone. Most importantly, comparing with DECOMP helps us understand the capability and potential of combining universal functional approximators and customized algorithms.

For benchmarking purposes, we generate four simulation cases and perform simulation experiments. For each case, we generate a unique combination of parameters, including number of resources, capacities, demand, and revenue. A summary of key parameters can be found in Table 1; see supplemental material for complete details.

CaseMMNNTTX(0)X(0)
11427128,962100
2143947,811500
3143949,827500
4143918,684200

Table 1. BASIC SIMULATION SETTINGS

The key performance metrics we compare is mean simulation reward (revenue). For every case, we generate 640 simulation runs (10 minibatches). In each simulation run, a unique sequence of requests is generated and accept/reject decision is made by all policies. For any policy π\pi, let V(π)V(\pi) be the mean simulation reward averaged over the 640 runs. Using DECOMP as the baseline, we calculate V(π)V(DECOMP)−1\frac{V(\pi)}{V(\mathrm{DECOMP})}-1 and show them as percentages in Table 2. A positive number of 1.0 means policy performs 1% better than DECOMP. Raw simulation reward values are in supplement material. The proposed algorithm performs well compared DECOMP policy, a highly customized approximation algorithm. It also out-performs FIFO and LP policies.

CaseDECOMPDNNFIFOLP
1--0.3-10.0-1.2
2-0.4-27.10.3
3--0.3-32.8-0.8
4-0.3-31.4-1.5

Table 2. PERFORMANCE COMPARISON — DIFFERENCE FROM DECOMP, IN %

Conclusion

We proposed a novel approach to solve large-scale dynamic programming problems. The approach combines deep neural network, LP normalization, and stratified sampling to develop an approximate solution to the Bellman equation and

a control policy. Simulation results show that this approach performs competitively against state-of-the-art deposition algorithms.

References

  1. [1]Bertsekas, D. P. Dynamic Programming and Optimal Control, Vol. I.. Athena Scientific, 1995
  2. [2]Bertsekas, D. P., Tsitsiklis, J. Neuro-Dynamic Programming. Athena Scientific, 1996.
  3. [5]de Farias, D. P., Van Roy, B. The Linear Programming Approach to Approximate Dynamic Programming. Operations Research, 2003DOI
  4. [6]Duchi, D., Hazan, E., Singer, Y. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. Journal of Machine Learning Research, 2011. arXiv:1104.4024
  5. [10]Simao, H. P., Day, J. George, A., Gifford, T., Nienow, J., Powell, W.B. An Approximate Dynamic Programming Algorithm for Large-Scale Fleet Management: A Case Application. Transportation Science, Vol. 43, No. 2, pp. 178-197 (2009)DOI
  6. [11]Sutton, R. S., Barto, A. G. Reinforcement Learning: An introduction. MIT Press, 1998DOI
  7. [12]Talluri, K., van Ryzin, G. An Analysis of Bid-price Controls for Network Revenue Management. Management Science. v44, 1998DOI
  8. [13]Talluri, K., van Ryzin, G. The Theory and Practice of Revenue Management. Springer, 2004DOI
  9. [14]Wolpert, D.H., Macready, W.G. No Free Lunch Theorems for Optimization. IEEE Transactions on Evolutionary Computation, 1(1), 67–82.DOI

Paper details

vlnc:W_abu5cvze
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents