Reinforcement Learning for Adaptive Caching with Dynamic Storage Pricing

2018·Arxiv

Abstract

Abstract

Small base stations (SBs) of fifth-generation (5G) cellular networks are envisioned to have storage devices to locally serve requests for reusable and popular contents by caching them at the edge of the network, close to the end users. The ultimate goal is to shift part of the predictable load on the back-haul links, from on-peak to off-peak periods, contributing to a better overall network performance and service experience. To enable the SBs with efficient fetch-cache decision-making schemes operating in dynamic settings, this paper introduces simple but flexible generic time-varying fetching and caching costs, which are then used to formulate a constrained minimization of the aggregate cost across files and time. Since caching decisions per time slot influence the content availability in future slots, the novel formulation for optimal fetch-cache decisions falls into the class of dynamic programming. Under this generic formulation, first by considering stationary distributions for the costs and file popularities, an efficient reinforcement learning-based solver known as value iteration algorithm can be used to solve the emerging optimization problem. Later, it is shown that practical limitations on cache capacity can be handled using a particular instance of the generic dynamic pricing formulation. Under this setting, to provide a light-weight online solver for the corresponding optimization, the well-known reinforcement learning algorithm, Q-learning, is employed to find optimal fetch-cache decisions. Numerical tests corroborating the merits of the proposed approach wrap up the paper.

Index Terms—Dynamic Caching, Fetching, Dynamic Programming, Value iteration, Q-learning.

I. INTRODUCTION

In the era of data deluge, storing “popular” contents at the edge of a content delivery network (CDN) or 5G cellular network, is a promising technique to satisfy the users’ demand while alleviating the congestion on the back-haul links [2], [3], [4]. To this aim, small basestations (SBs) equipped with a local cache must intelligently store reusable popular contents during off-peak periods, and utilize the stored data during on-peak hours. To endow SBs with the required learning capability, a wide range of learning and optimization approaches has been adopted (see [2], [3]).

Considering static popularity for contents, a multi-armed bandit formulation of the problem was investigated in [5],

Alireza Sadeghi, Fatemeh Sheikholeslami, and Georgios B. Giannakis are with the Digital Technology Center and the Department of Electrical and Computer engineering, University of Minnesota, Minneapolis, USA.

Antonio G. Marques is with the Department of Signal Theory and Communications, King Juan Carlos University, Madrid, Spain.

The work in this paper has been supported by USA NSF grants 1423316, 1508993, 1514056, 1711471, by the Spanish MINECO grant OMICROM (TEC2013-41604-R) and by the URJC Mobility Program. Part of this work has been presented in ICASSP 2018, Calgary, Canada [1].

where the caching is carried out according to demand history and under unknown popularities. Coded, convexified, and distributed extensions of this problem were later studied in [6], context and trend-aware learning approaches in [7], [8], and coordinated-distributed extensions in [9]. From a learning perspective, the trade-off between the “accuracy” of learning a static popularity, and the corresponding learning “speed” is investigated in [10] and [11].

In reality however, popularities exhibit fluctuations meaning they are dynamic over a time horizon. For instance, half of the top 25 requested Wikipedia articles change on a daily basis [2], [12]. This motivates recent approaches to designing caching strategies under dynamic popularity scenarios.

To account for dynamic popularities, a Poisson shot noise model was introduced in [13], followed by an age-based thresholding caching strategy in [14]. Furthermore, reinforcement learning-based approaches were studied in [15], [16] and [17]. In [15], global and local popularities are modeled by different Markov processes, and a Q-learning based algorithm was proposed; while in [17], a policy gradient approach was followed to optimize a parametric policy. From an “accuracy-speed” trade-off perspective, a class of learning-based algorithms under dynamic popularities was analyzed in [18]. Modeling the evolution of the popularities as Markov processes, an online coded caching scheme was introduced in [19], to minimize the long-term average transmitted data over the back-haul. Likewise, delivery time was minimized in [20] through a coded caching strategy.

Targeting different objectives, optimization-based dynamic caching has been utilized in different approaches, see e.g., in [21]–[22]. To minimize content-access latency, energy, storage or bandwidth utilization costs, regularization and decomposition techniques have been used in [21]. Similar approaches are followed in [23] to relax a non-convex optimization problem to allocate limited caching memory across a network while accounting for the spatio-temporal content popularity together with the rented storage price fluctuations. An online mixedinteger programming formulation has also been investigated in [24].

Different from [21], [23], [24], this paper considers a generic formulation of the problem by introducing time-varying and stochastic costs, and aims at designing more flexible caching schemes, while enabling SBs to learn the optimal fetching-caching decisions. In particular, the fetching and caching decisions are found as the solution of a constrained optimization with the objective of reducing the overall cost, aggregated across files and time instants. Since the caching decision in a given time slot not only affects the instantaneous cost, but also will influence cache availability in the future, the problem is indeed a dynamic programming (DP). First, by assuming a known stationary distribution for costs as well as popularities, the proposed generic optimization problem is shown to become separable across files, and thus it can be efficiently solved by decomposing the so-called value function associated with the original DP into a summation of smallerdimension value functions. To reduce the computational complexity, the corresponding marginalized version of the value iteration algorithm [25] is introduced, and its performance is assessed via numerical tests. Subsequently, it is shown that having a limited caching capacity and unknown underlying distributions for pertinent parameters, is indeed a special case of this generic formulation. Thus, in order to address caching under limited storage capacity, a dual decomposition technique is developed to cope with the coupling constraint associated with the storage limitation. An online low complexity (marginalized) Q-learning based solver is put forth for learning the optimal fetch-cache decisions in an online fashion. The proposed approach is guaranteed to learn optimal fetching-caching decisions in stationary settings, but numerical tests corroborate its improved performance even in non-stationary scenarios.

The rest of this paper is organized as follows. Section II provides a generic formulation of the problem, where solvers adopted from reinforcement learning are developed in Section III. Limited storage and back-haul transmission rate settings are discussed in Section IV. Section V reports numerical results, and finally section VI provides concluding remarks.

II. OPERATING CONDITIONS AND COSTS

Consider a memory-enabled SB responsible for serving file (content) requests denoted by f = 1, 2, . . . , F across time. The requested contents are transmitted to users either by fetching through a (costly) back-haul transmission link connecting the SB to the cloud, or, by utilizing the local storage unit in the SB where popular contents have been proactively cached ahead of time. The system is considered to operate in a slotted fashion with t = 1, 2, . . . denoting time.

During slot t and given the available cache contents, the SB receives a number of file requests whose provision incurs certain costs. Specifically, for a requested file f, fetching it from the cloud through the back-haul link gives rise to scheduling, routing and transmission costs, whereas its availability at the cache storage in the SB will eliminate such expenses. However, local caching also incurs a number of (instantaneous) costs corresponding to memory or energy consumption. This gives rise to an inherent caching-versus-fetching trade-off, where one is promoted over the other depending on their relative costs. The objective here is to propose a simple yet sufficiently general framework to minimize the sumaverage cost over time by optimizing fetch-cache decisions while adhering to the constraints inherent to the operation of the system at hand, and user-specific requirements. The variables, constraints, and costs involved in this optimization are described in the ensuing subsections.

A. Variables and constraints

Consider the system at time slot t, where the binary variable represents the incoming request for file f; that is, if the file f is requested during slot t, and , otherwise. Here, we assume that necessitates serving the file to the user and dropping requests is not allowed; thus, requests must be carried out either by fetching the file from the cloud or by utilizing the content currently available in the cache. Furthermore, at the end of each slot, the SB will decide if content f should be stored in the cache for its possible reuse in a subsequent slot.

To formalize this, let us define the “fetching” decision variable along the “caching” decision variable . Setting implies “fetching” file f at time t, while means “no-fetching.” Similarly, implies that content f will be stored in cache at the end of slot t for the next slot, while implies that it will not. Furthermore, let the storage state variable account for the availability of files at the local cache. In particular, if file f is available in the cache at the beginning of slot t, and otherwise. Since the availability of file f directly depends on the caching decision at time , we have

which will be incorporated into our optimization as constraints.

Moreover, since having implies transmission of file f to the user(s), it requires either having the file in cache () or fetching it from the cloud (), giving rise to the second set of constraints

Finally, the caching decision can be set to 1 only when the content f is available at time t; that is, only if either fetching is carried out () or the current cache state is . This in turn implies the third set of constraints as

B. Prices and aggregated costs

To account for the caching and fetching costs, let and denote the (generic) costs associated with and , respectively. Focusing for now on the caching cost and with denoting the size of content f, a simple form for is

where the first term is proportional to the file size , while the second one is constant. Note also that we consider file-dependent costs (via variables and ), as well as cost contributions which are common across files (via and ). In most practical setups, the latter will dominate over the former. For example, the caching cost per bit is likely to be the same regardless of the particular type of content, so that . From a modeling perspective, variables can correspond to actual prices paid to an external entity (e.g., if associated with energy consumption costs), marginal utility or cost functions, congestion indicators, Lagrange multipliers associated with constraints, or linear combinations of those (see, e.g., [25], [26], [27], [28] and Section IV). Accordingly, the corresponding form for the fetching cost is

As before, if the transmission link from the cloud to the SB is the same for all contents, the prices and are expected to dominate their file-dependent counterparts and .

Upon defining the corresponding cost for a given file as , the aggregate cost at time t is given by

which is the basis for the DP formulated in the next section. For future reference, Fig. 1 shows a schematic of the system model and the notation introduced in this section.

III. OPTIMAL CACHING WITH TIME-VARYING COSTS

Since decisions are coupled across time [cf. constraint (1)], and the future values of prices as well as state variables are inherently random, our goal is to optimize the long-term average discounted aggregate cost

where the expectation is taken with respect to (w.r.t.) the random variables , and is the discounting factor whose tuning trades off current versus more uncertain future costs [29, p.44].

First, we investigate a setup where the knowledge of the realization of the random variables is causal, that is, the exact value of is revealed at the beginning of each slot t, and fetch-cache decisions are made sequentially per slot. In addition, the variables in are assumed to have stationary and known distributions (e.g., estimated through historical data), which allows for practical estimates of the expectation. Hence, the goal is to take real-time fetch-cache decisions by minimizing the expected current plus future cost while adhering to operational constraints, giving rise to the following optimization

where

and the expectation is taken w.r.t. .

The presence of constraint (1), which has been made explicit in the definition of , implies that current caching decisions impact future costs, and therefore such costs must be taken into account when making the decisions. This ultimately

Fig. 1: System model and main notation. The state variables (dashed lines) are the storage indicator and the content request , as well as the dynamic caching and fetching prices and . The optimization variables (solid lines) are the caching and fetching decisions and . The instantaneous per-file cost is . Per slot t, the SB collects the state variables , and decides the values of considering not only the cost at time t but also the cost at time instants .

implies that (P1) is a DP [29, p. 79] and, therefore, to solve it we need to: a) identify the current and expected future aggregate cost (this second term will give rise to the so-called value-function); b) write the corresponding Bellman equations; and c) propose a method to estimate the value function. This is the subject of the ensuing subsections, which start by further exploitation of problem structure to reduce complexity.

A. Bellman equations for the per-content problem

Focusing on (P1), one can readily deduce that: (i) consideration of the content-dependent prices renders the objective in (P1) separable across f, and (ii) the constraints in (P1) are also separable across f. Furthermore, the decisions and for a given f, do not affect the values (distribution) of for files and for times . Thus, (P1) naturally gives rise to the per-file optimization

which must be solved for f = 1, ..., F. Indeed, the aggregate cost associated with (P2) will not depend on variables corresponding to files [25]. This is the case if, for instance, the involved variables are independent of each other (which is the setup considered here), or when the focus is on a large system where the contribution of an individual variable to the aggregate network behavior is practically negligible.

Bellman equations and value function: The DP in (P2) can be solved with the corresponding Bellman equations, which require finding the associated value functions [29, p. 68]. To this end, consider the system at time t, where the cache state as well as the file requests and cost parameters are all given, so that we can write and .

Then, the optimal fetch-cache decision is readily expressible as the solution to (8). The objective in (8) is rewritten in (9) as the summation of current and discounted average future costs. The form of (9) is testament to the fact that problem (P2) is a DP and the caching decision a influences not only the current cost , but also future costs through the second term as well. Bellman equations can be leveraged for tackling such a DP. Under the stationarity assumption for variables , and , the term accounting for the future cost can be rewritten in terms of the stationary value function [29, p. 68]. This function, formally defined in (10), captures the minimum sum average cost for the “state” , parametrized by , where for notational convenience, we define .

B. Marginalized value-function

If one further assumes that price parameters and requests are i.i.d. across time, it can be shown that the optimal solution to (P2) can be expressed in terms of the reduced value function [25]

where the expectation is w.r.t . This is important not only because it captures the average future cost of file f for cache state , but also because is a function of a binary variable, and therefore its estimation requires only estimating two values. This is in contrast with the original four-dimensional value function in (10), whose estimation is more difficult due to its continuous arguments.

By rewriting the proposed alternative value function in a recursive fashion as the summation of instantaneous cost and discounted future values , one readily arrives at the Bellman equation form provided in (11). Thus, the problem reduces to finding and for all f, after which the optimal fetch-cache decisions are easily found as the solution to

If the value-function is known, so that we have access to and , the corresponding optimal (Bellman) decisions can be found as

if (0) (13a) if (1) (13b) if (0) (13c) if (1) (13d)

where represents the future marginal cost, which is obtained as , and is an indicator function that yields value one if the condition in the argument holds, and zero otherwise.

The next subsection discusses how and can be calculated, but first a remark is in order.

Remark 1 (Augmented value functions). The value function can be redefined to account for extra information on , or , if available. For instance, consider the case where the distribution of can be parametrized by , which measures content “popularity” [30]. In such cases, the value function can incorporate the popularity parameter as an additional input to yield . Consequently, the optimal decisions will depend not only on the current requests and prices, but also on the (current) popularity . This indeed broadens the scope of the proposed approach, as certain types of non-stationarity in the distribution of can be handled by allowing to (slowly) vary with time.

C. Value function in closed form

For notational brevity, we have removed the superscript f in this subsection, and use and in lieu of , and .

Denoting the long-term popularity of the content as , using the expressions for the optimal actions in (13a)-(13d), and leveraging the independence among , and , the expected cost-to-go function can be readily derived as in (14)- (16). The expectation in (14) is w.r.t. , while that in (15) is w.r.t. both and .

Solving the system of equations in (14)-(16) yields the optimal values for and . A simple solver would be to perform exhaustive search over the range of these values since it is only a two-dimensional search space. However, a better alternative to solving the given system of equations is to rely on the well known value iteration algorithm [29, p. 100]. In short, this is an offline algorithm, which per iteration i updates the estimates by computing the expected cost using , until the desired accuracy is achieved. This scheme is tabulated in detail in Algorithm 1, for which the distributions of are assumed to be known. We refer to [29, p.100] for a detailed discussion on the value-iteration algorithm, and its convergence guarantees.

Remark 2 (Finite-horizon approximate policies). In the proposed algorithms, namely exhaustive search as well as Algorithm 1, the solver is required to compute an expectation, which can be burdensome in setups with limited computational resources. For such scenarios, the class of finite-horizon policies emerges as a computationally affordable suboptimal alternative [29, p. 242]. The idea behind such policies is to truncate the infinite summation in the objective of (P1); thus, only considering the impact of the current decision on a few number of future time instants denoted by h, typically referred to as the horizon. The extreme case of a finite-horizon policy is that of a myopic policy with h = 0, which ignores any future impact of current decision, a.k.a. zero-horizon policy, thus taking the action which minimizes the instantaneous cost. This is equivalent to setting the future marginal cost to zero, hence solving (13a)-(13d) with .

Another commonly used alternative is to consider the impact of the current decision for only the next time instant, which corresponds to the so-called horizon-1 policy. This entails setting the future cost at h = 1 as

with

which are then substituted into (13a)-(13d) to yield the actions and . The notation and in (17) and (18) is used to denote the actions obtained when (13a)-(13d) are solved using the future marginal cost at horizon zero , which as already mentioned, is zero; that is, under the myopic policy in lieu of the original optimal solution. Following an inductive argument, the future marginal cost at h = 2 is obtained as with

¯+ + ¯+ + ¯

¯+ + ¯+ + + ¯

which will allow to obtain the actions and . While increasing horizons can be used, as h grows large, solving the associated equations becomes more difficult and computation of the optimal stationary policies, is preferable.

D. State-action value function (Q-function):

In many practical scenarios, knowing the underlying distributions for and may not be possible, which motivates the introduction of online solvers that can learn the parameters on-the-fly. As clarified in the ensuing sections, in such scenarios, the so-called Q-function (or state-action value function) [29, p.69] becomes helpful, since there are rigorous theoretical guarantees on the convergence of its stochastic estimates; see [31] and [32]. Motivated by this fact, instead of formulating our dynamic program using the value (cost-to-go) function, we can alternatively formulate it using the Q-function. Aiming at an online solver, let us tackle the DP through the estimation (learning) of the Q-function. Equation1 (19) defines the Q-function for a specific file under a given state , parametrized by cost parameters . Under stationarity distribution assumption for , the Q-function accounts for the minimum average aggregate cost at state , and taking specific fetch-cache decision as for the first decision, while followed by the best possible decisions in next slots. This function is parametrized by since while making the current cache-fetch decision, the current values for these cost parameters are assumed to be known. The original Q-function in (19) needs to be learned over all values of , thus suffering from the curse of dimensionality, especially due to the fact that and are continuous variables.

To alleviate this burden, we define the marginalized Q-function in (21). By changing the notation

Average minimum future cost

, r, w, a, λ, a, a(21) , w, λ, r, w, a, λ, s.

for clarity of exposition, the marginalized Q-function, , can be rewritten in a more compact form as

Note that, while the marginalized value-function is only a function of the state, the marginalized Q-function depends on both the state (r, s) and the immediate action (w, a). The main reason one prefers to learn the value-function rather than the Q-function is that the latter is computationally more complex. To see this, note that the input space of is a four-dimensional binary space, hence the function has different inputs and one must estimate the corresponding 16 outputs. Each of these possible values are called Q-factors, and under the stationarity assumption, they can be found using (23) defined for all (r, s, w, a). In this expression, we have and the term stands for the probability of specific action to be optimal at slot t + 1. This action is random because the optimal decision at t + 1 depends on and , which are not known at slot t. Although not critical for the discussion, if needed, one can show that half of the 16 Q-

factors can be discarded, either for being infeasible – recall that – or suboptimal. This means that (23) needs to be computed only for 8 of the Q-factors.

From the point of view of offline estimation, working with the Q-function is more challenging than working with the V -function, since more parameters need to be estimated. In several realistic scenarios however, the distributions of the state variables are unknown, and one has to resort to stochastic schemes in order to learn the parameters on-the-fly. In such scenarios, the Q-function based approach is preferable, because it enables learning the optimal decisions in an online fashion even when the underlying distributions are unknown.

E. Stochastic policies: Reinforcement learning

As discussed in Section III-C, there are scenarios where obtaining the optimal value function (and, hence, the optimal stationary policy associated with it) is not computationally feasible. The closing remark in that section discussed policies which, upon replacing the optimal value function with approximations easier to compute, trade reduced complexity for loss in optimality. However, such reduced-complexity methods still require knowledge of the state distribution [cf. (17) and (18)]. In this section, we discuss stochastic schemes to approximate the value function under unknown distributions. The policies resulting from such stochastic methods offer a number of advantages since they: (a) incur a reduced complexity; (b) do not require knowledge of the underlying state distribution; (c) are able to handle some non-stationary environments; and in some cases, (d) they come with asymptotic optimality guarantees. To introduce this scheme, we first start by considering a simple method that updates stochastic estimates of the value function itself, and then proceed to a more advanced method which tracks the value of the Q-function. Specifically, the presented method is an instance of the celebrated Q-learning algorithm [33], which is the workhorse of stochastic approximation in DP [29, p. 68].

1) Stochastic value function estimates: The first method

relies on current stochastic estimates of and , denoted by and at time t (to be defined rigorously later). Given and at time t, the (stochastic) actions and are taken via solving (13a)-(13d) with . Then, stochastic estimates of the value functions and are updated as

• If , then ˆ¯) and ˆ¯(1 ) ˆ¯) + ( ˆ+ ˆˆ¯));

2) Q-learning algorithm: Alternatively, one can run a stochastic approximation algorithm on the Q-function. This entails replacing the Q-factors with stochastic estimates . To describe the algorithm, suppose for now that at time t, the estimates are known for all (r, s, w, a). Then, in a given slot t with , action is obtained via either an exploration or an exploitation step. When exploring, which happens with a small probability , a random and feasible action is taken. In contrast, in the exploitation mode, which happens with a probability , the optimal action according to the current estimate of is

After taking this action, going to next slot t+1, and observing , and , the Q-function estimate is updated as

where “o.w.” stands for “otherwise,” and is the optimal action for the next slot. This update rule describes one of the possible implementations of the Q-learning algorithm,

which was originally introduced in [33]. This online algorithm enables making sequential decisions in an unknown environment, and is guaranteed to learn optimal decision-making rules under certain conditions [29, p.148], [32]. The aforementioned exploration-exploitation step is necessary for the factors to converge to their optimal value [34], [31]. Intuitively, under continuous updates of all state-action pairs along with regular stochastic approximation conditions on the stepsize , the updates on converge to the optimal values with probability 1. Various exploration-exploitation algorithms have been proposed to meet convergence guarantees [35, p. 839] . A necessary condition for any such exploration-exploitation approach is the greedy in the limit of infinite exploration (GLIE) property [35, p. 840]. A common choice to meet this property is the -greedy approach with , providing guaranteed yet slow convergence. In practice however, is set to a small value for faster convergence; see [34] and [31] for a more detailed discussion on convergence.

The resultant algorithm for the problem at hand is tabulated in Algorithm 2. It is important to stress that in our particular case, we expect the algorithm to converge fast. That is the case because, under the decomposition approach followed in this paper as well as the introduction of the marginalized Q-function, the state-action space of the resultant Q-function has very low dimension and hence, only a small number of Q-factors need to be estimated.

IV. LIMITED STORAGE AND BACK-HAUL TRANSMISSION RATE VIA DYNAMIC PRICING

So far, we have considered that the prices areprovided by the system, and we have not assumed any explicit limits (bounds) neither on the capacity of the local storage nor on the back-haul transmission link between the SB and the cloud. In this section, we discuss such limitations, and describe how by leveraging dual decomposition techniques, one can redefine the prices to account for capacity constraints.

A. Limiting the instantaneous storage rate

In this subsection, practical limitations on the cache storage capacity are explored. Suppose that the SB is equipped with a single memory device that can store M files. Clearly, the cache decisions should then satisfy the following constraint per time slot

In order to respect such hard capacity limits, the original optimization problem in (P1) can be simply augmented with C4, giving rise to a new optimization problem which we will refer to as (P4). Solving (P4) is more challenging than (P1), since the constraints in C4 must be enforced at each time instant, which subsequently couples the optimization across files. In order to deal with this, one can dualize C4 by augmenting the cost with the primal-dual term , where denotes the Lagrange multiplier associated with the capacity constraint C4. The resultant problem is separable across files, but requires finding , the optimal value of the Lagrange multiplier, at each and every time instant.

If the solution to the original unconstrained problem (P1) does satisfy C4, then due to complementary slackness. On the other hand, if the storage limit is violated, then the constraint is active, the Lagrange multiplier satisfies , and its exact value must be found using an iterative algorithm. Once the value of the multiplier is known, the optimal actions associated with (P4) can be found using the expressions for the optimal solution to (P1) provided that the original storage price is replaced with the new storage price [cf. (4)]. The reason for this will be explained in detail in the following subsection, after introducing the ensemble counterpart of C4.

B. Limiting the long-term storage rate

Consider now the following constraint [cf. C4]

where the expectation is taken w.r.t. all state variables. By setting , one can view C5 as a relaxed version of C4. That is, while C4 enforces the limit to be respected at every time instant, C5 only requires it to be respected on average. From a computational perspective, dealing with C5 is easier than its instantaneous counterpart, since in the former only one constraint is enforced and, hence, only one Lagrange multiplier, denoted by , must be found. This comes at the price that guaranteeing C5 with does not imply that C4 will always be satisfied. Alternatively, enforcing C5 with , will increase the probability of satisfying C4, since the solution will guarantee that “on average” there exists free space on the cache memory. A more formal discussion on this issue will be provided in the remark closing the subsection.

To describe in detail how accounting for C5 changes the optimal schemes, let (P5) be the problem obtained after augmenting (P1) with C5. Suppose now that to solve (P5) we dualize the single constraint in C5. Rearranging terms, the augmented objective associated with (P5) is given by

Equation (27) demonstrates that after dualization and provided that the multiplier is known, decisions can be optimized separately across files. To be more precise, note that the term in the objective is constant, so that it can be ignored, and define the modified instantaneous cost as

The last equation not only reflects that the dualization indeed facilitates separate per-file optimization, but it also reveals that term can be interpreted as an additional storage cost associated with the long-term caching constraint. More importantly, by defining the modified (augmented) prices for all t and f, the optimization of (28) can be carried out with the schemes presented in the previous sections, provided that is replaced with .

Note however that in order to run the optimal allocation algorithm, the value of needs to be known. Since the dual problem is always convex, one option is to use an iterative dual subgradient method, which computes the satisfaction/violation of the constraint C5 per iteration [36], [37, p.223]. Clearly, this requires knowledge of the state distribution, since the constraint involves an expectation. When such knowledge is not available, or when the computational complexity to carry out the expectations cannot be afforded, stochastic schemes are worth considering. For the particular case of estimating Lagrange multipliers associated with long-term constraints, a simple but powerful alternative is to resort to stochastic dual subgradient schemes [36], [37], which for the problem at hand, estimate the value of the multiplier at every time instant t using the update rule

In the last expression, is a (small) positive constant, the update multiplied by corresponds to the violation of the constraint after removing the expectation, the notation stands for the , and denotes the optimal caching actions obtained with the policies described in Section III provided that is replaced by .

We next introduce another long-term constraint that can be considered to limit the storage rate. This constraint is useful not only because it gives rise to alternative novel caching-fetching schemes, but also because it will allow us to establish connections with well-known algorithms in the area of congestion control and queue management. To start, define the variables and for all f and t. Clearly, if , then content f that was not in the local cache at time , has been stored at time t; and as a result, less storage space is available. On the other hand, if , then content f was removed from the cache at time t, thus freeing up new storage space. With this notation at hand, we can consider the long term constraint

C6:

which basically ensures the long-term stability of the localstorage. That is, the amount of data stored in the local memory is no larger than that taken out from the memory, guaranteeing that in the long term stored data does not grow unbounded.

To deal with C6 we can follow an approach similar to that of C5, under which we first dualize C6 and then use a stochastic dual method to estimate the associated dual variable. With a slight abuse of notation, supposing that the Lagrange multiplier associated with stability is by also denoted , the counterpart of (29) for the constraint C6 is

Note that the update term in the last iteration follows after removing the expectations in C6 and replacing , and with their corresponding definitions. The modifications that the expressions for the optimal policies require to account for this constraint are a bit more intricate. If , the problem structure is similar to that of the previous constraints, and we just need to replace with . However, if , it turns out that: i) deciding does not require modifying the caching price, but ii) deciding requires considering the negative caching price . In other words, while our formulation in Section III only considers incurring a cost when (and assumes that the instantaneous cost is zero for ), to fully account for C6, we would need to modify our original formulation so that costs can be associated with the decision as well. This can be done either by considering a new cost term or, simply by replacing by in (13a)-(13d), which are Bellman’s equations describing the optimal policies.

Remark 3 (Role of the stochastic multipliers). It is well-established that the Lagrange multipliers can be interpreted as the marginal price that the system must pay to (over-)satisfy the constraint they are associated with [37, p.241]. When using stochastic methods for estimating the multipliers, further insights on the role of the multipliers can be obtained [26], [38], [27]. Consider for example the update in (29). The associated constraint C5 establishes that the long-term storage rate cannot exceed . To guarantee so, the stochastic scheme updates the estimated price in a way that, if the constraint for time t is oversatisfied, the price goes down, while if the constraint is violated, the price goes up. Intuitively, if the price estimate is far from its optimal value and the constraint is violated for several consecutive time instants, the price will keep increasing, and eventually will take a value sufficiently high so that storage decisions are penalized/avoided. How quickly the system reacts to this violation can be controlled via the constant . Interestingly, by tuning the values of and , and assuming some regularity properties on the distribution of the state variables, conditions under which deterministic short-term limits as those in C4 are satisfied can be rigorously derived; see, e.g., [27] for a related problem in the context of distributed cloud networks. A similar analysis can be carried out for the update in (31) and its associated constraint C6. Every time the instantaneous version of the constraint is violated because the amount of data stored in the memory exceeds the amount exiting the memory, the corresponding price increases, thus rendering future storage decisions more costly. In fact, if we initialize the multiplier at and set , then the corresponding price is the total amount of information stored at time t in the local memory. In other words, the update in (31) exemplifies how the dynamic prices considered in this paper can be used to account for the actual state of the caching storage. Clearly, additional mappings from the instantaneous storage level to the instantaneous storage price can be considered. The connections between stochastic Lagrange multipliers and storing devices have been thoroughly explored in the context of demand response, queuing management and congestion control. We refer the interested readers to, e.g., [26], [38].

C. Limits on the back-haul transmission rate

The previous two subsections dealt with limited caching storage, and how some of those limitations could be accounted for by modifying the caching price . This section addresses limitations on the back-haul transmission rate between the SB and the cloud as well as their impact on the fetching price .

While our focus has been on optimizing the decisions at the SB, contemporary networks must be designed following a holistic (cross-layer) approach that accounts for the impact of local decisions on the rest of the network. Decomposition techniques (including those presented in this paper) are essential to that end [36]. For the system at hand, suppose that includes all variables at the cloud network, denotes the associated cost, and the feasible set accounts for the constraints that cloud variables must satisfy. Similarly, let , , and denote the corresponding counterparts for the SB optimization analyzed in this paper. Clearly, the fetching actions are included in , while the variable representing back-haul transmission rate (capacity) of the connecting link between the cloud and the SB, is included in . This transmission rate will depend on the resources that the cloud chooses to allocate to that particular link, and will control the communication rate (and hence the cost of fetching requests) between the SB and the cloud. As in the previous section, one could consider two types of capacity constraints

depending on whether the limit is imposed in the short term or in the long term.

With these notational conventions, one could then consider the joint resource allocation problem

where the constraint C7 – either the instantaneous one in C7a or the lon-term version in C7b – couples both optimizations. It is then clear that if one dualizes C7, and the value of the Lagrange multiplier associated with C7 is known, then two separate optimizations can be run: one focusing on the cloud network and the other one on the SB. For this second optimization, consider for simplicity that the average constraint in (32b) is selected and let denote the Lagrange multiplier associated with such a constraint. The optimization corresponding to the SB is then

Clearly, solving this problem is equivalent to solving the original problem in Section III, provided that the original cost is augmented with the primal-dual term associated with the coupling constraint. To address the modified optimization, we will follow steps similar to those in Section IV-B, defining first a stochastic estimate of the Lagrange multiplier as

and then obtaining the optimal caching-fetching decisions running the schemes in Section III after replacing the original fetching cost with the augmented one .

For simplicity, in this section we will limit our discussion to the case where corresponds to the value of a Lagrange multiplier corresponding to a communication constraint. However, from a more general point of view, represents the marginal price that the cloud network has to pay to transmit the information requested by the SB. In that sense, there exists a broad range of options to set the value of , including the congestion level at the cloud network (which is also represented by a Lagrange multiplier), or the rate (power) cost associated with the back-haul link. While a detailed discussion on those options is of interest, it goes beyond the scope of the present work.

D. Modified online solver based on Q-learning

We close this section by providing an online reinforcement-learning algorithm that modifies the one introduced in Section III to account for the multipliers introduced in Section IV. By defining per file cost as

the problem of caching under limited cache capacity and back-haul link reduces to per file optimization as follows

where the updated dual variables and are obtained respectively by iteration (29) and (35). If we plug instead of into the marginalized Q-function in (21), then the solution for (P8) in current iteration k for a given file f can readily be found by solving

Thus, it suffices to form a marginalized Q-function for each file and solve (37), which can be easily accomplished through exhaustive search over 8 possible cache-fetch decisions .

To simplify notation and exposition, we focus on the limited caching capacity constraint, and suppose that the back-haul is capable of serving any requests, thus . Modifications to account also for are straightforward.

The modified Q-learning (MQ-learning) algorithm, tabulated in Algorithm 3, essentially learns to make optimal fetch-cache decisions while accounting for the limited caching capacity constraint in C4 and/or C5. In particular, to provide a computationally efficient solver the stochastic updates corresponding to C5 are used. Subsequently, if C4 needs to be enforced, the obtained solution is projected into the feasible set through projection algorithm . The projection takes the obtained solution , the file sizes, as well as the marginalized Q-functions as input, and generates a feasible solution satisfying C4 as follows: it sorts the files with in ascending Q-function order, and caches the files with the lowest Q-values until the cache capacity is reached. Overall, our modified algorithm performs a “double” learning: i) by using reinforcement schemes it learns the optimal policies that map states to actions, and ii) by using a stochastic dual approach it learns the mechanism that adapt the prices to the saturation and congestion conditions in the cache. Given the operating conditions and the design approach considered in the paper, the proposed algorithm has moderate complexity, and thanks to the reduced input dimensionality, it also converges in a moderate number of iterations.

V. NUMERICAL TESTS

In this section, we numerically assess the performance of the proposed approaches for learning optimal fetch-cache decisions. Two sets of numerical tests are provided. In the first set, summarized in Figs 2-5, the performance of the value iteration-based scheme in Alg. 1 is evaluated, and in the second set, summarized in Figs. 6-7, the performance of the Q-learning solver is investigated. In both sets, the cache and fetch cost parameters are drawn with equal probability from a finite number of values, where the mean is and , respectively. Furthermore, the request variable is modeled as a Bernoulli random variable with mean , whose value indicates the popularity of file f.

In the first set, it is assumed that as well as the distribution of , are known a priori. Simulations are carried out for a content of unit size, and can be readily extended to files of different sizes. To help readability, we drop the superscript f in this section.

Fig. 2 plots the sum average cost versus for different values of and p. The fetching cost is set to for two different values of popularity . As depicted, higher values of generally lead to a higher average cost. In particular, when , caching is considerably cheaper than fetching, thus setting is optimal for most t. As a consequence, the total cost linearly increases with as most requests are met via cached contents rather than fetching. Interestingly, if keeps increasing, the aggregate cost gradually saturates and does not grow anymore. The reason behind this observation is the fact that, for very high values of , fetching becomes the optimal decision for meeting most file requests and, hence, the aggregate cost no longer depends on . While this behavior occurs for the two values of p, we observe that for the smallest one, the saturation is more abrupt

Fig. 2: Average cost versus for different values of .

Fig. 3: Average cost versus p for different values of .

and takes place at a lower . The intuition in this case is that for lower popularity values, the file is requested less frequently, thus the caching cost aggregated over a (long) period of time often exceeds the “reward” obtained when (infrequent) requests are served by the local cache. As a consequence, fetching in the infrequent case of incurs less cost than the caching cost aggregated over time.

To corroborate these findings, Fig. 3 depicts the sum average cost versus p for different values of and . The results show that for large values of , fetching is the optimal action, resulting in a linear increase in the total cost as p increases. In contrast, for small values of , caching is chosen more frequently, resulting in a sub-linear cost growth.

To investigate the caching-versus-fetching trade-off for a broader range of and , let us define the caching ratio as the aggregated number of positive caching decisions (those for which ) divided by the total number of decisions. Fig. 4 plots this ratio for different values of and fixed p = 0.5. As the plot demonstrates, when is small and is large, files are cached almost all the time, with the caching

Fig. 4: Caching ratio vs. and for p = 0.5 and s = r = 1.

Fig. 5: Performance of DP versus myopic caching for .

Fig. 6: Average cost versus for different values of . Solid line is for value iteration while dashed lines are for Q-learning based solver.

Fig. 7: Averaged immediate cost over 1000 realizations in a non-stationary setting, and a sample from popularities.

ratio decreasing (non-symmetrically) as increases and decreases.

Finally, Fig. 5 compares the performance of the proposed DP-based strategy with that of a myopic one. The myopic policy sets if and the content is locally available (either because or because ), and sets 0 otherwise. The results indicate that the proposed strategy outperforms the myopic one for all values of and .

In the second set of tests, the performance of the online Q-learning solvers is investigated. As explained in Section III, under the assumption that the underlying distributions are stationary, the performance of the Q-learning solver should converge to the optimal one found through the value iteration algorithm. Corroborating this statement, Fig. 6 plots the sum average cost versus of both the marginalized value iteration and the Q-learning solver, with and . The solid lines are obtained when assuming a priori knowledge of the distributions and then running the marginalized value iteration algorithm; the results and analysis are similar to the ones reported for Fig. 2. The dashed curves however, are found by assuming unknown distributions and running the Q-learning solver. Sum average cost is reported after first 1000 iterations. As the plot suggests, despite the lack of a priori knowledge on the distributions, the Q-learning solver is able to find the optimal decision making rule. As a result, it yields the same sum average cost as that of value-iteration under known distributions.

The last experiment investigates the impact of the instantaneous cache capacity constraint in C4 as well as non-stationary distributions for popularities and costs. To this end, 1,000 different realizations (trajectories) of the random state processes are drawn, each of length T = 600. For every realization, the cost [cf. (6)] at each and every time instant is found, and the cost trajectory is averaged across the 1,000 realizations. Specifically, let denote the ith realization cost at time t, and define the averaged cost trajectory as . Fig. 7 reports the average trajectory of in a setup where the total number of files is set to F = 500, the file sizes are drawn uniformly at random from the interval [1, 100], and the total cache capacity is set to 40% of the aggregate file size. Adopted parameters for the MQ-learning solver are set to and . Three blocks of iterations are shown in the figure, where in each block a specific distribution of popularities and costs are considered. For instance, the dashed line shows the popularity of a specific file in one of the realizations, where in the fist block p = 0.23, in the second block p = 0.37, and in the third one p = 0.01. The cost parameters have means , , and in the consecutive blocks, respectively. As this plot suggests, the MQ-learning algorithm incurs large costs during the first few iterations. Then, it gradually adapts to the file popularities and cost distributions, and learns how to make optimal fetch-cache decisions, decreasing progressively the cost in each of the blocks. To better understand the behavior of the algorithm and assess its performance, we compare it with that of a myopic policy and the stationary policy whose costs are represented using a green and black line, respectively. During the first iterations, when the MQ-learning algorithm has not adapted to the distribution of pertinent parameters, the myopic policy performs better. However, as the learning proceeds, the MQ-learning starts to make more precise decisions and, remarkably, in a couple of hundreds of iterations it is able to perform very close to the optimal policy.

VI. CONCLUSIONS

A generic setup where a caching unit makes sequential fetch-cache decisions based on dynamic prices and user requests was investigated. Critical constraints were identified, the aggregated cost across files and time instants was formed, and the optimal adaptive caching was then formulated as a stochastic optimization problem. Due to the effects of the current cache decisions on future costs, the problem was cast as a dynamic program. To address the inherent functional estimation problem that arises in this type of programs, while leveraging the underlying problem structure, several computationally efficient algorithms were developed, including off-line (batch) approaches, as well as online (stochastic) approaches based on Q-learning. The last part of the paper was devoted to dynamic pricing mechanisms that allowed handling constraints both in the storage capacity of the cache memory, as well as on the back-haul transmission link connecting the caching unit with the cloud.

REFERENCES

[1] A. Sadeghi, F. Sheikholeslami, A. G. Matrques, and G. B. Giannakis, “Reinforcement learning for 5G caching with dynamic cost,” in Proc. of Intl. Conf. on Acoustics, Speech, and Signal Processing, April 2018, pp. 6653–6657.

[2] G. S. Paschos, G. Iosifidis, M. Tao, D. Towsley, and G. Caire, “The role of caching in future communication systems and networks,” IEEE J. Sel. Areas Commun., vol. 36, no. 6, pp. 1111–1125, June 2018.

[3] G. Paschos, E. Bastug, I. Land, G. Caire, and M. Debbah, “Wireless caching: technical misconceptions and business barriers,” IEEE Commun. Mag., vol. 54, no. 8, pp. 16–22, Aug. 2016.

[4] X. Wang, M. Chen, T. Taleb, A. Ksentini, and V. C. M. Leung, “Cache in the air: exploiting content caching and delivery techniques for 5G systems,” IEEE Commun. Mag., vol. 52, no. 2, pp. 131–139, Feb. 2014.

[5] P. Blasco and D. G¨und¨uz, “Learning-based optimization of cache content in a small cell base station,” in Proc. Intl. Conf. Commun., Sydney, Australia, June 2014, pp. 1897–1903.

[6] A. Sengupta, S. Amuru, R. Tandon, R. M. Buehrer, and T. C. Clancy, “Learning distributed caching strategies in small cell networks,” in Proc. Intl. Symp. Wireless Commun. Syst., Barcelona, Spain, Aug. 2014, pp. 917–921.

[7] S. M¨uller, O. Atan, M. van der Schaar, and A. Klein, “Contextaware proactive content caching with service differentiation in wireless networks,” IEEE Trans. Wireless Commun., vol. 16, no. 2, pp. 1024– 1036, Feb. 2017.

[8] S. Li, J. Xu, M. van der Schaar, and W. Li, “Trend-aware video caching through online learning,” IEEE Trans. Multimedia, vol. 18, no. 12, pp. 2503–2516, Dec. 2016.

[9] E. Leonardi and G. Neglia, “Implicit coordination of caches in small cell networks under unknown popularity profiles,” IEEE J. Sel. Areas Commun., vol. 36, no. 6, pp. 1276–1285, June 2018.

[10] J. Li, S. Shakkottai, J. C. S. Lui, and V. Subramanian, “Accurate learning or fast mixing? dynamic adaptability of caching algorithms,” IEEE J. Sel. Areas Commun., vol. 36, no. 6, pp. 1314–1330, June 2018.

[11] B. N. Bharath, K. G. Nagananda, and H. V. Poor, “A learning-based approach to caching in heterogenous small cell networks,” IEEE Trans. Commun., vol. 64, no. 4, pp. 1674–1686, April 2016.

[12] G. Hasslinger, K. Ntougias, F. Hasslinger, and O. Hohlfeld, “Perfor- mance evaluation for new web caching strategies combining LRU with score based object selection,” Computer Networks, vol. 125, pp. 172– 186, 2017.

[13] S. Traverso, A. Mohamed, et. al., “Temporal locality in today’s content caching: Why it matters and how to model it,” ACM SIGCOMM Comput. Commun. Rev., vol. 43, no. 5, pp. 5–12, Nov. 2013.

[14] M. Leconte, G. Paschos, L. Gkatzikis, M. Draief, S. Vassilaras, and S. Chouvardas, “Placing dynamic content in caches with small population,” in Proc. Intl. Conf. Comput. Commun., San Francisco, USA, April 2016, pp. 1–9.

[15] A. Sadeghi, F. Sheikholeslami, and G. B. Giannakis, “Optimal and scalable caching for 5G using reinforcement learning of space-time popularities,” IEEE J. Sel. Topics Signal Process., vol. 12, no. 1, pp. 180–190, Feb. 2018.

[16] A. Sadeghi, F. Sheikholeslami, and G. B. Giannakis, “Optimal dynamic proactive caching via reinforcement learning,” in Proc. of IEEE-SP Workshop on Signal Proc. Advances in Wireless Commun., June 2018, pp. 1–5.

[17] S. O. Somuyiwa, A. Gy¨orgy, and D. G¨und¨uz, “A reinforcement-learning approach to proactive caching in wireless networks,” IEEE J. Sel. Areas Commun., vol. 36, no. 6, pp. 1331–1344, June 2018.

[18] B. N. Bharath, K. G. Nagananda, D. G¨und¨uz, and H. V. Poor, “Caching with time-varying popularity profiles: A learning-theoretic perspective,” IEEE Trans. Commun., vol. 66, no. 9, pp. 3837–3847, Sep. 2018.

[19] R. Pedarsani, M. A. Maddah-Ali, and U. Niesen, “Online coded caching,” IEEE/ACM Trans. Netw., vol. 24, no. 2, pp. 836–845, Apr. 2016.

[20] S. M. Azimi, O. Simeone, A. Sengupta, and R. Tandon, “Online edge caching and wireless delivery in fog-aided networks with dynamic content popularity,” IEEE J. Sel. Areas Commun., vol. 36, no. 6, pp. 1189–1202, June 2018.

[21] L. Pu, L. Jiao, X. Chen, L. Wang, Q. Xie, and J. Xu, “Online resource allocation, content placement and request routing for cost-efficient edge caching in cloud radio access networks,” IEEE J. Sel. Areas Commun., vol. 36, no. 8, pp. 1751–1767, Aug 2018.

[22] Y. Hu, Y. Jiang, M. Bennis, and F. Zheng, “Distributed edge caching in ultra-dense fog radio access networks: A mean field approach,” arXiv preprint arXiv:1806.09076, 2018.

[23] J. Kwak, G. Paschos, and G. Iosifidis, “Dynamic cache rental and content caching in elastic wireless CDNs,” in Proc. Intl. Symp. Modeling Opt. Mobile, Ad Hoc, Wireless Netw., Shanghai, China, May 2018, pp. 1–8.

[24] A. Gharaibeh, A. Khreishah, B. Ji, and M. Ayyash, “A provably efficient online collaborative caching algorithm for multicell-coordinated systems,” IEEE Trans. Mobile Comput., vol. 15, no. 8, pp. 1863–1876, Aug 2016.

[25] L. M. Lopez-Ramos, A. G. Marques, and J. Ramos, “Jointly optimal sensing and resource allocation for multiuser interweave cognitive radios,” IEEE Trans. Wireless Commun., vol. 13, no. 11, pp. 5954– 5967, Nov. 2014.

[26] L. Georgiadis, M. J. Neely, and L. Tassiulas, “Resource allocation and cross-layer control in wireless networks,” Found. Trends Netw., vol. 1, no. 1, pp. 1–144, 2006.

[27] T. Chen, A. G. Marques, and G. B. Giannakis, “DGLB: Distributed stochastic geographical load balancing over cloud networks,” IEEE Trans. Parallel Distrib. Syst., vol. 28, no. 7, pp. 1866–1880, July 2017.

[28] G. Wang, V. Kekatos, A. J. Conejo, and G. B. Giannakis, “Ergodic energy management leveraging resource variability in distribution grids,” IEEE Trans. Power Syst., vol. 31, no. 6, pp. 4765–4775, Nov. 2016.

[29] R. S. Sutton and A. G. Barto, Reinforcement learning: An introduction, Cambridge, MA, USA: MIT Press, 2016.

[30] L. Breslau, P. Cao, L. Fan, G. Phillips, and S. Shenker, “Web caching and Zipf-like distributions: Evidence and implications,” in Proc. Intl. Conf. Comput. Commun., New York, USA, March 1999, pp. 126–134.

[31] J. N. Tsitsiklis, “Asynchronous stochastic approximation and Qlearning,” Mach. learn., vol. 16, no. 3, pp. 185–202, Sept. 1994.

[32] C. Watkins and P. Dayan, “Q-learning,” Mach. learn., vol. 8, no. 3-4, pp. 279–292, May 1992.

[33] C. Watkins, Learning from delayed rewards, Ph.D. thesis, King’s College, Cambridge, 1989.

[34] V. S. Borkar and S. P. Meyn, “The ODE method for convergence of stochastic approximation and reinforcement learning,” SIAM J. Control Optim., vol. 38, no. 2, pp. 447–469, 2000.

[35] S. J. Russell and P. Norvig, Artificial intelligence: a modern approach, Upper Saddle River, NJ, USA,: Prentice-Hall, 2010.

[36] D. P. Palomar and M. Chiang, “A tutorial on decomposition methods for network utility maximization,” IEEE J. Sel. Areas Commun., vol. 24, no. 8, pp. 1439–1451, Aug. 2006.

[37] S. Boyd and L. Vandenberghe, Convex optimization, Cambridge, U.K.: Cambridge Univ. Press, 2004.

[38] A. G. Marques, L. M. Lopez-Ramos, G. B. Giannakis, J. Ramos, and A. J. Caama˜no, “Optimal cross-layer resource allocation in cellular networks using channel- and queue-state information,” IEEE Trans. Veh. Technol., vol. 61, no. 6, pp. 2789–2807, July 2012.

designed for accessibility and to further open science