<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Online Page Migration with ML Advice</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2022</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10338739</idno>
					<idno type="doi"></idno>
					<title level='j'>25th International Conference on Artificial Intelligence and Statistics (AISTATS 2022)</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>P. Indyk</author><author>F. Mallmann-Trenn</author><author>S. Mitrovic</author><author>R. Rubinfeld</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We consider online algorithms for the page migration problem that use predictions, potentially imperfect, to improve their performance. The best known online algorithms for this problem, due to Westbrook’94 and Bienkowski et al’17, have competitive ratios strictly bounded away from 1. In contrast, we show that if the algorithm is given a prediction of the input sequence, then it can achieve a competitive ratio that tends to 1 as the prediction error rate tends to 0. Specifically, the competitive ratio is equal to 1+O(q), where q is the prediction error rate. We also design a “fallback option” that ensures that the competitive ratio of the algorithm for any input sequence is at most O(1/q). Our result adds to the recent body of work that uses machine learning to improve the performance of “classic” algorithms.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Recently, there has been a lot of interest in using machine learning to design improved algorithms for various computational problems. This includes work on data structures <ref type="bibr">Kraska et al. (2018)</ref>; <ref type="bibr">Mitzenmacher (2018)</ref>, online algorithms <ref type="bibr">Lykouris and Vassilvitskii (2018)</ref>; <ref type="bibr">Purohit et al. (2018)</ref>; <ref type="bibr">Gollapudi and Panigrahi (2019a)</ref>; <ref type="bibr">Rohatgi (2020)</ref>, combinatorial optimization <ref type="bibr">Khalil et al. (2017)</ref>; <ref type="bibr">Balcan et al. (2018)</ref>, similarity search <ref type="bibr">Wang et al. (2016)</ref>, compressive sensing <ref type="bibr">Mousavi et al. (2015)</ref>; <ref type="bibr">Bora et al. (2017)</ref> and streaming algorithms <ref type="bibr">Hsu et al. (2019)</ref>. This body of work is motivated by the fact that modern machine learning methods are capable of discovering subtle structure in collections of input data, which can be utilized to improve the performance of algorithms that operate on similar data.</p><p>In this paper we focus on learning-augmented online algorithms. An on-line algorithm makes non-revocable decisions based only on the part of the input seen so far, without any knowledge of the future. It is thus natural to consider a relaxation of the model where the algorithm has access to (imperfect) predictors of the future input that could be used to improve the algorithm performance. Over the last couple of years this line of research has attracted growing attention in the machine learning and algorithms literature, for classical on-line problems such as caching <ref type="bibr">Lykouris and Vassilvitskii (2018)</ref>; <ref type="bibr">Rohatgi (2020)</ref>, ski-rental and scheduling <ref type="bibr">Purohit et al. (2018)</ref>; <ref type="bibr">Gollapudi and Panigrahi (2019b)</ref>; <ref type="bibr">Lattanzi et al. (2020)</ref> and graph matching <ref type="bibr">Kumar et al. (2019)</ref>. Interestingly, most of the aforementioned works conclude that the "optimistic" strategy of simply following the predictions, i.e., executing the optimal solution computed off-line for the predicted input, can lead to a highly sub-optimal performance even if the prediction error is small 1 . For instance, for the caching problem, even a single misprediction can lead to an unbounded competitive ratio <ref type="bibr">Lykouris and Vassilvitskii (2018)</ref>.</p><p>In this paper we show that, perhaps surprisingly, the aforementioned "optimistic" strategy leads to nearoptimal performance for some well-studied on-line problems. We focus on the problem of page migration <ref type="bibr">Black and Sleator (1989)</ref> (a.k.a. file migration <ref type="bibr">Bienkowski (2012)</ref> or 1-server with excursions <ref type="bibr">Manasse et al. (1990)</ref>). Here, the algorithm is given a sequence s of points (called requests) s 1 , s 2 , . . . from a metric space (X, d), in an online fashion. The state of the algorithm is also a point from (X, d). Given the next request s i , the algorithm moves to its next state a i (at the cost of D &#8226; d(a i-1 , a i ), where D is a parameter), and then "satisfies" the request s i (at the cost of d(a i , s i )). The objective is to satisfy all requests while 1 To the best of our knowledge the only problem for which this strategy is known to result in an optimal algorithm is the online bipartite matching, see Section 1.2 for more details minimizing the total cost. The problem has been a focus on a large body of research, see e.g., <ref type="bibr">Awerbuch et al. (1993)</ref>; <ref type="bibr">Westbrook (1994)</ref>; <ref type="bibr">Chrobak et al. (1997)</ref>; <ref type="bibr">Bartal et al. (1997)</ref>; <ref type="bibr">Khorramian and Matsubayashi (2016)</ref>; <ref type="bibr">Bienkowski et al. (2017)</ref>. The best known algorithms for this problem have competitive ratios of 4 (a deterministic algorithm due to <ref type="bibr">Bienkowski et al. (2017)</ref>), 3 (a randomized algorithm against adaptive adversaries due to <ref type="bibr">Westbrook (1994)</ref>) and 2.618 . . . (a randomized algorithm against oblivious adversaries due to <ref type="bibr">Westbrook (1994)</ref>). The original paper <ref type="bibr">Black and Sleator (1989)</ref> also showed that the competitive ratio of any deterministic algorithm must be at least 3, which was recently improved to 3 + for some &gt; 0 by <ref type="bibr">Matsubayashi (2015)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Our results</head><p>Suppose that we are given a predicted request sequence &#349; that, in each interval of length D, differs from the actual sequence s on at most a fraction q of positions, where , q &#8712; (0, 1) are the parameters (note that the lower the values of and q are, the stronger our assumption is). Under this assumption we show that the optimal off-line solution for &#349; is a (1 + )(1 + O(q))competitive solution for s as long as the parameter q &gt; 0 is a small enough constant. Thus, the competitive ratio of this prediction-based algorithm improves over the state of the art even if the number of errors is linear in the sequence length, and tends to 1 when the error rate tends to 0.<ref type="foot">foot_0</ref> Furthermore, to make the algorithm robust, we also design a "fallback option", which is triggered if the input sequence violates the aforementioned assumption (i.e., if the fraction of errors in the suffix of the current input sequence exceeds q). The fallback option ensures that the competitive ratio of the algorithm for any input sequence is at most O(1/q). Thus, our final algorithm produces a nearoptimal solution if the prediction error is small, while guaranteeing a constant competitive ratio otherwise.</p><p>For the case when the underlying metric is uniform, i.e., all distances between distinct points are equal to 1, we further improve the competitive ratio to 1+ O(q) under the assumption that each interval of length D differs from the actual sequence in at most qD positions. That is, the parameter is not needed in this case. Moreover, any algorithm has a competitive ratio of at least 1 + &#8486;(q). It is natural to wonder whether the same guarantees hold even when the predicted sequence differs from the actual sequence on at most a fraction of q positions distributed arbitrarily over &#349;, as opposed to over chunks of length &#949;D. We construct a simple example that shows that such a relaxed assumption results in the same lower bound as for the classical problem.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2">Related Work</head><p>Multiple variations of the page migration problem have been studied over the years. For example, if the page can be copied as well as moved, the problem has been studied under the name of file allocation, see e.g., <ref type="bibr">Bartal et al. (1995)</ref>; <ref type="bibr">Awerbuch et al. (2003)</ref>; <ref type="bibr">Lund et al. (1998)</ref>. Other formulations add constraints on nodes capacities, allow dynamically changing networks etc. See the survey Bienkowski (2012) for an overview.</p><p>There is a large body of work concerning on-line algorithms working under stochastic or probabilistic assumptions about the input Unc <ref type="bibr">(2016)</ref>. In contrast, in this paper we do not make such assumptions, and allow worst case prediction errors (similarly to <ref type="bibr">Lykouris and Vassilvitskii (2018)</ref>; <ref type="bibr">Kumar et al. (2019)</ref>; <ref type="bibr">Purohit et al. (2018)</ref>). Among these works, our prediction error model (bounding the fraction of mispredicted requests) is most similar to the "agnostic" model defined in <ref type="bibr">Kumar et al. (2019)</ref>. The latter paper considers online matching in bipartite graphs, where a prediction of the graph is given in advance, but the final input graph can deviate from the prediction on d vertices. Since each vertex impacts at most one matching edge, it directly follows that d errors reduce the matching size by at most d. In contrast, in our case a single error can affect the cost of the optimum solution by an arbitrary amount. Thus, our analysis requires a more detailed understanding of the properties of the optimal solution.</p><p>Multiple papers studied on-line algorithms that are given a small number of bits of advice <ref type="bibr">Boyar et al. (2017)</ref> and show that, in many scenarios, this can improve their competitive ratios. Those algorithms, however, typically assume that the advice is error-free.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Preliminaries</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Page Migration</head><p>In the classical version, the algorithm is given a sequence s of points (called requests) s = (s i ) i&#8712;[n] from a metric space (X, d), in an online fashion. The state of the algorithm (i.e., the page), is also a point from (X, d). Given the next request s i , the algorithm moves to its next state a i (at the cost of D &#8226; d(a i-1 , a i ), where D &gt; 1 is a parameter), and then "satisfies" the request s i (at the cost of d(a i , s i )). The objective is to satisfy all requests while minimizing the total cost. We can consider a version of this problem where the algorithm is given, prior to the arrival of the requests, a predicted sequence &#349; = (&#349; i ) i&#8712; <ref type="bibr">[n]</ref> . The (final) sequence s is generated adversarially from &#349; and an arbitrary adversarial sequence s = (s * i ) i&#8712; <ref type="bibr">[n]</ref> . That is either s i = &#349;i or s i = s * i . The initial input to the (online) algorithm is &#349;. In addition, at every step i, the algorithm receives the request s i for which it outputs in the same step the location from where it serves the request. If we do not make any assumptions on how well s is predicted by &#349;, then the problem is no easier than the classical online version. On the other hand, if s = &#349;, then one obtains an optimal online algorithm, by simply computing the optimal offline algorithm. The interesting regime lies in between these two cases. We will make the following assumption throughout the paper, which roughly speaking demands that a 1 -q fraction of the input is correctly predicted and that the q fraction of errors is somewhat spread out. Definition 1 (Number of mismatches m(&#8226;)). Let I be an interval of indices. We define m(I) def = t&#8712;I 1 st =&#349;t to be the number of mismatches between s and &#349; within the interval I. Assumption 1. Consider an interval I of s of length &#949;D. It holds that for any I we have m(I) &#8804; q&#949;D. Remark 1. Relaxing Assumption 1 by allowing the adversary to change an arbitrary q fraction of the input results in the same lower bound as for the classical problem. To see this, consider an arbitrary instance on qn elements that gives a lower bound of c in the classical problem. Call this sequence of elements adversarial. Let &#349; consists of n elements being equal to the starting point. That is, &#349; is simply the starting position replicated n times. Let s be equal to the sequence &#349; whose suffix of length qn is replaced by the adversarial sequence. Now, on s defined in this way no algorithm can be better than c-competitive. Hence, in general this relaxation of Assumption 1 gives no advantage.</p><p>Our main results hold for general metric space, where for all p, p , p &#8712; X all of the following hold: d(p, p) = 0, d(p, p ) &gt; 0 for p = p , d(p, p ) = d(p , p), and d(p, p ) &#8804; d(p, p ) + d(p , p ). We obtain better results for uniform metric space, where, d(p, p ) = 1 for p = p .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Notation</head><p>Given a sequence s, we use s i to denote the i-th element of s. For integers i and j, such that 1 &#8804; i &#8804; j, we use s <ref type="bibr">[i,j]</ref> to denote the subsequence of s consisting of the elements s i , . . . , s j .</p><p>Let p 0 denote the start position for all algorithms, i.e., the position of the page at time 0.</p><p>Given an algorithm B that pays cost C for serving n requests, we denote by C t1,t2 the cost paid by B during the interval [t 1 , t 2 ]. We sometimes abuse notation and write C t as a shorthand for C 0,t . In particular, C denotes C 0,n as well as C n . This notation is the most often used in the context of our algorithm ALG and the optimal solution OPT, whose total serving costs are A and O, respectively.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Proof Overview</head><p>We now present our main algorithm and provide intuition about its correctness.</p><p>Our two main contributions are: algorithm ALG that is (1 + O(q))-competitive provided Assumption 1; and, a black-box reduction from ALG to a O(1/q)competitive algorithm ALG robust when Assumption 1 does not hold. In Section 3.1 we present an overview of ALG, while an overview of ALG robust is given in Section 3.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">ALG under assumption Assumption 1</head><p>Algorithm ALG (given as Algorithm 1) simply computes the optimal offline solution based on &#349; and moves pages accordingly.</p><p>Algorithm 1 ALG(s i , &#349;) Input:</p><p>&#8226; Request s i</p><p>&#8226; A prediction &#349; (s and &#349; are defined in Section 2) 1: Let a i be the position of the page in the optimal offline algorithm at the i-th request with respect to &#349;. 2: Move the page to a i and serve the request s i .</p><p>The main challenge in proving that ALG still performs well in the online setting lies in leveraging the optimality of ALG with respect to the offline sequence. The reason for this is that, due to s and &#349; not being identical, OPT and ALG may be on different page locations throughout all the requests. In addition to that, we have no control over which q fraction of any interval of length D is changed nor to what it is changed. In particular, if s i = &#349;i , then s i and &#349;i could be very far from each other. To circumvent this, we use the following way to argue about the offline optimality, that is, about the optimality computed with respect to &#349;.</p><p>We think of ALG (OPT, respectively) as a sequence of page locations that are defined with respect to &#349; (s, respectively). These page locations do not change even if, for instance, the i-th online request to ALG deviates from &#349;i . Let A t (O t , respectively) be the cost of ALG (OPT, respectively) serving t requests given by s <ref type="bibr">[1,t]</ref> . Similarly, let &#194;t ( &#212;t , respectively) be the cost of ALG (OPT, respectively) for serving the oracle subsequence &#349;[1,t] . In particular, A n is the cost of ALG (optimal on &#349;) on the final sequence s, whereas &#212;n is the cost of the optimal algorithm for s on the predicted sequence &#349;. It is convenient to think of &#212;n as the 'evil twin' of A n .</p><p>We have, due to optimality of ALG on the offline sequence,</p><p>(1)</p><p>The intuition behind the right-hand side of inequality above is best explained pictorially, which we do in Fig. <ref type="figure">1</ref>. Here ALG is at a and OPT is at o. In the depicted example the actual request is s while the predicted one is &#349;. This causes A n -&#194;n to increase, however, at the same time, &#212;n -O n decreases by almost the same amount. <ref type="foot">3</ref> In fact, one can show that for such a request the right hand side of Eq. ( <ref type="formula">1</ref>) will increase by no more than 2d(a, o). For requests that are predicted correctly, i.e., s = &#349;, the costs of ALG and OPT do not change. It remains to bound d(a t , o t ), which we do next. By triangle inequality, it holds that</p><p>be the total sum of moving costs for both OPT and ALG for the requests in the interval (t i-1 , t i ]. As a reminder (see Definition 1), for a given interval I, m(I) is the number of mismatches between s and &#349; within I. From Eq. (3), we derive</p><p>We would like the right hand side of Eq. ( <ref type="formula">5</ref>) to be small, implying that A n -O n is small as well. To understand the nature of the right hand side of Eq. ( <ref type="formula">5</ref>) and what is required for it to be small, assume for a moment that m((t i-1 , t i ]) = &#945;(t i -t i-1 ). Then, the rest of the summation telescopes to A n -O n , and o a s &#349; Eq. ( <ref type="formula">5</ref>) reduces to</p><p>is sufficiently small, e.g., &#945; &#8804; 2q, then we are able to upper-bound Eq. ( <ref type="formula">5</ref>) by 4q(A n + O n ) and derive</p><p>which gives the desired competitive factor.</p><p>So, to utilize Eq. ( <ref type="formula">5</ref>), in our proof we will focus on showing that m((t i-1 , t i ]) is sufficiently smaller than t i -t i-1 . However, this can be challenging as OPT is allowed to move often, potentially on every request which results in t i -t i-1 being very small. But, if t i -t i-1 is too small, then Assumption 1 gives no information about m((t i-1 , t i ]). However, if intervals t i -t i-1 are large enough, e.g., at least &#946;D for some positive constant &#946;, then from Assumption 1 we would be able to conclude that &#945; = O(q). Since in principle OPT can move in every step, we design 'lazy' versions of OPT and ALG that only move O(1) times in any interval of length D. This will enable us to argue that t i -t i-1 is not too small. It turns out that the respective competitive factors of the lazy versions with respect to the original versions is very close, allowing us prove</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">ALG robust , a robust version of ALG</head><p>We now describe ALG robust . This algorithm follows a "lazy" variant of ALG as long as Assumption 1 holds, and otherwise switches to ALG online . Instead of using ALG directly, we use a 'lazy' version of ALG that works as follows: Follow the optimal offline solution given by ALG with a delay of 6qD steps. Let ALG lazy be the corresponding algorithm. We point out that performing some delay with respect to ALG is crucial here. To see that, consider the following example in the case of uniform metric spaces: s = {0} n and &#349; = {1} n , and let the starting location be 0. According to ALG, the page should be moved from 0 to 1 in the very beginning, incurring the cost of D. On the other hand, OPT never moves from 0. If ALG robust would follow ALG until it realizes that the fraction of errors is too high, it would already pay the cost of at least D, leading to an unbounded competitive ratio. However, if ALG robust delays following ALG, then it gets some "slack" in verifying whether the predicted sequence properly predicts requests or not. As a result, when Assumption 1 holds, this delay increases the overall serving cost by a factor O(1 + O(q)), but in turn achieves a bounded competitive ratio when this assumption does not hold.</p><p>While serving requests, ALG robust also maintains the execution of ALG online , i.e., ALG robust maintains where ALG online would be at a given point in time, in case a fallback is needed. Now ALG robust simply executes ALG lazy unless we find a violation of Assumption 1 is detected. Once such a violation is detected, the algorithm switches to ALG online by moving its location to ALG online 's current location. From there on ALG online is executed.</p><p>We now present the intuition behind the proof for the competitive factor of the algorithm.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.1">Case when Assumption 1 holds.</head><p>In this case ALG robust is ALG lazy , and the analysis boils down to proving competitive ratio of ALG lazy . We show that ALG lazy is (1 + O(q))-competitive to ALG, which is, as we argued in the previous section, 1 + O(q) competitive to OPT. To see this, we employ the following charging argument: whenever ALG moves from a to a it pays D &#8226; d(a, a ). The lazy algorithm eventually pays the same moving cost of less.</p><p>However, in addition, the serving cost of ALG lazy for each of the 6qD requests is potentially increased, as ALG lazy is not at the same location as ALG. Nevertheless, by triangle inequality, the cost due to the movement from a to a of ALG reflect to an increase in the serving cost of ALG lazy by at most d(a, a ). In total over all the 6qD requests and per each move of ALG from a to a , ALG lazy pays at most 6qDd(a, a ) extra cost compared to ALG. Considering all migrations, this gives a 1 + O(q) competitive factor.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.2">Case when Assumption 1 is violated.</head><p>The case where Assumption 1 is violated (say at time t ) is considerably more involved. We then have</p><p>and we seek to upper-bound each of these terms by O(OPT/q). While the upper-bound holds directly for ALG online (t + 1, n), showing the upper-bound for other terms is more challenging.</p><p>The key insight is that, due to the optimality of ALG,</p><p>which can be proven as follows. If ALG migrates its page to a location that is far from the starting location p 0 , then there have to be, even when taking into account noise, at least 4qD page requests that are far from p 0 . OPT also has to serve these requests (either remotely or by moving), and hence has to pay a cost of at least qD &#8226; d(a, p 0 ). Equipped with this idea, we can now bound D &#8226; d(a, a ) in terms of OPT(t )/q. To bound ALG lazy (0, t ) we need one more idea. Namely, we compare ALG lazy (0, t ) to the optimal solution that has a constraint to be at the same position as ALG lazy at time t . A formal analysis is given in Appendix B.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">The Analysis of ALG</head><p>Now we analyze ALG (Algorithm 1). As discussed in Section 3.1, our main objective is to establish Eq. ( <ref type="formula">5</ref>), which we do in Section 4.1. That upper-bound will be directly used to obtain our result for uniform metric spaces, as we present in Appendix A.1. To construct our algorithm for general-metric spaces, in Appendix A.2 we build on ALG by first designing its "lazy" variant. As the final result, we show the following. Recall that q is the fraction of symbols that the adversary is allowed to change in any sequence of length &#949;D of the predicted sequence. Theorem 2. If Assumption 1 holds with respect to parameter &#949;, then we obtain the following results:</p><p>(A) There exists a (1 + &#949;) &#8226; (1 + O(q))-competitive algorithm for the online page migration problem.</p><p>(B) There exists a (1 + O(q))-competitive algorithm for the online page migration problem in uniform metric spaces.</p><p>We defer the proof of Theorem 2 to Appendix A. Note that in the prediction-free case <ref type="bibr">Matsubayashi (2015)</ref> show that the competitive ratio of any deterministic algorithm must be at least 3 + for some &gt; 0. In the case of having access to predictions, Theorem 2 is asymptotically optimal with respect to q. Namely, any algorithm is at least 1 + &#8486;(q) competitive; even in the uniform metric case. To see this consider the following binary example where the algorithm starts at position 0. The advice is &#349; = 111</p><p>In the first case OPT simply stays at 0 since moving costs D; in the second case, OPT goes immediately to 1. Note that ALG can only distinguish between the sequences after (1 -q)D steps at which point it is doomed to have an additional cost of qD with probability at least 1/2 depending on the sequence s.</p><p>4.1 Establishing Eq. ( <ref type="formula">5</ref>)</p><p>In our proofs we will use the following corollary of Assumption 1.</p><p>Corollary 3. If Assumption 1 holds, then for any interval I of length &gt; &#949;D it holds m(I) &#8804; 2q .</p><p>Proof. This statement follows from the fact that each such I can be subdivided into k &#8805; 1 intervals of length exactly &#949;D and at most one interval I of length less than &#949;D. On one hand, the total number of mismatches for these intervals of length exactly &#949;D is upper-bounded by qk&#949;D &#8804; q . On the other hand, since I is a subinterval of an interval of length &#949;D, it holds m(I ) &#8804; q&#949;D &lt; q . The claim now follows.</p><p>Most of our analysis in this section proceeds by reasoning about intervals where neither ALG nor OPT moves. Let t 1 , t 2 . . . be the time steps at which either OPT or ALG move. The final product of this section will be an upper-bound on A n -O n as given by Eq. ( <ref type="formula">5</ref>) 4 , i.e.,</p><p>.</p><p>We begin by rewriting and upper-bounding A t -O t as follows</p><p>where we used that &#194;t &#8804; &#212;t as &#194;t is the optimum for &#349;. Consider a fixed interval I = (t i-1 , t i ]. Then, by triangle inequality, it holds</p><p>Let c</p><p>(ti-1,ti] move be the sum of moving costs for OPT and 4 As a reminder, At (Ot, respectively) is the cost of ALG (OPT, respectively) at time for the sequence s</p><p>where the inequality comes from Eq. ( <ref type="formula">8</ref>) applied to every time step in (t i-1 , t i ] and the fact that ALG or OPT must have moved inducing a cost of at least c</p><p>move . The following notation is used to represent the difference between serving s i and &#349;i by ALG</p><p>Note that this holds even when ALG moves since the moving costs for the oracle sequence and on the final sequence are the same and therefore cancel each other out. Similarly to</p><p>Consider now any t &#8712; [1, n]. By triangle inequality we have</p><p>Recall that, for a given interval I the function m(I) denotes the number of mismatches between s and &#349; within I (see Definition 1). Now, as for t such that</p><p>This establishes the desired upper-bound on A n -O n . As discussed in Section 3.1, this upper-bound is used to derive our non-robust results for uniform (Appendix A.1) and general (Appendix A.2) metric spaces. The main task in those two sections will be to show that m((t i-1 , t i ]) is sufficiently smaller than t i -t i-1 .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Experiments</head><p>We evaluate our approach on two synthetic data sets, and compare it to the state of the art algorithm for page migration due to <ref type="bibr">Westbrook Westbrook (1994)</ref>.</p><p>The two data sets are obtained by generating "predicted" sequences of points in the plane, and then perturbing each point by independent Gaussian noise to obtain "actual" sequences. The predicted sequence is fed to our algorithm, while the actual sequence forms an input of the online algorithm. Recall that our algorithm sees the actual sequence only in the online fashion.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1">Data sets</head><p>The predicted sequences of the two sets of points are generated as follows:</p><p>1. Line process: the t-th point ( X1 (t), X2 (t)) is equal to (t, 0).</p><p>2. Brownian motion process: the t-th point X(t) is equal to X(t -1) + (&#8710; 1 (t), &#8710; 2 (t)), where &#8710; t (t) and &#8710; 2 (t) are i.i.d. random variables chosen from N (0, 1).</p><p>Note that the predicted line process is completely deterministic whereas the Brownian motion points has, by definition, Gaussian noise. In both cases, the actual sequence is generated by adding (additional) Gaussian noise to the predicted sequence: the t-th request X(t) in the actual sequence is equal to X(t)+(N 1 (t), N 2 (t)), where N 1 (t), N 2 (t) are i.i.d. random variables chosen The predicted sequence is in blue, the actual sequence is in red.</p><p>from N (0, &#963; 2 ). The value of &#963; varies, depending on the specific experiment. An example Brownian motion sequence is depicted in Fig. <ref type="figure">2</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2">Set up</head><p>We use the two data sets to compare the following three algorithms:</p><p>&#8226; Predict refers to our algorithm, which computes the optimum solution for the predicted sequence (by using standard dynamic programming) and follows that optimum to serve actual requests.</p><p>&#8226; Opt is the optimum offline algorithm executed on the actual sequence. This optimum is computed by using the same dynamic programming as in the implementation of Predict.</p><p>&#8226; Online is state-of-the-art online randomized algorithm for page migration that achieves 2.62approximation in expectation. This algorithm is described in Section 4.1 of <ref type="bibr">Westbrook (1994)</ref>.</p><p>Since it is randomized, on each input we perform 100 runs of Online and as the output report the average of all the runs. The standard deviation is smaller than 5%.</p><p>For both data sets, we depict the costs of the three algorithms as a function of either D or &#963;. See the text above each plots for the specification.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2.1">Results</head><p>The results for the Brownian motion data set are depicted in Fig. <ref type="figure">3</ref>. The top two figures show the cost incurred by each algorithm for fixed values of &#963; and  As the value of &#963; increases, their costs starts to diverge. Nevertheless, the benefit of predictions is clear, as the cost of Predict is significantly lower than the cost of Online. Interestingly, this holds even though the fraction of requests predicted exactly is very close to 0. Each point in the plots is obtained by averaging over 15 runs. The standard deviation are also depicted in the figures as vertical lines (in some cases the standard deviation is so small that it is not visible in the plots).</p><p>The results for the Line data set is depicted in Fig. <ref type="figure">6</ref> (see Appendix C). They are qualitatively similar to those for Brownian motion.</p><p>More complex experiments. In Fig. <ref type="figure">4</ref> we present the results of a more complex experiment where we average 10 adversarial sequences, e.g., data observed in the past, and use it as a prediction for Predict. These adversarial sequences are obtained by perturbing the same ground truth. Notice that this means that in order to obtain a prediction we do not use the ground truth directly. Each point in Fig. <ref type="figure">4</ref> is obtained by averaging over 5 runs. The standard deviation is so small that it is not visible in the plot.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Conclusion</head><p>In this paper we studied online Page Migration, which is one of the classical online problems, in the setting where there is a predicted sequence of yet-to-be-seen requests. When this sequence predicts the online sequence reasonably well, our algorithm provides better approximation than state-of-the-art approach for classical online setting. It is an interesting open question to improve the constant in our competitive factor to obtain tight bounds.</p><p>Arguably the most interesting continuation of this work is to use ML tools to obtain the predicted sequence. For example, a neural network could be trained on the sequence seen so far to predict where the future requests will be. Combining this with our robust algorithm will likely give very strong results when the sequence has a somewhat predictable structure. Characterizing such predictable structures theoretically will likely yield new interesting models which has potentially application beyond Page Migration.</p><p>A.1.3 Combining the two cases.</p><p>We have concluded that in either case it holds A n -O n &#8804; 4q(A n + O n ) and hence we derive</p><p>This concludes the analysis for uniform metric spaces.</p><p>A.2 General Metric Spaces -Theorem 2 (A)</p><p>As in uniform case, our goal for general metric spaces is to use Eq. ( <ref type="formula">5</ref>) for proving the advertised competitive ratio. However, as we discussed in Section 3.1, the main challenge in applying Eq. ( <ref type="formula">5</ref>) lies in upper-bounding the ratio between m((t i-1 , t i ]) and t i -t i-1 by a small constant, ideally much smaller than 1. Unfortunately, this ratio can be as large as 1 as OPT (or ALG) could possibly move on every single request. To see that, consider the scenario in which all the requests are on the x-axis and are requested in their increasing order of their location. Then, for all but potentially the last D requests, OPT would move from request to request. To bypass this behavior of OPT and ALG, we define and analyze their "lazy" variants, i.e., variants in which OPT and ALG are allowed to move only at the i-th request when i is a multiple of &#949;D. We now state the algorithm.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.2.1 Our Algorithm ALG lazy</head><p>We use the following algorithm ALG lazy : Compute the optimal offline solution (on &#349;) while only moving on multiples of &#949;D. Let A lazy be the cost of the solution s and let A lazy be the cost of the solution on &#349;. Note that there can be better offline algorithms for &#349;, however ALG lazy has the minimal cost among all online algorithms that are only allowed to move every multiple of &#949;D.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.2.2 Proof</head><p>We also need to consider a lazy version of OPT, which we do in the following lemma. There we show that making any algorithm lazy does not increase the cost by more than a factor of (1 + &#949;). In particular, we will show O lazy &#8804; (1 + &#949;)OPT. Let A lazy t and O lazy t denote their costs at time t. Lemma 4. Let &#949; &#8712; (0, 1]. Consider an arbitrary prefix w of length t of a sequence of requests. Let B t be the cost of any algorithm ALG B serving w. Let B lazy t be the cost of the algorithm that has to move at every time step that is a multiple of &#949;D (and is not allowed to move at any other time step), and to move to the position where ALG B is at that time step. Then, we have</p><p>Proof. Let x i be the distance of the i-th move and y i be the cost for serving the i-th request remotely. Then,</p><p>Now we relate B t and B lazy t . B lazy t has two components: the moving cost and the cost for serving remotely. By triangle inequality, the moving cost is upper-bounded by D i x i . Consider now interval I j &#8712; [j&#949;D +1, (j +1)&#949;D] for some integer j. To serve point i &#8712; I j remotely, the cost is, by triangle inequality, at most the cost of y i plus the cost of traversing all the points with indices in I j where ALG B has moved to. Thus the cost per request i &#8712; I j is upper-bounded by y i + k&#8712;Ij x k . Note that the summation k&#8712;Ij x k is charged to &#949;D requests. Hence, summing over all the intervals gives</p><p>Define O lazy as the cost of the optimal algorithm for s that is allowed to move only at time steps which are multiple of &#949;D. Similarly as in Lemma 4, we have O lazy n &#8804; (1 + &#949;)O n . Thus,</p><p>Now we need to upper-bound</p><p>. We will do that by showing that the same statements as we developed in Section 4.1 hold for A lazy and O lazy . To that end, observe that to derive Eq. ( <ref type="formula">7</ref>) we used the fact that &#194; &#8804; &#212;. Notice that the analog inequality A lazy &#8804; lazy holds, since ALG lazy is the the optimal offline algorithm that only moves every multiple of &#949;D.</p><p>Hence, we can obtain the derivation Eq. ( <ref type="formula">11</ref>) for</p><p>Since for the lazy versions we have |t i -t i-1 | = &#949;D, Assumption 1 implies m((t i-1 , t i ]) &#8804; &#949;qD. Plugging this into Eq. ( <ref type="formula">16</ref>) gives</p><p>From Eq. ( <ref type="formula">15</ref>) we establish</p><p>This concludes the proof of Theorem 2 (A).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Robust Page Migration</head><p>So far we designed algorithms for the online page migration problem that have small competitive ratio when Assumption 1 holds. In this section we build on those algorithm and design a (robust) algorithm that performs well even when Assumption 1 does not hold, while still retaining competitiveness when Assumption 1 is true. We refer to this algorithm by ALG robust . For ALG robust we prove the following.</p><p>Theorem 5. Let &#947; be the competitive ratio of ALG for the online page migration problem, and let q be a positive number less than 1/24. If Assumption 1 holds, then ALG robust is &#947; &#8226; (1 + O(q))-competitive, and otherwise ALG robust is O(1/q)-competitive.</p><p>Using our techniques it is straight-forward to obtain an arbitrary trade-off between the two competitive ratios. Fix an arbitrary x &#8805; 1, then Algorithm ALG robust is (1 + O(x &#8226; q))-competitive if Assumption 1 holds and O(1/(x &#8226; q))-competitive otherwise.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.1 Algorithm ALG robust</head><p>Let ALG online refer to an arbitrary online algorithm for the problem, e.g., <ref type="bibr">Westbrook (1994)</ref>. We now define ALG robust . This algorithm switches from ALG to ALG online when it detects that Assumption 1 does not hold. Instead of using ALG directly, we use a "lazy" version of ALG that works as follows. Follow the optimal offline solution given by ALG with a delay of 6qD steps. Let ALG lazy be the corresponding algorithm. (A lazy version for different setup of parameters was presented in Appendix A.2.)</p><p>Throughout its execution, ALG robust maintains/tracks in its memory the execution of ALG online on the prefix of s seen so far. That is, ALG robust maintains where ALG online would be at a given point in time in case a fallback is needed. Now ALG robust simply executes ALG lazy unless we find a violation of Assumption 1 is detected. Once such a violation is detected, the algorithm switches to ALG online by moving its location to ALG online 's current location. From there on ALG online is executed.</p><p>We now analyze ALG robust and show that in case Assumption 1 holds, then ALG and ALG robust are close in terms of total cost, and otherwise the cost of ALG robust is at most O(1/q) larger than that of ALG online .</p><p>B.1.1 Case 1: Assumption 1 holds for the entire sequence.</p><p>In this case ALG robust executes ALG lazy throughout. Following the same argument for &#949; = 6q as given for A lazy in the proof of Lemma 4, we have</p><p>Thus,</p><p>where we used the assumption that ALG is &#947;-competitive. This completes this case.</p><p>B.1.2 Case 2: Assumption 1 is violated at the t-th request.</p><p>Let t = t -qD + 1. Note that up to this point in time no violation occurred. We define the following: a is position of ALG lazy at time t ; a is the position of ALG online at time t + 1; o is the position of OPT at time t ; and, O p 0,t is the cost of OPT up to time t where we demand that OPT is at position p at t . In the following, we assume the following holds. We defer the proof of its correctness for later.</p><p>Intuitively, this means that we can bound the distance from the starting position by the cost of OPT.</p><p>Using Eq. ( <ref type="formula">18</ref>), we get,</p><p>As O a 0,t and A lazy 0,t are at the same position at time t , inequality A lazy 0,t &#8804; (1 + c 1 q)O a 0,t follows from Eq. ( <ref type="formula">17</ref>) for a suitable constant c 1 . Note that O t &#8805; D &#8226; d(p 0 , o), which holds since this cost is already incurred by moving to o, where we used triangle inequality.</p><p>Next, using triangle inequality again, we get</p><p>Furthermore, using Eq. ( <ref type="formula">18</ref>), triangle inequality and a simple lower bound on A lazy 0,t as well as Eq. ( <ref type="formula">20</ref>), we get,</p><p>Thus, plugging Eq. ( <ref type="formula">21</ref>) and Eq. ( <ref type="formula">20</ref>) into Eq. ( <ref type="formula">19</ref>) and using A online &#8804; O(O n ), we get</p><p>Thus, it only remains to prove Eq. ( <ref type="formula">18</ref>), as we do using the following lemma. That lemma shows that if ALG moves its page to a location that is far from p 0 , then this means that there must be pages that are far from p 0 . Later we will show that OPT pays considerable cost to serve them, even if done remotely. See Fig. <ref type="figure">5</ref> for an illustration of the lemma. Lemma 6. Let P = p 1 , p 2 , . . . be the sequence of page locations that ALG produces. Let p max be the furthest point with respect to p 0 a page is moved to by the ALG, i.e., In case that there are several pages at p max , we let p max be the first among them. Let d max def = d(p max , p 0 ).</p><p>Let P be the maximal consecutive sequence of P including p max consisting of pages that are each at distance at least r def = d max /4 from p 0 . for q &lt; 1/24, it holds that the page locations in P serve together at least 6qD points at distance r from p 0 in the oracle sequence. , where we argue that the reason we moved a page to a location far away (at distance max ) from p 0 means that there must be many points that are at least at distance r = d max /4 from p 0 . OPT will have to serve most of these points as well. The squares denote location of pages, the small circles denote page requests, the solid lines between squares and small circles depict a remotely served request. The dashed lines denote the movement of the page. The sequence P consists of p , p max and p .</p><p>Proof. The proof proceeds by contradiction. Suppose that P serves fewer than 6qD points in the oracle sequence. We will show that a better solution consists of replacing the sequence P by simply moving to p 0 and serving all points remotely from there. Since P is a maximal sequence of P including p max such that each page location is at distance r from p 0 , ALG moves by at least d max -r within P . Hence, the cost of ALG using the page locations P is at least</p><p>where the d i represents the distances to pages served remotely from the page locations in P (depicted as solid lines connected to p, p max and p in Fig. <ref type="figure">5</ref>). Consider a request s that is served from location p in the original (using P ) solution. In the new solution, where all points are served from p 0 , serving any request has, by triangle inequality, a cost of at most d(p 0 , p) + d(p, s) &#8804; d max + d(p, s). Moreover, observe that the sequence P consists of at most 6qD locations. This is because otherwise there would be a location that does not serve any points. Putting everything together, the cost of the new solution is at most</p><p>where the 2Dr accounts for moving the page from the location preceding P to p 0 (the cost of at most Dr) and moving the page from p 0 to the location just after P (also the cost of at most Dr). Recall that r = d max /4. Thus, Eq. ( <ref type="formula">23</ref>) is cheaper than the solution Eq. ( <ref type="formula">22</ref>) for q small enough (i.e., for q &lt; 1/24), which contradicts the optimality of ALG of the oracle sequence.</p><p>By Lemma 6, we conclude that there are at least 6qD points at distance r from p 0 in the oracle sequence. Note that the final sequence s will contain at least 6qD -2qD of these points, due to our assumption on noise and the fact that up to the first violation of Assumption 1 were detected as time t. OPT has to serve these points as well and thus O t &#8805; (6qD -2qD)r = 4qD &#8226; d max /4 &#8805; qD &#8226; d(a, p 0 ), which yields Eq. ( <ref type="formula">18</ref>) and therefore completes the proof.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Additional Experiments</head></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_0"><p>Note that if each interval of length D has at most a fraction of q of errors, then it is also the case that each interval of length &#8730; qD has at most a fraction of &#8730; q of errors. Thus, if q tends to 0, the competitive ratio tends to 1 even if the interval length remains fixed.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_1"><p>We oversimplified here, since the right hand side of (1) only holds for the sum of all points, but a similar argument can be made for a single requests.</p></note>
		</body>
		</text>
</TEI>
