Bocconi UniversityProjects

Learning-Augmented Algorithms for MTS with Bandit Access to Multiple Predictors

Metric graph illustrating a metrical task system with two heuristic paths.
  • Matei Gabriel Cosa

    Senior Advisor

Publication

Proceedings of Machine Learning Research 267 (ICML 2025), pp. 11357–11378

Abstract

We consider the following problem: We are given \ell heuristics for Metrical Task Systems (MTS), where each might be tailored to a different type of input instances. While processing an input instance received online, we are allowed to query the action of only one of the heuristics at each time step. Our goal is to achieve performance comparable to the best of the given heuristics. The main difficulty of our setting comes from the fact that the cost paid by a heuristic at time tt cannot be estimated unless the same heuristic was also queried at time t1t-1. This is related to Bandit Learning against memory bounded adversaries (Arora et al. 2012). We show how to achieve regret of O(OPT2/3)O(\operatorname{OPT}^{2/3}) and prove a tight lower bound based on the construction of Dekel et al. 2013.

1 Introduction

Metrical Task Systems (MTS) (Borodin et al. 1992) are a very broad class of online problems capable of modeling problems arising in computing, production systems, power management, and routing service vehicles. In fact, many fundamental problems in the field of Online Algorithms including Caching, kk-server, Ski-rental, and Convex Body Chasing are special cases of MTS. Metrical Task Systems are also related to Online Learning from Expert Advice, see (Blum & Burch 2000) for the comparison of the two problems.

In MTS, we are given a description of a metric space (M,d)(M,d) and a starting point s0Ms_{0}\in M beforehand. The points in MM are traditionally called states and, depending on the setting, they can represent actions, investment strategies, or configurations of some complex system. At each time step t=1,,Tt=1,\dotsc,T, we receive a cost function ct ⁣:MR+{0,+}c_{t}\colon M\to\mathbb{R}_{+}\cup\{0,+\infty\}. Seeing ctc_{t}, we can decide to stay in our previous state st1s_{t-1} and pay its cost ct(st1)c_{t}(s_{t-1}), or move to some (possibly cheaper) state sts_{t} and pay ct(st)+d(st1,st)c_{t}(s_{t})+d(s_{t-1},s_{t}), where the distance function dd represents the transition cost between two states. Our objective is to minimize the total cost paid over time.

MTS is very hard in the worst case. This is due to its online nature (sts_{t} has to be chosen without knowledge of ct+1,,cTc_{t+1},\dotsc,c_{T}) and also due to its generality. The performance of algorithms is evaluated using the competitive ratio which is, roughly speaking, the ratio between the algorithm’s cost and the cost of the optimal solution computed offline. Denoting nn the number of points in the metric space MM, the best competitive ratio achievable for MTS is 2n12n-1 and Θ(log2n)\Theta(\log^{2}n) in the case of deterministic and randomized algorithms, respectively Borodin et al. 1992; Bartal et al. 2006; Bubeck et al. 2022a; Bubeck et al. 2019. Note that nn is usually very large or even infinite (e.g., M=RdM=\mathbb{R}^{d}).

This worst-case hardness motivates the study of MTS and its special cases in the context of Learning-Augmented Algorithms (Lykouris & Vassilvitskii 2021). Here, the algorithm can use predictions produced by an ML model in order to exploit specific properties of input instances. By augmenting the algorithm with the ML model, we obtain a heuristic with an outstanding performance, well beyond the classical worst-case lower bounds, on all inputs where the ML model performs well. One of the key techniques used in this context is Combining Heuristics which is used to achieve robustness (Lykouris & Vassilvitskii 2021; Wei 2020; Antoniadis et al. 2023b), adjust hyperparameters Antoniadis et al. 2021, and recognize the most suitable heuristic for the current input instance (Emek et al. 2021; Anand et al. 2022; Antoniadis et al. 2023a).

Combining heuristics.

In this basic theoretical problem, we are given \ell heuristics H1,,HH_{1},\dotsc,H_{\ell} which can be simulated on the input instance received online. We want to combine them into a single algorithm which achieves a cost comparable to the best of the heuristics on each individual instance. The difficulty of the combination problem is given by the online setting: because we receive the input online, we cannot tell beforehand which heuristic is going to perform better. Moreover, steps performed while following a wrong heuristic cannot be revoked.

We can combine a heuristic deploying an ML prediction model with a classical online algorithm in order to obtain a new algorithm that satisfies worst-case guarantees regardless of the performance of the ML model (this property is called robustness). Similarly, we can use it to deploy a portfolio of very specialized ML models in a broader setting, where each model corresponds to a separate heuristic. The combination technique ensures that we achieve very good performance whenever at least one of the models performs well on the current input instance.

Full-feedback setting.

Most of the previous works on Combining Heuristics query the state of each heuristic at each time step, observe their costs, and choose between their states, see (Wei 2020; Antoniadis et al. 2023b; Blum & Burch 2000; Fiat et al. 1991). We call this the full-feedback setting and, indeed, methods from Online Learning in the full-feedback setting can be directly integrated in the combination algorithms. For example, Blum & Burch 2000 showed that by choosing between heuristics using the HEDGE algorithm (Freund & Schapire 1997) with a well-chosen learning rate we can be (1+ϵ)(1+\epsilon)-competitive with respect to the best heuristic.1

Bandit-feedback setting.

In this paper, we consider what can be seen as a bandit-feedback setting of Combining Heuristics. At each time step, we are allowed to query the current state of only one heuristic. This setting allows us to study the impact of restricting information about the heuristics on our ability to combine them effectively. Further motivation is the fact that querying all the heuristics is costly, especially if they utilize some heavy-weight prediction models. This issue was already considered by Emek et al. 2021 and Antoniadis et al. 2023a whose works inspired our study. Note that the combination algorithm retains full access to the input instance. This is required by any positive result for general MTS, since the cost functions ctc_{t} usually do not satisfy any natural properties such as Lipschitzness or convexity; see further discussion in Section 2. Moreover, ctc_{t} is often easy to encode. For example, in Caching, ctc_{t} is fully determined by the page requested at time tt.

In contrast to the full-feedback setting, classical learning methods cannot be directly integrated in combination algorithms operating in the bandit setting. The main reason is that the state stis_{t}^{i} of the heuristic HiH_{i} is not enough to estimate its cost at time tt: the cost paid by HiH_{i} at time tt is ct(sti)+d(st1i,sti)c_{t}(s_{t}^{i})+d(s_{t-1}^{i},s_{t}^{i}), i.e., we cannot calculate this cost2 unless we have queried HiH_{i} in both time steps t1t-1 and tt. We also consider the case where each heuristic needs to be bootstrapped for m20m-2\geq 0 time steps before we can see its state. This way, to receive the state of HiH_{i} in time steps t1t-1 and tt, and to be able to calculate its cost at time tt, we have to query HiH_{i} in the mm time steps tm+1,,tt-m+1,\dotsc,t.

A similar phenomenon occurs in the setting of Online Learning against Memory-Bounded Adversaries (Arora et al. 2012), which is our main theoretical motivation for considering non-zero bootsrapping time (i.e., m>2m>2). There, one needs to play an action aa at least mm times in a row to see the loss of the reference policy which plays aa at each time step. The algorithm of Arora et al. 2012 splits the time horizon into blocks of length larger than mm. In the block ii, they keep playing the same action aia_{i} which allows them to observe the loss of the corresponding reference policy after the first mm time steps in the block. However, this does not work in our setting. The adversary can set up the MTS instance in such a way that ct0c_{t}\neq 0 and the heuristics move only on the boundaries of the blocks, so that the algorithm would not observe the cost of any heuristic. This way, the algorithm cannot be competitive with respect to the best heuristic.

A different bandit-like setting for Combining Heuristics for MTS was proposed by Antoniadis et al. 2023a. In their setting, the queried predictor reports both its state and the declared moving cost incurred at time tt. We discuss their contribution in Section 1.2. Their (1+ϵ)(1+\epsilon)-competitive algorithm and absence of lower bounds motivated us to study regret bounds which can provide more refined guarantees when the competitive ratio is close to 1. However, we have decided to pursue these bounds in the more natural setting where the moving costs are not reported as it does not rely on the honesty of the predictors.3 Since our algorithms use a subset of information available in the setting of Antoniadis et al. 2023a, our upper bounds also apply to their setting.

1.1 Our Results

For m2m\geq 2, we say that an algorithm ALG\operatorname{ALG} has mm-delayed bandit access to heuristics H1,,HH_{1},\dotsc,H_{\ell} if (i) it can query at most one heuristic HiH_{i} at each time step tt and (ii) the query yields the current state of HiH_{i} only if HiH_{i} was queried also in steps t ⁣ ⁣m ⁣+ ⁣2,,tt\!-\!m\!+\!2,\dotsc,t, otherwise it yields an empty result.

Our main result is an algorithm with the following regret.

Theorem 1.1. Let DD, \ell, and m2m\geq 2 be constant. Consider heuristics H1,,HH_{1},\dotsc,H_{\ell} for an MTS with diameter DD. There is an algorithm ALG\operatorname{ALG} which, given an mm-delayed bandit access to H1,,HH_{1},\dotsc,H_{\ell}, satisfies the following guarantee. The expected cost of ALG\operatorname{ALG} on any input II is

E[ALG]OPT0+O(OPT02/3),\mathbb{E}[\operatorname{ALG}]\leq\operatorname{OPT}_{\leq 0}+\,O\big(\operatorname{OPT}_{\leq 0}^{2/3}\big),

where OPT0=mini=1H(I)\operatorname{OPT}_{\leq 0}=\min_{i=1}^{\ell}H(I) denotes the cost of the best heuristic on input II.

We prove this result in Section 3, where we state explicitly the dependence on DD, mm, and \ell in the case when they are larger than a constant. We can interpret our result in terms of the competitive ratio. Since the regret term in Theorem 1.1 is sublinear in OPT0\operatorname{OPT}_{\leq 0}, the expected cost of our algorithm is at most E[ALG](1+o(1))OPT0\mathbb{E}[\operatorname{ALG}]\leq(1+o(1))\operatorname{OPT}_{\leq 0}. In other words, its competitive ratio with respect to the best of the \ell heuristics converges to 11. Therefore, our algorithm can be used for robustification. If we include a classical online algorithm which is ρ\rho-competitive in the worst case among H1,,HH_{1},\dotsc,H_{\ell}, our algorithm will never be worse than (1+o(1))ρ(1+o(1))\rho-competitive. However, on input instances where some of the heuristics incur a very low cost, the algorithm can match their performance asymptotically. For example, if the cost of the best heuristic is only 1.01 times higher than the offline optimum, our algorithm’s cost will be only (1+o(1))1.01(1+o(1))\cdot 1.01 times the offline optimum.

Our algorithm alternates between exploitation and exploration, as in the classical approach for the Multi-Armed Bandit (MAB) setting, see e.g. (Slivkins 2019). However, each exploration phase takes mm time steps and we are unable to build an unbiased estimator of the loss vectors. Moreover, our algorithm sometimes needs to take improper steps, i.e., going to a state which is not suggested by any of the predictors. This is clearly necessary with m>2m>2, since we may receive empty answers to our queries. Such improper steps are crucial for achieving regret in terms of OPT0\operatorname{OPT}_{\leq 0} even for m=2m=2.

In Section 6, we show that our algorithm can be adapted to the mm-memory bounded setting for bandits, where it achieves a regret of O(T2/3)O(T^{2/3}) comparable to Arora et al. 2012, while slightly improving the dependence on mm. Note that TT can be much larger than OPT0\operatorname{OPT}_{\leq 0}.

We extend our result to a setting with a benchmark which can switch between the heuristics at most kk times, while the algorithm’s number of switches still remains unrestricted.

Theorem 1.2. Let DD, \ell, and m2m\geq 2 be constant and k1k\geq 1 be a parameter. Consider heuristics H1,,HH_{1},\dotsc,H_{\ell} for an MTS with diameter DD. There is an algorithm ALG\operatorname{ALG} which, given an mm-delayed bandit access to H1,,HH_{1},\dotsc,H_{\ell}, satisfies the following guarantee. The cost of ALG\operatorname{ALG} on input II with offline optimum cost at least 2k2k is

E[ALG]OPTk+O~(k1/3OPTk2/3),\mathbb{E}[\operatorname{ALG}]\leq\operatorname{OPT}_{\leq k}+\,\tilde{O}(k^{1/3}\operatorname{OPT}_{\leq k}^{2/3}),

where OPTk\operatorname{OPT}_{\leq k} denotes the cost of the best combination of heuristics in hindsight that switches between heuristics at most kk times on input II.

Again, we can interpret this regret bound as a competitive ratio converging to 1. In Section 5, we show that the competitive ratio of our algorithm is below (1+ϵ)(1+\epsilon) for kk as large as Ω~(ϵ3OPTk)\tilde{\Omega}(\epsilon^{3}\operatorname{OPT}_{\leq k}) which is worse by a log-factor than the result of Antoniadis et al. 2023a in their easier setting.

In Section 4, we show that our upper bound in Theorem 1.1 is tight up to a logarithmic factor even with 0 bootstrapping time (m=2m=2). Our result is based on the construction of Dekel et al. 2013 for Bandits with Switching Costs. Their lower bound cannot be applied directly, since algorithms in our setting have an advantage in being able to take improper actions and having one-step look-ahead. Both of these advantages come from the nature of MTS and are indispensable in our setting, see Section 2.

Theorem 1.3. For any algorithm ALG\operatorname{ALG} with 22-delayed bandit access to \ell predictors, there is an input instance II such that the expected cost of ALG\operatorname{ALG} is

E[ALG]OPT0+Ω~(OPT02/3),\mathbb{E}[\operatorname{ALG}]\geq\operatorname{OPT}_{\leq 0}+\,\tilde{\Omega}(\operatorname{OPT}_{\leq 0}^{2/3}),

where OPT0=mini=1H(I)\operatorname{OPT}_{\leq 0}=\min_{i=1}^{\ell}H(I) denotes the cost of the best heuristic on input II.

In Section 4.1, we also show that the dependence on D,D,\ell and kk in our bounds is (almost) optimal. In particular, our regret bound in Theorem 1.1 scales with (Dkln)1/3m2/3(Dk\ell\ln\ell)^{1/3}m^{2/3} and we show that this dependence needs to be at least (Dk)1/3(Dk\ell)^{1/3} with m=2m=2.

Arora et al. 2012 introduced the problem of Bandit Learning against Memory-Bounded Adversaries. Here, the loss functions depend on the last μ+1\mu+1 actions taken by the algorithm. This setting captures, for example, Bandits with Switching Costs (Cesa-Bianchi et al. 2013; Amir et al. 2022; Rouyer et al. 2021). They propose an elegant algorithm with regret O(μT2/3)O(\mu T^{2/3}) that partitions the time horizon into blocks of equal size and let a classical online learning algorithm (e.g., EXP3) play over the losses aggregated in each block. Their result was shown to be tight by Dekel et al. 2013 who provided a sophisticated lower bound construction showing that any algorithm suffers regret at least Ω~(T2/3)\tilde{\Omega}(T^{2/3}) already for μ=1\mu=1. Our results are also related to Non-Stationary Bandits and Dynamic Regret (Auer et al. 2002, Section 8).

Antoniadis et al. 2023a studied dynamic combination of heuristics for MTS. By reducing to the Layered Graph Traversal problem (Bubeck et al. 2022b), they achieved a competitive ratio O(2)O(\ell^{2}) with respect to the best dynamic combination of \ell heuristics. Then, they focused on the scenario where the input instance is partitioned into kk intervals and a different heuristic excels in each of the intervals. They provided bounds on how big kk can be to make (1+ϵ)(1+\epsilon)-competitive algorithms possible. Finally, they also studied this question in the bandit-like setting which is strictly easier compared to ours.

First works on Combining Heuristics were by Fiat et al. 1990 for kk-server, Fiat et al. 1991 for Caching, and Azar et al. 1993; Blum & Burch 2000 for MTS. More recently, Emek et al. 2021 studied Caching with multiple predictors and achieved regret sublinear in TT, while also tackling a bandit-like setting. Further results on other online problems are by Anand et al. 2022; Dinitz et al. 2022; Bhaskara et al. 2020; Gollapudi & Panigrahi 2019; Almanza et al. 2021; Wang et al. 2020; Kevi & Nguyen 2023.

Learning-augmented algorithms were introduced by Lykouris & Vassilvitskii 2021; Kraska et al. 2018 who designed algorithms effectively utilizing unreliable machine-learned predictions. Since these two seminal works, many computational problems were studied in this setting, including Caching (Rohatgi 2020; Wei 2020), Scheduling (Lindermayr & Megow 2022; Benomar & Perchet 2024b; Balkanski et al. 2023; Bamas et al. 2020), graph problems (Eberle et al. 2022; Bernardini et al. 2022; Dong et al. 2025; Davies et al. 2023) and others. Several works consider algorithms using the predictions sparingly (Im et al. 2022; Drygala et al. 2023; Sadek & Eliáš 2024; Benomar & Perchet 2024a). See the survey (Mitzenmacher & Vassilvitskii 2022) and the website by (Lindermayr & Megow 2023).

Metrical Task Systems were introduced by Borodin et al. 1992 who gave a tight competitive ratio of 2n12n-1 for deterministic algorithms (nn is the number of states). The best competitive ratio for general MTS is Θ(log2n)\Theta(\log^{2}n) by Bubeck et al. 2019 and Bubeck et al. 2022a.

2 Notation and Preliminaries

We consider MTS instances with a bounded diameter and denote D=maxs,sMd(s,s)D=\max_{s,s^{\prime}\in M}d(s,s^{\prime}) the diameter of the underlying metric space. For example, DD in caching is equal to the size of the cache. At each time step, the algorithm receives the cost function ctc_{t} first, and then it chooses its new state sts_{t}, i.e. there is a 1-step look-ahead. This is standard in MTS definition and it is necessary for existence of any competitive algorithm, since ctc_{t} is potentially unbounded, see (Blum & Burch 2000, Section 2.3). We denote Δd\Delta^{d} the dd-dimensional probability simplex, and [d]={1,,d}[d]=\{1,\dotsc,d\}.

m-delayed bandit access to heuristics.

Given \ell heuristics H1,,HH_{1},\dotsc,H_{\ell}, we denote stis_{t}^{i} the state of HiH_{i} at time tt and ft(i)=ct(sti)+d(st1i,sti)f_{t}(i)=c_{t}(s_{t}^{i})+d(s_{t-1}^{i},s_{t}^{i}) the cost incurred by HiH_{i} at time tt. Let m2m\geq 2 be a parameter. At each time tt, the algorithm is allowed to query a single heuristic HiH_{i}. If HiH_{i} was also queried in time steps tm+2,,tt-m+2,\dotsc,t, the result of the query is the state stis_{t}^{i}. Otherwise, the result is empty. While the access to the states of the heuristics is restricted, the algorithm has full access to the input instance which is not related to acquiring costly predictive information. Moreover, the input instance can be often described in a very compact way. For example, ctc_{t} in Caching is completely determined by the page requested at time tt. Access to the input instance is necessary because the cost functions are not required to satisfy any natural assumptions (like boundedness, Lipschitzness, convexity). For example, if the queried heuristic reports a state ss with ct(s)=+c_{t}(s)=+\infty, the algorithm needs to know ctc_{t} in order to choose a different state and avoid paying the infinite cost. Note that a similar situation can easily happen in Caching, kk-server, Convex Body Chasing, or Convex Function Chasing.

We assume that ft(i)[0,2D]f_{t}(i)\in[0,2D]. This is without loss of generality for the following reason. First, we can assume that at each time tt there is a state with zero cost, since subtracting minsct(s)\min_{s}c_{t}(s) from the cost of each state affects the cost of any algorithm (including the offline optimum) equally. Second, any predictor can be post-processed so that, in each time step where its cost is higher than 2D2D, it serves the request in the state with 0 cost and returns to the predicted state, paying at most 2D2D for the movement.

Benchmarks and performance metrics.

Let OPT0=mini=1t=1Tft(i)\operatorname{OPT}_{\leq 0}=\min_{i=1}^{\ell}\sum_{t=1}^{T}f_{t}(i) be the static optimum, i.e., the cost of the best heuristic. For k>0k>0, we define

OPTk=mini1,,iTt=1T(ct(stit)+d(st1it1,stit))mini1,,iTt=1Tft(it)kD,\begin{aligned}\operatorname{OPT}_{\leq k} \\ =\textstyle\min_{i_{1},\dotsc,i_{T}}\sum_{t=1}^{T}\big(c_{t}(s_{t}^{i_{t}})+d(s_{t-1}^{i_{t-1}},s_{t}^{i_{t}})\big) \\ \geq\textstyle\min_{i_{1},\dotsc,i_{T}}\sum_{t=1}^{T}f_{t}(i_{t})-kD,\end{aligned}

where the minimum is taken over all solutions i1,,iTi_{1},\dotsc,i_{T} such that the number of steps where it1iti_{t-1}\neq i_{t} is at most kk.

We evaluate the performance of our algorithms using expected pseudoregret regret (further abbreviated as regret). For k0k\geq 0, we define

Regk(ALG)=E[ALG]OPTk,\operatorname{Reg}_{k}(\operatorname{ALG})=\mathbb{E}[\operatorname{ALG}]-\operatorname{OPT}_{\leq k},

where ALG\operatorname{ALG} denotes the cost incurred by the algorithm on the given input instance with access to the given heuristics. We assume that the adversary is oblivious and has to fix the MTS input instance and the solutions of the heuristics before seeing the random bits of the algorithm. We say that an algorithm is ρ\rho-competitive with respect to an offline algorithm OFF\operatorname{OFF}, if E[ALG]ρOFF+α\mathbb{E}[\operatorname{ALG}]\leq\rho\operatorname{OFF}+\alpha holds on every input instances, where α\alpha is a constant independent on the input instance and we use OFF\operatorname{OFF} to denote both the algorithm and its cost. If OFF\operatorname{OFF} is an offline optimal algorithm, we call ρ\rho the competitive ratio of ALG\operatorname{ALG}.

Rounding fractional algorithms.

A fractional algorithm for MTS is an algorithm which, at each time tt, produces a distribution ptΔMp_{t}\in\Delta^{M} over the states in MM. These distributions do not yet say much about the movement costs of the algorithm. But there is a standard way to turn such a fractional algorithm into a randomized algorithm for MTS.

Proposition 2.1. There is an online randomized algorithm for MTS which, receiving online a sequence of distributions p1,,pTΔMp_{1},\dotsc,p_{T}\in\Delta^{M}, produces a solution s1,,sTMs_{1},\dotsc,s_{T}\in M with expected cost equal to

E[ALG]=t=1T(ctTpt+EMD(pt1,pt)),\textstyle\mathbb{E}[\operatorname{ALG}]=\sum_{t=1}^{T}\big(c_{t}^{T}p_{t}+\operatorname{EMD}(p_{t-1},p_{t})\big),

where EMD\operatorname{EMD} denotes the Earth mover distance with respect to the metric space MM.

We include the proof of this standard fact in Appendix B together with the following, very similar, proposition, where we overestimated the cost of switching between the states of two heuristics by DD.

Proposition 2.2. There is an online randomized algorithm which, receiving online a sequence of distributions x1,,xTΔx_{1},\dotsc,x_{T}\in\Delta^{\ell} over the heuristics, queries at each time tt a heuristic iti_{t} with probability xt(it)x_{t}(i_{t}) such that

E[t=1Tct(stit)+d(st1it1,stit)]t=1TftTxt+D2xt1xt1.\mathbb{E}\big[\sum_{t=1}^{T}c_{t}(s_{t}^{i_{t}})+d(s_{t-1}^{i_{t-1}},s_{t}^{i_{t}})\big]\leq\sum_{t=1}^{T}f_{t}^{T}x_{t}+\frac{D}{2}\lVert x_{t-1}-x_{t}\rVert_{1}.

Basic learning algorithms.

We use the classical algorithms for online learning with expert advice HEDGE (Freund & Schapire 1997) and SHARE (Herbster & Warmuth 1998). Both satisfy the following property with η\eta being their learning rate. For both of them, the proof is contained in (Blum & Burch 2000), we discuss more details, as well as the learning dynamics in Appendix C.

Property 2.3. There is a parameter η\eta such that the following holds. Denoting xt1x_{t-1} and xtx_{t} the solutions of the algorithm before and after receiving loss vector gt1g_{t-1}, we have

xt1xt1ηgt1Txt1.\lVert x_{t-1}-x_{t}\rVert_{1}\leq\eta g^{T}_{t-1}x_{t-1}.

We use the bounds for HEDGE tuned for “small losses”, see (Cesa-Bianchi & Lugosi 2006).

Proposition 2.4. Consider x1,,xTΔx_{1},\dotsc,x_{T}\in\Delta^{\ell} the solution produced by HEDGE with learning rate η\eta and denote γ:=1exp(η)\gamma:=1-\exp(-\eta). For any xΔx^{*}\in\Delta^{\ell}, we have

t=1TgtTxtηt=1TgtTx+ln1exp(η)(1+γ)t=1TgtTx+lnγ.\sum_{t=1}^{T}g_{t}^{T}x_{t}\leq\frac{\eta\sum_{t=1}^{T}g_{t}^{T}x^{*}+\ln\ell}{1-\exp(-\eta)}\leq(1+\gamma)\sum_{t=1}^{T}g_{t}^{T}x^{*}+\frac{\ln\ell}{\gamma}.

3 Algorithm for m-Delayed Bandit Access to Heuristics

3.1 Basic Approach and Comparison to Previous Works

Arora et al. 2012 use the following approach to limit the number of switches between arms (or heuristics): split the time horizon into blocks of length τ\tau and use some MAB algorithm to choose a single arm (or heuristic) for each block which is then played during the whole block. The number of switches is then at most T/τT/\tau. This is a common approach to reduce the number of switches, see (Rouyer et al. 2021; Amir et al. 2022; Blum & Mansour 2007). However, this approach does not lead to regret sublinear in OPT0\operatorname{OPT}_{\leq 0} which can be much smaller than TT. In order to have the number of switches T/τo(OPT0)T/\tau\leq o(\operatorname{OPT}_{\leq 0}), we have to choose τ=ω(T/OPT0)\tau=\omega(T/\operatorname{OPT}_{\leq 0}) which can be ω(OPT0)\omega(\operatorname{OPT}_{\leq 0}) for small OPT0\operatorname{OPT}_{\leq 0}. However, with blocks so large, already a single exploration of some arbitrarily bad heuristic would induce a cost of order τω(OPT0)\tau\geq\omega(\operatorname{OPT}_{\leq 0}).

In turn, our algorithm is more similar to the classical MAB algorithm alternating exploration and exploitation steps, see (Slivkins 2019). However, there are three key differences and each of them is necessary to achieve our performance guarantees:

  • • Our algorithm makes improper steps (i.e., steps not taken by any of the heuristics);
  • • We use MTS-style rounding to ensure bounded switching cost instead of independent random choice at each time step;
  • • Exploration steps are not sampled independently since our setting requires m2m\geq 2.

In particular, the last difference leads to more involving analysis. This is because we cannot assume that we have an unbiased estimator of the loss vector and consequently need to do extensive conditioning on past events. Moreover, the cost of only one of the time steps during each exploration phase can be directly charged to the expected loss of the internal full-feedback algorithm. We need to exploit the stability property of the internal full-feedback algorithm in order to relate the costs incurred during the steps of each exploration block.

During each exploitation step tt, our algorithm follows the advice of the exploited heuristic which is sampled from the algorithm’s internal distribution xtx_{t} over the heuristics. Each exploration step tt is set up so that the algorithm discovers the cost of the heuristic HetH_{e_{t}} chosen uniformly at random and updates its distribution over the heuristics. However, the algorithm does not follow HetH_{e_{t}}. Instead, it makes a greedy step from the last known state of the exploited heuristic.

3.2 Description

Let Aˉ\bar{A} be an algorithm for the classical learning from expert advice in full feedback setting (e.g. HEDGE or SHARE), and ϵ\epsilon be a parameter controlling our exploration rate. For each time step t=1,,Tt=1,\dotsc,T, we sample βt{0,1}\beta_{t}\in\{0,1\} such that βt=1\beta_{t}=1 with probability ϵ\epsilon and ete_{t} is chosen uniformly at random from {1,,}\{1,\dotsc,\ell\}. We set β0=0\beta_{0}=0 since the algorithm starts querying predictors from t=1t=1. Moreover, we assume all heuristics reside in s0s_{0} at t=0t=0. If tt is an exploitation step (tXt\in X) and βt=0\beta_{t}=0, the next step will be again exploitation. Otherwise, the algorithm skips mm time steps which are needed to bootstrap the explored heuristic Het+mH_{e_{t+m}} and performs exploration in step t+mt+m. At this latter step, the algorithm receives the cost ft+m(et+m)f_{t+m}(e_{t+m}) of Het+mH_{e_{t+m}} and uses it to update its distribution xt+m+1x_{t+m+1} over the heuristics. This update is performed using the algorithm Aˉ\bar{A} receiving as input a loss vector gt+met+mg_{t+m}^{e_{t+m}} defined as follows: gt+met+m(i)=ft+m(et+m)/2Dg_{t+m}^{e_{t+m}}(i)=f_{t+m}(e_{t+m})/2D if i=et+mi=e_{t+m} and 0 otherwise. Thanks to the assumption that ft+m[0,2D]f_{t+m}\in[0,2D]^{\ell}, we have gt+m[0,1]g_{t+m}\in[0,1]^{\ell}. Each exploration step is followed by an exploitation step. See the summary of this learning dynamics in Algorithm 1. With m=1m=1, up to the scaling of the loss function, this dynamics would correspond to the classical algorithm for MAB which performs exploration with probability ϵ\epsilon and achieves regret O(T2/3)O(T^{2/3}) (Slivkins 2019). Note that our setting requires m2m\geq 2.

Algorithm 1 Learning dynamics

  1. Initialization:
  2. β0:=0\beta_{0}:=0, t:=0t:=0, X:=X:=\emptyset, E:=E:=\emptyset
  3. β1,,βTBernoulli(ϵ)\beta_{1},\dotsc,\beta_{T}\sim\text{Bernoulli}(\epsilon)
  4. e1,,eTU({1,,})e_{1},\dotsc,e_{T}\sim U(\{1,\dotsc,\ell\})
  5. x0x_{0} is chosen by Aˉ\bar{A}
  6. while tTt\leq T do
  7. add tt to XX
  8. // Exploitation step
  9. if βt=1\beta_{t}=1 then
  10. t:=t+mt:=t+m
  11. // Skip mm steps
  12. add tt to EE
  13. // Exploration step
  14. xt+1x_{t+1} chosen by Aˉ\bar{A} after feedback gtetg_{t}^{e_{t}}
  15. t++t++

Now, it is enough to describe how to turn the steps of Algorithm 1 into a solution for the original MTS instance. First, we define xt+1=xtx_{t+1}=x_{t} for any tEt\notin E. At t=1t=1, we sample the exploited heuristic from the distribution x1x_{1} and at each update of xtx_{t}, we switch to a different heuristic with probability 12xt1xt1\frac{1}{2}\lVert x_{t-1}-x_{t}\rVert_{1} using the procedure Round from Proposition 2.2 in order to ensure that, at each time step tt, we are following heuristic ii with probability xt(i)x_{t}(i). The state of the exploited heuristic is not known to us mm steps before each exploitation step and another mm steps after. During these time steps, we make greedy steps from the last known state stits_{t^{\prime}}^{i_{t^{\prime}}} of the heuristic HitH_{i_{t^{\prime}}} exploited at time tt^{\prime}. Namely, we choose st:=argminsM(d(stit,s)+ct(s))s_{t}:=\arg\min_{s\in M}(d(s_{t^{\prime}}^{i_{t^{\prime}}},s)+c_{t}(s)). This procedure is summarized in Algorithm 2.

Algorithm 2 Producing solution for MTS

  1. Input: x0,,xTx_{0},\dotsc,x_{T} produced by Algorithm 1
  2. i0U({1,,})i_{0}\sim U(\{1,\dots,\ell\})
  3. for t=1,,Tt=1,\dotsc,T do
  4. if xtxt1x_{t}\neq x_{t-1} then it ⁣ ⁣ Round(it1,xt1,xt)i_{t}\!\sim\!\text{ Round$(i_{t-1},x_{t-1},x_{t})$}
  5. else it:=it1i_{t}:=i_{t-1}
  6. if stits_{t}^{i_{t}} is known then
  7. go to state st:=stits_{t}:=s_{t}^{i_{t}} and set bt:=stb_{t}:=s_{t}
  8. else /* mm states before and after exploration */
  9. set bt:=bt1b_{t}:=b_{t-1}\quad /* last successful query */
  10. st:=argminsM(d(bt,s)+ct(s))s_{t}:=\arg\min_{s\in M}(d(b_{t},s)+c_{t}(s))

Lemma 3.1. Given x1,,xT[0,1]x_{1},\dotsc,x_{T}\in[0,1]^{\ell} produced by Algorithm 1, the expected cost of Algorithm 2 is at most

(1+O(ϵm2))t=1T(ftTxt+Dxt1xt1).\textstyle\left(1+O\left(\epsilon m^{2}\right)\right)\sum_{t=1}^{T}\left(f_{t}^{T}x_{t}+D\lVert x_{t-1}-x_{t}\rVert_{1}\right).

A similar statement is proved in (Antoniadis et al. 2023a). We include our proof in Appendix A.

Choice of hyperparameters.

To achieve the regret bound in Theorem 3.9, we choose the parameter ϵ:=(Dln)1/3m4/3OPT01/3\epsilon:=(D\ell\ln{\ell})^{1/3}m^{-4/3}\operatorname{OPT}_{\leq 0}^{-1/3} for Algorithm 1 and the learning rate η\eta of HEDGE which is used as Aˉ\bar{A} is chosen based on γ:=(Dln)1/3m2/3OPT01/3\gamma:=(D\ell\ln{\ell})^{1/3}m^{2/3}\operatorname{OPT}_{\leq 0}^{-1/3}, where γ=1exp(η)\gamma=1-\exp(-\eta). While D,,mD,\ell,m are usually known from the problem description, OPT0\operatorname{OPT}_{\leq 0} can be guessed by doubling as described in Appendix D.

3.3 Analysis

We introduce the following random variables which will be useful in our analysis. We define XtX_{t} as an indicator variable such that Xt=1X_{t}=1 if tXt\in X and 0 otherwise. Similarly, EtE_{t} is an indicator of tEt\in E. These variables are determined by β1,,βT\beta_{1},\dotsc,\beta_{T}. We also define gt=Etgtetg_{t}=E_{t}\cdot g_{t}^{e_{t}} which is 0 for any tEt\notin E. We consider a filtration F0F1FT\mathcal{F}_{0}\subseteq\mathcal{F}_{1}\subseteq\dotsb\subseteq\mathcal{F}_{T}, where Ft\mathcal{F}_{t} is a σ\sigma-algebra generated by the realizations of β1,,βt\beta_{1},\dotsc,\beta_{t} and e1,,ete_{1},\dotsc,e_{t}. Note that these realizations determine Xt,Et,gtX_{t^{\prime}},E_{t^{\prime}},g_{t^{\prime}}, and xt+1x_{t^{\prime}+1} for any ttt^{\prime}\leq t. Moreover, we have the following observations.

Observation 3.2. For any t=0,,Tmt=0,\dotsc,T-m, we have Et+m=βtXtE_{t+m}=\beta_{t}X_{t}.

This is because t+mEt+m\in E if and only if tXt\in X and βt=1\beta_{t}=1.

Observation 3.3. For any i=1,,mi=1,\dotsc,m and t=0,,Tit=0,\dotsc,T-i, we have Xt+ij=0i1(1βt+j)XtX_{t+i}\geq\prod_{j=0}^{i-1}(1-\beta_{t+j})X_{t}.

This holds because if Xt=1X_{t}=1 and βt==βt+i1=0\beta_{t}=\dotsb=\beta_{t+i-1}=0, then also Xt+i=1X_{t+i}=1.

Observation 3.4. For i=1,,mi=1,\dotsc,m and t=i,,Tt=i,\dotsc,T, we have E[gtFti]=Etft/(2D)\mathbb{E}[g_{t}\mid\mathcal{F}_{t-i}]=E_{t}f_{t}/(2D\ell).

This follows from E[gtFti]=E[EtgtetFti]=E[βtmXtmgtetFti]=EtE[gtetFti]\mathbb{E}[g_{t}\mid\mathcal{F}_{t-i}]=\mathbb{E}[E_{t}g_{t}^{e_{t}}\mid\mathcal{F}_{t-i}]=\mathbb{E}[\beta_{t-m}X_{t-m}g_{t}^{e_{t}}\mid\mathcal{F}_{t-i}]=E_{t}\cdot\mathbb{E}[g_{t}^{e_{t}}\mid\mathcal{F}_{t-i}].

Using Observation 3.4, we estimate the cost of the optimal solution OPT0\operatorname{OPT}_{\leq 0}.

Lemma 3.5. Let xΔx^{*}\in\Delta^{\ell} be a solution minimizing t=1TftTx\sum_{t=1}^{T}f_{t}^{T}x^{*}. We have

E[t=1TgtTx]ϵ2DOPT0.\mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x^{*}\right]\leq\frac{\epsilon}{2D\ell}\operatorname{OPT}_{\leq 0}.

Proof. By Observation 3.4, we have

E[gtTx]=E[E[gtTxFt1]]=E[Et2DftTx]=E[βtm]2DE[XtmftTx]ϵ2DftTx\begin{aligned}\mathbb{E}[g_{t}^{T}x^{*}] \\ =\mathbb{E}\left[\mathbb{E}\left[g_{t}^{T}x^{*}\mid\mathcal{F}_{t-1}\right]\right]=\mathbb{E}\left[\frac{E_{t}}{2D\ell}f_{t}^{T}x^{*}\right] \\ =\frac{\mathbb{E}[\beta_{t-m}]}{2D\ell}\mathbb{E}[X_{t-m}f_{t}^{T}x^{*}]\leq\frac{\epsilon}{2D\ell}f_{t}^{T}x^{*}\end{aligned}

for each t=1,,Tt=1,\dotsc,T. Summing over tt, we get

E[t=1TgtTx]ϵ2Dt=1TftTx=ϵ2DOPT0.  \mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x^{*}\right]\leq\frac{\epsilon}{2D\ell}\sum_{t=1}^{T}f_{t}^{T}x^{*}=\frac{\epsilon}{2D\ell}\operatorname{OPT}_{\leq 0}.\;\square

The next lemma will be used to bound the costs perceived by Algorithm 1 at time steps tt such that Xtm=1X_{t-m}=1.

Lemma 3.6. For each i=0,,mi=0,\dotsc,m, we have

E[t=m+1TgtTxt]=ϵ2DE[t=m+1TftTxtiXtm].\mathbb{E}\left[\sum_{t=m+1}^{T}g_{t}^{T}x_{t}\right]=\frac{\epsilon}{2D\ell}\mathbb{E}\left[\sum_{t=m+1}^{T}f_{t}^{T}x_{t-i}X_{t-m}\right].

Proof. For t=m+1,,Tt=m+1,\dotsc,T, we have

E[gtTxt]=E[E[gtTFt1]xt]=E[Et2DftTxt]=E[βtm]2DE[ftTxtXtm],\begin{aligned}\mathbb{E}[g_{t}^{T}x_{t}] \\ =\mathbb{E}\left[\mathbb{E}\left[g_{t}^{T}\mid\mathcal{F}_{t-1}\right]x_{t}\right]=\mathbb{E}\left[\frac{E_{t}}{2D\ell}f_{t}^{T}x_{t}\right] \\ =\frac{\mathbb{E}[\beta_{t-m}]}{2D\ell}\mathbb{E}[f_{t}^{T}x_{t}X_{t-m}],\end{aligned}

where the second equality follows from Observation 3.4. To finish the proof, it is enough to note that E[βtm]=ϵ\mathbb{E}[\beta_{t-m}]=\epsilon and xtXtm=xtiXtmx_{t}X_{t-m}=x_{t-i}X_{t-m} for any i=0,,mi=0,\dotsc,m. ∎

Bounding costs in time steps tt when Xtm=0X_{t-m}=0 is more involving. In such case, there is Eti=1E_{t-i}=1 for some i{1,,m}i\in\{1,\dotsc,m\}. We will use the following stability property.

Lemma 3.7. If Aˉ\bar{A} satisfies Property 2.3, the following holds for every tm+1t\geq m+1 and i{1,,m}i\in\{1,\dotsc,m\}:

E[ftTxtEti]E[ftTxtiEti]+ηE[ftiTxtiEti].\mathbb{E}[f_{t}^{T}x_{t}E_{t-i}]\leq\mathbb{E}[f_{t}^{T}x_{t-i}E_{t-i}]+\frac{\eta}{\ell}\mathbb{E}[f_{t-i}^{T}x_{t-i}E_{t-i}].

Proof of Lemma 3.7. We use the Cauchy-Schwarz inequality and Property 2.3:

E[ftTxtEti]=E[(ftT(xtxti)+ftTxti)Eti]E[(ftxtxti1+ftTxti)Eti]ηE[ftiTxtiEti]+E[ftTxtiEti].\begin{aligned}\mathbb{E}[f_{t}^{T}x_{t}E_{t-i}] \\ =\mathbb{E}[(f_{t}^{T}(x_{t}-x_{t-i})+f_{t}^{T}x_{t-i})E_{t-i}] \\ \leq E[(\lVert f_{t}\rVert_{\infty}\lVert x_{t}-x_{t-i}\rVert_{1}+f_{t}^{T}x_{t-i})E_{t-i}] \\ \leq\frac{\eta}{\ell}\mathbb{E}[f_{t-i}^{T}x_{t-i}E_{t-i}]+\mathbb{E}[f_{t}^{T}x_{t-i}E_{t-i}].\end{aligned}

The last inequality follows from ft2D\lVert f_{t}\rVert_{\infty}\leq 2D and the following computation. Here, we use xti+1=xtx_{t-i+1}=x_{t} whenever Eti=1E_{t-i}=1, Property 2.3, xtix_{t-i} and EtiE_{t-i} depending only on time steps up to ti1t-i-1, and Observation 3.4:

E[xtxti1Eti]=E[xti+1xti1Eti]E[ηgtiTxtiEti]=E[E[ηgtiTFti1]xtiEti]=η2DE[ftiTxtiEti].  \begin{aligned}\mathbb{E}[\lVert x_{t}-x_{t-i}\rVert_{1}\cdot E_{t-i}] \\ =\mathbb{E}[\lVert x_{t-i+1}-x_{t-i}\rVert_{1}\cdot E_{t-i}] \\ \leq\mathbb{E}[\eta g_{t-i}^{T}x_{t-i}E_{t-i}] \\ =\mathbb{E}\left[\mathbb{E}\left[\eta g_{t-i}^{T}\mid\mathcal{F}_{t-i-1}\right]x_{t-i}E_{t-i}\right] \\ =\frac{\eta}{2D\ell}\mathbb{E}[f_{t-i}^{T}x_{t-i}E_{t-i}].\;\square\end{aligned}

The following lemma is the core of our argument. In the proof, it decomposes the costs perceived by Algorithm 1 in each step tt depending on the value of XtmX_{t-m}. If Xtm=1X_{t-m}=1, such costs are easy to bound using Lemma 3.6. Those with Xtm=0X_{t-m}=0 need to be charged to some other exploitation step using the preceding stability lemma.

Lemma 3.8. If Aˉ\bar{A} satisfies Property 2.3 then E[t=1TftTxt]\mathbb{E}\big[\sum_{t=1}^{T}f_{t}^{T}x_{t}\big] is at most

2m+(1+mϵ(1ϵ)m+mηϵ)2DϵE[t=1TgtTxt].2m+\big(1+\frac{m\epsilon}{(1-\epsilon)^{m}}+\frac{m\eta\epsilon}{\ell}\big)\cdot\frac{2D\ell}{\epsilon}\mathbb{E}\big[\sum_{t=1}^{T}g_{t}^{T}x_{t}\big].

Proof. We start with an observation that for any tm+1t\geq m+1, exactly one of the following holds: either Xtm=1X_{t-m}=1 or the step tmt-m is skipped due to the exploration at time tit-i (i.e., Eti=1E_{t-i}=1) for some i1,,mi\in 1,\dotsc,m. We can write

E[t=1TftTxt]2m+E[t=2m+1TftTxtXtm]+i=1mE[t=2m+1TftTxtEti].\begin{aligned}\mathbb{E}\big[\sum_{t=1}^{T}f_{t}^{T}x_{t}\big]\leq 2m \\ +\mathbb{E}\big[\sum_{t=2m+1}^{T}f_{t}^{T}x_{t}\cdot X_{t-m}\big] \\ +\sum_{i=1}^{m}\mathbb{E}\big[\sum_{t=2m+1}^{T}f_{t}^{T}x_{t}\cdot E_{t-i}\big].\end{aligned}

By Lemma 3.6, the first expectation in the right-hand side is at most 2DϵE[t=1TgtTxt]\frac{2D\ell}{\epsilon}\mathbb{E}[\sum_{t=1}^{T}g_{t}^{T}x_{t}]. In order to prove the lemma, it is therefore enough to show that, for each i=1,,mi=1,\dotsc,m, E[t=2m+1TftTxtEti]\mathbb{E}\big[\sum_{t=2m+1}^{T}f_{t}^{T}x_{t}\cdot E_{t-i}\big] is at most

(ϵ(1ϵ)m+ηϵ)2DϵE[t=1TgtTxt].\bigg(\frac{\epsilon}{(1-\epsilon)^{m}}+\frac{\eta\epsilon}{\ell}\bigg)\cdot\frac{2D\ell}{\epsilon}\mathbb{E}\big[\sum_{t=1}^{T}g_{t}^{T}x_{t}\big].

First, we use Lemma 3.7 to obtain

t=2m+1TE[ftTxtEti]t=2m+1TE[ftTxtiEti]+ηt=2m+1TE[ftiTxtiEti].\begin{aligned}\sum_{t=2m+1}^{T}\mathbb{E}[f_{t}^{T}x_{t}E_{t-i}]\leq \\ \sum_{t=2m+1}^{T}\mathbb{E}[f_{t}^{T}x_{t-i}E_{t-i}] \\ +\frac{\eta}{\ell}\sum_{t=2m+1}^{T}\mathbb{E}[f_{t-i}^{T}x_{t-i}E_{t-i}].\end{aligned}

The second term is easy to bound: by Observation 3.2, we have E[ftiTxtiEti]=E[βtim]E[ftiTxtiXtim]\mathbb{E}[f_{t-i}^{T}x_{t-i}E_{t-i}]=\mathbb{E}[\beta_{t-i-m}]\,\mathbb{E}[f_{t-i}^{T}x_{t-i}X_{t-i-m}]. Therefore, we can write

ηt=2m+1TE[ftiTxtiEti]ηϵt=m+1TE[ftTxtXtm].\frac{\eta}{\ell}\sum_{t=2m+1}^{T}\mathbb{E}[f_{t-i}^{T}x_{t-i}E_{t-i}]\leq\frac{\eta\epsilon}{\ell}\sum_{t=m+1}^{T}\mathbb{E}[f_{t}^{T}x_{t}X_{t-m}].

Using Observation 3.2, independence of XtimX_{t-i-m} and βtjm\beta_{t-j-m} for j=1,,ij=1,\dotsc,i, and Observation 3.3, we get

t=2m+1TE[ftTxtiEti](1ϵ)i= ⁣ ⁣ ⁣ ⁣ ⁣t=2m+1T ⁣ ⁣ ⁣ ⁣E[βtim]E[ftTxtiXtim]E[j=1i(1 ⁣ ⁣βtjm)] ⁣ ⁣ ⁣ ⁣ ⁣t=2m+1T ⁣ ⁣ ⁣E[βtim]E[ftT ⁣xtiXtm].\begin{aligned}\sum_{t=2m+1}^{T}\mathbb{E}[f_{t}^{T}x_{t-i}E_{t-i}]\,(1-\epsilon)^{i} \\ =\!\!\!\!\!\sum_{t=2m+1}^{T}\!\!\!\!\mathbb{E}[\beta_{t-i-m}]\,\mathbb{E}[f_{t}^{T}x_{t-i}X_{t-i-m}]\,\mathbb{E}\bigg[\prod_{j=1}^{i}(1\!-\!\beta_{t-j-m})\bigg] \\ \leq\!\!\!\!\!\sum_{t=2m+1}^{T}\!\!\!\mathbb{E}[\beta_{t-i-m}]\,\mathbb{E}[f_{t}^{T}\!x_{t-i}X_{t-m}].\end{aligned}

In other words, we can bound the first term of (2) as

t=2m+1T ⁣ ⁣ ⁣ ⁣E[ftTxtiEti]ϵ(1ϵ)it=2m+1T ⁣ ⁣ ⁣ ⁣E[ftTxtiXtm].\sum_{t=2m+1}^{T}\!\!\!\!\mathbb{E}[f_{t}^{T}x_{t-i}E_{t-i}]\leq\frac{\epsilon}{(1-\epsilon)^{i}}\sum_{t=2m+1}^{T}\!\!\!\!\mathbb{E}[f_{t}^{T}x_{t-i}X_{t-m}].

Now it is enough to apply Lemma 3.6 to the right-hand sides of (4) and (3). Equation (2) then implies (1) which concludes the proof. ∎

Theorem 3.9. Algorithm 2 using HEDGE as Aˉ\bar{A} with mm-delayed bandit access to \ell heuristics on any MTS input instance with diameter DD such that Dmo(OPT01/3)D\ell m\leq o(\operatorname{OPT}_{\leq 0}^{1/3}) satisfies the following regret bound:

E[ALG]OPT0+O((Dln)1/3m2/3OPT02/3).\mathbb{E}[\operatorname{ALG}]\leq\operatorname{OPT}_{\leq 0}+O\big((D\ell\ln\ell)^{1/3}m^{2/3}\operatorname{OPT}_{\leq 0}^{2/3}\big).

Proof. By Lemma 3.1, E[ALG]\mathbb{E}[\operatorname{ALG}] is at most

(1+O(m2ϵ))(t=1TE[ftTxt]+t=1TE[Dxt1xt1]).(1+O(m^{2}\epsilon))\bigg(\sum_{t=1}^{T}\mathbb{E}[f_{t}^{T}x_{t}]+\sum_{t=1}^{T}\mathbb{E}[D\lVert x_{t-1}-x_{t}\rVert_{1}]\bigg).

The first term in the parenthesis can be bounded using Lemma 3.8. The second term can be bounded using Property 2.3: denoting η\eta the learning rate of Aˉ\bar{A}, we have

t=1TE[Dxt1xt1]Dηt=1TE[gtTxt].\sum_{t=1}^{T}\mathbb{E}[D\lVert x_{t-1}-x_{t}\rVert_{1}]\leq D\eta\sum_{t=1}^{T}\mathbb{E}[g_{t}^{T}x_{t}].

Altogether, using (1ϵ)m>1/2(1-\epsilon)^{m}>1/2 and Dηmϵη2DϵD\eta\leq m\epsilon\cdot\eta\cdot\frac{2D\ell}{\epsilon}, we get that E[ALG]\mathbb{E}[\operatorname{ALG}] is at most

(1 ⁣+ ⁣O(m2ϵ))(2m+(1 ⁣+ ⁣O(mϵ)(1 ⁣+ ⁣η))2Dϵt=1TE[gtT ⁣xt]).\big(1\!+\!O(m^{2}\epsilon)\big)\bigg(2m+\big(1\!+\!O(m\epsilon)(1\!+\!\eta)\big)\frac{2D\ell}{\epsilon}\sum_{t=1}^{T}\mathbb{E}[g_{t}^{T}\!x_{t}]\bigg).

Now we use the regret bound of Aˉ\bar{A} (Proposition 2.4). Let HiH_{i^{*}} be the best heuristic and x[0,1]x^{*}\in[0,1]^{\ell} be the vector such that x(i)=1x^{*}(i^{*})=1 and x(i)=0x^{*}(i)=0 for every iii\neq i^{*}. We have

2Dϵt=1TE[gtTxt](1+γ)2Dϵt=1TE[gtTx]+2Dlnϵγ(1+γ)OPT0+2Dlnϵγ,\begin{aligned}\frac{2D\ell}{\epsilon}\sum_{t=1}^{T}\mathbb{E}[g_{t}^{T}x_{t}] \\ \leq(1+\gamma)\frac{2D\ell}{\epsilon}\sum_{t=1}^{T}\mathbb{E}[g_{t}^{T}x^{*}]+\frac{2D\ell\ln\ell}{\epsilon\gamma} \\ \leq(1+\gamma)\operatorname{OPT}_{\leq 0}+\frac{2D\ell\ln\ell}{\epsilon\gamma},\end{aligned}

where the second inequality used Lemma 5.2. In total, E[ALG]\mathbb{E}[\operatorname{ALG}] is at most

OPT0+O(m2ϵ+γ+m2ϵγ)OPT0+O(2Dlnϵγ).\operatorname{OPT}_{\leq 0}+O(m^{2}\epsilon+\gamma+m^{2}\epsilon\gamma)\operatorname{OPT}_{\leq 0}+O\bigg(\frac{2D\ell\ln\ell}{\epsilon\gamma}\bigg).

It is enough to choose ϵ:=(Dln)1/3m4/3OPT01/3\epsilon:=(D\ell\ln{\ell})^{1/3}m^{-4/3}\operatorname{OPT}_{\leq 0}^{-1/3} and γ:=(Dln)1/3m2/3OPT01/3\gamma:=(D\ell\ln{\ell})^{1/3}m^{2/3}\operatorname{OPT}_{\leq 0}^{-1/3} to get the desired bound. ∎

4 Tight Lower Bound: Proof of Theorem 1.3

In this section, we prove a lower bound matching Theorem 3.9. Our proof is based on the construction of Dekel et al. 2013 for Bandits with Switching Costs, which is a special case of Bandit Learning against a 11-Memory Bounded Adversary. In order to use their construction in our setting, we need to address additional challenges due to the algorithm having more power in our setting:

  1. 1. The algorithm can see the full MTS input instance as it arrives online, and therefore it can take actions on its own regardless of the advice of the queried heuristic.
  2. 2. The algorithm (as it is common in MTS setting) has 11-step lookahead, i.e., it observes the cost function ctc_{t} first and only then chooses the state sts_{t}.

Note that both properties are indispensable in our model, see Section 2, and any non-trivial positive result would be impossible without them.

We create an MTS input instance circumventing the advantages of the algorithm mentioned above. Our instance is generated at random and is oblivious to the construction of Dekel et al. 2013. However, we make a correspondence between the timeline in our MTS instance and in their Bandit instance: our instance consists of blocks of length three, where each block corresponds to a single time step in their Bandit instance. The construction of Dekel et al. 2013 itself comes into play when generating the solutions of the heuristics. We create these solutions in such a way that the cost of the heuristic HiH_{i} can be related to the cost of the iith arm in (Dekel et al. 2013). Moreover, the state of HiH_{i} depends only on the loss of the iith arm at given time.

Proposition 4.1 (Dekel et al. 2013). There is a stochastic instance 1,,T\ell_{1},\dotsc,\ell_{T} of Bandits with Switching Costs such that the expected regret of any deterministic algorithm producing solution i1,,iT[]i_{1},\dotsc,i_{T}\in[\ell] is

E[t=1T(t(it)+1(itit1))]mini[]t=1Tt(i)Ω~(13T23).\mathbb{E}\big[\sum_{t=1}^{T}(\ell_{t}(i_{t})+\mathbf{1}(i_{t}\neq i_{t-1}))\big]-\min_{i\in[\ell]}\sum_{t=1}^{T}\ell_{t}(i)\geq\tilde{\Omega}(\ell^{\frac{1}{3}}T^{\frac{2}{3}}).

Description of the MTS instance.

The metric space MM consists of \ell parts M1,,MM_{1},\dotsc,M_{\ell}, where Mi={ri,ai,bi}M_{i}=\{r_{i},a_{i},b_{i}\}. The distances are chosen as follows: For jij\neq i, we have d(ri,rj)=1d(r_{i},r_{j})=1, d(ri,aj)=d(ri,bj)=2d(r_{i},a_{j})=d(r_{i},b_{j})=2, and d(ri,ai)=d(ri,bi)=1d(r_{i},a_{i})=d(r_{i},b_{i})=1. We have d(ai,bj)=2d(a_{i},b_{j})=2 if i=ji=j and 3 otherwise. See Figure 1 for an illustration.

Metric graph illustrating a metrical task system with two heuristic paths.
Figure 1: With ℓ=2, M is the metric closure of this graph.

The input sequence consists of blocks of length three. We choose the cost functions in block jj as follows. For i=1,,i=1,\dotsc,\ell, we choose σji{ai,bi}\sigma_{j}^{i}\in\{a_{i},b_{i}\} uniformly at random. For the first step of the block jj, we define the cost function cj(s)c_{j}^{\prime}(s) such that cj(s)=0c_{j}^{\prime}(s)=0 if s{r1,,r}s\in\{r_{1},\dotsc,r_{\ell}\} and cj(s)=+c_{j}^{\prime}(s)=+\infty otherwise. In the second time step, we issue cj(s)=+c_{j}^{\prime\prime}(s)=+\infty if s{r1,,r}s\in\{r_{1},\dotsc,r_{\ell}\} and cj(s)=0c_{j}^{\prime\prime}(s)=0 otherwise. In the third time step, we issue cj(s)=0c_{j}^{\prime\prime\prime}(s)=0 if s{σj1,,σj}s\in\{\sigma_{j}^{1},\dotsc,\sigma_{j}^{\ell}\} and cj(s)=+c_{j}^{\prime\prime\prime}(s)=+\infty otherwise4.

Here is the intuition behind this construction. During block jj, any reasonable algorithm stays in s{r1,,r}s^{\prime}\in\{r_{1},\dotsc,r_{\ell}\} in the first step and in s{σj1,,σj}s^{\prime\prime\prime}\in\{\sigma_{j}^{1},\dotsc,\sigma_{j}^{\ell}\} in the third step. Ideally, the algorithm would move to ss^{\prime\prime\prime} already in the second step. However, it does not yet know σj1,,σj\sigma_{j}^{1},\dotsc,\sigma_{j}^{\ell} and therefore needs the advice of the heuristics. In the first step of each block, the algorithm pays 1 if it is staying in the same part MiM_{i} of the metric space (for returning to rir_{i}). If it is moving from MjM_{j} to MiM_{i}, it has to pay 2, i.e., an additional unit cost.

Description of the heuristics.

For each ii, the heuristic HiH_{i} remains in MiM_{i} throughout the whole input instance. In the first step of the block tt, it moves to the state rir_{i}. In the third step, it moves to σti\sigma_{t}^{i}. Its position in the second step is derived from the Bandit instance. With probability (1t(i)2)(1-\frac{\ell_{t}(i)}{2}), it is σti\sigma_{t}^{i}, and with probability t(i)2\frac{\ell_{t}(i)}{2} it is the other point, i.e., {ai,bi}{σti}\{a_{i},b_{i}\}\setminus\{\sigma_{t}^{i}\}. In the block tt, the heuristic HiH_{i} pays 22 for the movements in the steps 1 and 2 and, with probability t(i)2\frac{\ell_{t}(i)}{2}, another 2 for the movement in the step 3. Therefore, we have the following observation.

Observation 4.2. The expected cost of the heuristic HiH_{i} is equal to 2T+t=1Tt(i)2T+\sum_{t=1}^{T}\ell_{t}(i).

We consider the following special class of algorithms for our MTS instance called tracking algorithms. This class has two important properties: firstly, any algorithm on our MTS instance can easily be converted to a tracking algorithm without increasing its cost. Secondly, solutions produced by tracking algorithms can be naturally converted online to the problem of Bandits with Switching Cost.

Definition 4.3. Consider an algorithm AA with a bandit access to heuristics H1,,HH_{1},\dotsc,H_{\ell}. We say that AA is a tracking algorithm if, while processing the MTS instance described above, satisfies the following condition in every block. Let HiH_{i} be the heuristic queried in the second step. Then the algorithm resides in MiM_{i} during the whole block and moves to the state of HiH_{i} in its second step.

Lemma 4.4. Any algorithm AA with bandit access to H1,,HH_{1},\dotsc,H_{\ell} can be converted to a tracking algorithm Aˉ\bar{A} without increasing its expected cost.

Proof. Consider a block such that the algorithm AA moves to another part of MM in the second step. The cost functions in the first two steps are deterministic, so we can simulate what part the algorithm would go to in the second step and move there already in the first step for the same cost.

Consider a block such that the algorithm moves to another part of MM in the third step, i.e., moves from s{ai,bi}s\in\{a_{i},b_{i}\} to s{aj,bj}s^{\prime}\in\{a_{j},b_{j}\}. This costs 3 in the third step and the subsequent move to rjr_{j} in the beginning of the next block will cost 11. Instead, staying in MiM_{i} costs at most 2 in the third step and moving to rjr_{j} in the beginning of the next block will cost 2.

Therefore, we can make sure that the algorithm moves between different parts of MM only in the first step of each block.

Consider the step 2 of block tt where AA queries the state stis_{t}^{i} of HiH_{i}. If AA moves to s{aj,bj}s\in\{a_{j},b_{j}\}, where jij\neq i, its expected cost will be at least 1, since σtj\sigma_{t}^{j} is chosen from {aj,bj}\{a_{j},b_{j}\} uniformly at random.

If AA moves to s{ai,bi}{sti}s\in\{a_{i},b_{i}\}\setminus\{s_{t}^{i}\}, Then the expected cost of AA in step 3 will be

(1t(i)2)2=2t(i)1t(i)=2t(i)2,\left(1-\frac{\ell_{t}(i)}{2}\right)2=2-\ell_{t}(i)\geq 1\geq\ell_{t}(i)=2\frac{\ell_{t}(i)}{2},

where the right-hand side corresponds to the cost of algorithm Aˉ\bar{A} which moves to stis_{t}^{i} instead. ∎

Lemma 4.5. Consider a tracking algorithm AA. For each block tt, define iti_{t} such that AA is located at stits_{t}^{i_{t}} in its second step. The expected cost of AA is 2T+t=1Tt(it)+t=1T1(itit1)2T+\sum_{t=1}^{T}\ell_{t}(i_{t})+\sum_{t=1}^{T}1(i_{t}\neq i_{t-1}).

Proof. In each block t=1,,Tt=1,\dotsc,T, the algorithm pays 2+1(itit1)2+\mathbf{1}(i_{t}\neq i_{t-1}) in the first two steps. In the third step, it pays 2 only if stitσtits_{t}^{i_{t}}\neq\sigma_{t}^{i_{t}} which happens with probability t(it)2\frac{\ell_{t}(i_{t})}{2}. ∎

Theorem 1.3 is derived from the following statement by Yao’s principle and from the fact that we can pad the constructed instance with zero cost vectors to get an input instance of length higher than OPT0\operatorname{OPT}_{\leq 0}.

Theorem 4.6. There is a stochastic instance II of MTS of length 3T3T with heuristics H1,,HH_{1},\dotsc,H_{\ell} such that any deterministic algorithm with bandit access to H1,,HH_{1},\dotsc,H_{\ell} suffers expected regret at least Ω~(1/3T2/3)\tilde{\Omega}(\ell^{1/3}T^{2/3}).

Proof. Let II be the input instance constructed above from 1,,T\ell_{1},\dotsc,\ell_{T} in Proposition 4.1. Consider a fixed deterministic algorithm AA. Firstly, we consider queries made by AA. The queries in the first and the third step of each block have a trivial answer which are independent of the loss sequence 1,,T\ell_{1},\dotsc,\ell_{T}: if AA queries HiH_{i}, then the answers are rir_{i} and σti\sigma_{t}^{i} respectively. For each block t=1,,Tt=1,\dotsc,T, we denote iti_{t} the heuristic queried in its second step. Note that the result of the query depends only on t(it)\ell_{t}(i_{t}).

We can assume that AA is tracking, since making it tracking would only decrease its expected cost. Therefore, the expected cost of AA can be written as

t=1TE[1(itit1)+2+21(stitσti)]=2T+t=1TE[1(itit1)+2E[1(stitσti)t(it)]]=2T+t=1TE[1(itit1)+t(it)].\begin{aligned}\sum_{t=1}^{T}\mathbb{E}\big[\mathbf{1}(i_{t}\neq i_{t-1})+2+2\cdot\mathbf{1}(s_{t}^{i_{t}}\neq\sigma_{t}^{i})\big] \\ =2T+\sum_{t=1}^{T}\mathbb{E}\bigg[\mathbf{1}(i_{t}\neq i_{t-1})+2\mathbb{E}[\mathbf{1}(s_{t}^{i_{t}}\neq\sigma_{t}^{i})\mid\ell_{t}(i_{t})]\bigg] \\ =2T+\sum_{t=1}^{T}\mathbb{E}[\mathbf{1}(i_{t}\neq i_{t-1})+\ell_{t}(i_{t})].\end{aligned}

Let HiH_{i^{*}} denote the best heuristic. Using Observation 4.2, the regret of AA with respect to HiH_{i^{*}} is equal to

t=1TE[1(itit1)+t(it)]t=1TE[t(i)].\sum_{t=1}^{T}\mathbb{E}[\mathbf{1}(i_{t}\neq i_{t-1})+\ell_{t}(i_{t})]-\sum_{t=1}^{T}\mathbb{E}[\ell_{t}(i^{*})].

This is equal to the expected regret of the strategy playing arms i1,,iTi_{1},\dotsc,i_{T} on the sequence 1,,T\ell_{1},\dotsc,\ell_{T}. By Proposition 4.1, this regret is at least Ω~(1/3T2/3)\tilde{\Omega}(\ell^{1/3}T^{2/3}). ∎

4.1 Tight dependence on parameters k and D

We elaborate on the asymptotic dependence on kk and DD for the lower bound with 22-delayed exploration starting from the construction in Section 4.

The optimality of the dependence on DD can be seen from scaling. If we scale the input instance in Theorem 4.6 by a factor DD, i.e. we multiply all distances in the metric space and all cost vectors by DD, the cost of any algorithm including OPT0\operatorname{OPT}_{\leq 0} will be scaled by DD. Therefore, the lower bound in Therorem 4.6 becomes

DE[ALG]DOPT0+DΩ~(1/3OPT02/3)=OPT0+D1/3Ω~(1/3(OPT0)2/3),D\cdot\mathbb{E}[\operatorname{ALG}]\leq D\operatorname{OPT}_{\leq 0}+D\tilde{\Omega}(\ell^{1/3}\operatorname{OPT}_{\leq 0}^{2/3})=\operatorname{OPT}_{\leq 0}^{\prime}+D^{1/3}\tilde{\Omega}(\ell^{1/3}(\operatorname{OPT}_{\leq 0}^{\prime})^{2/3}),

where OPT0=OPT0\operatorname{OPT}_{\leq 0}^{\prime}=\operatorname{OPT}_{\leq 0} is the new value after the scaling.

Now, we show tightness of kk in Theorem 1.2.

Theorem 4.7. There exists a stochastic instance II of MTS of length 3T3T with heuristics H1,,HH_{1},\dotsc,H_{\ell} such that any deterministic algorithm with bandit access to H1,,HH_{1},\dotsc,H_{\ell} suffers expected regret at least Ω~((k)1/3T2/3)\tilde{\Omega}((k\ell)^{1/3}T^{2/3}).

Proof. Let ALG\operatorname{ALG} be any deterministic algorithm for MTS with bandit access to H1,,HH_{1},\dots,H_{\ell}. We assume without loss of generality that there exists τN\tau\in\mathbb{N} multiple of 33 such that 3T=kτ3\cdot T=k\cdot\tau. We split the time horizon into kk segments of size τ\tau. By Theorem 4.6, for each j[k]j\in[k] we have

E[t=τ(j1)+1τj(ftTxt+d(xt,xt1))]c(Hj)+Ω(()1/3τ2/3),\mathbb{E}\left[\sum_{t=\tau(j-1)+1}^{\tau j}\left(f_{t}^{T}x_{t}+d(x_{t},x_{t-1})\right)\right]\geq c(H_{j}^{*})+\Omega((\ell)^{1/3}\tau^{2/3}),

where c(Hj)c(H_{j}^{*}) represents the cost of the best heuristic in the segment jj. It follows that

E[ALG]j=1kc(Hj)+Ω(k1/3τ2/3)OPTk+Ω((k)1/3T2/3).  \begin{aligned}\mathbb{E}[\operatorname{ALG}] \\ \geq\sum_{j=1}^{k}c(H_{j}^{*})+\Omega(k\ell^{1/3}\tau^{2/3}) \\ \geq\operatorname{OPT}_{\leq k}+\Omega((k\ell)^{1/3}T^{2/3}).\;\square\end{aligned}

5 Upper Bound for m-Delayed Bandit Access to Heuristics against OPT≤k

In what follows, we prove an upper bound for Algorithm 1 using SHARE as Aˉ\bar{A} against OPTk\operatorname{OPT}_{\leq k}.

Firstly, SHARE satisfies the following performance bound found in (Cesa-Bianchi & Lugosi 2006).

Proposition 5.1. Consider x1,,xT[0,1]x_{1},\dotsc,x_{T}\in[0,1]^{\ell} the solution produced by SHARE with learning rate η\eta, sharing parameter α\alpha, and denote γ:=1exp(η)\gamma:=1-\exp(-\eta). For any solution i1,,iTi_{1},\dotsc,i_{T} such that the number of time steps where it1iti_{t-1}\neq i_{t} is at most kk, we have

t=1TgtTxtln11γγ(1α)t=1Tgt(it)+kln(/α)γ(1α).\sum_{t=1}^{T}g_{t}^{T}x_{t}\leq\frac{\ln{\frac{1}{1-\gamma}}}{\gamma(1-\alpha)}\sum_{t=1}^{T}g_{t}(i_{t})+k\frac{\ln{(\ell/\alpha)}}{\gamma(1-\alpha)}.

The following is a generalization of Lemma 3.5 that holds for k0k\geq 0.

Lemma 5.2. Consider k0k\geq 0. Let i1,,iT[]i_{1},\dotsc,i_{T}\in[\ell] be a solution minimizing t=1T(ct(stit)+d(st1it1,stit))\sum_{t=1}^{T}\big(c_{t}(s_{t}^{i_{t}})+d(s_{t-1}^{i_{t-1}},s_{t}^{i_{t}})\big) such that it1iti_{t-1}\neq i_{t} holds in at most kk time steps tt. For each tt, we define xt[0,1]x_{t}\in[0,1]^{\ell} such that xt(it)=1x_{t}(i_{t})=1 and xt(i)=0x_{t}(i)=0 for each iiti\neq i_{t}. We have

E[t=1TgtTxt]ϵk2+ϵ2DOPTk.\mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x_{t}\right]\leq\frac{\epsilon k}{2\ell}+\frac{\epsilon}{2D\ell}OPT_{\leq k}.

Proof. By Observation 3.4, we have

E[gtTxt]=E[E[gtTxtFt1]]=E[Et2DftTxt]=ϵ2DE[XtmftTxt]ϵ2DftTxt\begin{aligned}\mathbb{E}[g_{t}^{T}x_{t}] \\ =\mathbb{E}\left[\mathbb{E}\left[g_{t}^{T}x_{t}\mid\mathcal{F}_{t-1}\right]\right]=\mathbb{E}\left[\frac{E_{t}}{2D\ell}f_{t}^{T}x_{t}\right] \\ =\frac{\epsilon}{2D\ell}\mathbb{E}[X_{t-m}f_{t}^{T}x_{t}]\leq\frac{\epsilon}{2D\ell}f_{t}^{T}x_{t}\end{aligned}

for each t=1,,Tt=1,\dotsc,T. Let δt:=d(st1it,stit)d(st1it1,stit)D\delta_{t}:=d(s_{t-1}^{i_{t}},s_{t}^{i_{t}})-d(s_{t-1}^{i_{t-1}},s_{t}^{i_{t}})\leq D. Summing over tt, we get

E[t=1TgtTxt]ϵ2Dt=1TftTxt=ϵ2Dt=1T(ct(stit)+d(st1it1,stit)+δt)ϵ2D(OPTk+kD),\begin{aligned}\mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x_{t}\right] \\ \leq\frac{\epsilon}{2D\ell}\sum_{t=1}^{T}f_{t}^{T}x_{t} \\ =\frac{\epsilon}{2D\ell}\sum_{t=1}^{T}\left(c_{t}(s_{t}^{i_{t}})+d(s_{t-1}^{i_{t-1}},s_{t}^{i_{t}})+\delta_{t}\right) \\ \leq\frac{\epsilon}{2D\ell}\left(\operatorname{OPT}_{\leq k}+kD\right),\end{aligned}

since δt>0\delta_{t}>0 for at most kk time steps. ∎

We are now ready to prove the following upper bound.

Theorem 5.3. Algorithm 2 with SHARE as Aˉ\bar{A} and mm-delayed bandit access to \ell heuristics on any MTS instance with diameter DD with offline optimum cost at least 2k2k such that Dmo(OPTk1/3)D\ell m\leq o(\operatorname{OPT}_{\leq k}^{1/3}) achieves Regk(ALG)\operatorname{Reg}_{k}(\operatorname{ALG}) at most

O((Dk)1/3m2/3OPTk2/3ln1/3(OPTk)2/3(Dk)2/3m4/3).O\left((D\ell k)^{1/3}m^{2/3}\operatorname{OPT}_{\leq k}^{2/3}\ln\frac{{\ell}^{1/3}(\operatorname{OPT}_{\leq k})^{2/3}}{(Dk)^{2/3}m^{4/3}}\right).

Proof. Let Hi1,,HiTH_{i_{1}^{*}},\dots,H_{i_{T}^{*}} be the sequence of optimal heuristics such that itit+1i_{t}^{*}\neq i_{t+1}^{*} for at most kk indices t[T1]t\in[T-1]. Then we define xt[0,1]x_{t}^{*}\in[0,1]^{\ell} such that xt(it)=1x_{t}^{*}(i_{t}^{*})=1 and xt(i)=0x_{t}^{*}(i)=0 for iiti\neq i_{t}^{*}.

Proceeding analogously to the proof of Theorem 3.9 we have

E[ALG](1 ⁣+ ⁣O(m2ϵ))(2m+(1 ⁣+ ⁣O(mϵ)(1 ⁣+ ⁣η))2Dϵt=1TE[gtT ⁣xt]).\mathbb{E}[\operatorname{ALG}]\leq\big(1\!+\!O(m^{2}\epsilon)\big)\bigg(2m+\big(1\!+\!O(m\epsilon)(1\!+\!\eta)\big)\frac{2D\ell}{\epsilon}\sum_{t=1}^{T}\mathbb{E}[g_{t}^{T}\!x_{t}]\bigg).

Using the regret bound of Aˉ\bar{A} (Proposition 5.1) followed by Lemma 5.2 we have

2Dϵt=1TE[gtTxt]ln11γγ(1α)2DϵE[t=1TgtTxt]+2Dkln(/α)ϵγ(1α)ln11γγ(1α)OPTk+(1+2)Dkln(/α)ϵγ(1α).\begin{aligned}\frac{2D\ell}{\epsilon}\sum_{t=1}^{T}\mathbb{E}[g_{t}^{T}x_{t}] \\ \leq\frac{\ln{\frac{1}{1-\gamma}}}{\gamma(1-\alpha)}\cdot\frac{2D\ell}{\epsilon}\mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x_{t}^{*}\right]+2D\ell k\frac{\ln{(\ell/\alpha)}}{\epsilon\gamma(1-\alpha)} \\ \leq\frac{\ln{\frac{1}{1-\gamma}}}{\gamma(1-\alpha)}\operatorname{OPT}_{\leq k}+(1+2\ell)Dk\frac{\ln{(\ell/\alpha)}}{\epsilon\gamma(1-\alpha)}.\end{aligned}

By setting α:=(Dk)/(ϵOPTk)\alpha:=(D{\ell}k)/(\epsilon\operatorname{OPT}_{\leq k}) and γ:=Dk/(ϵOPTk)\gamma:=\sqrt{D\ell k/(\epsilon\operatorname{OPT}_{\leq k}}) and considering that kOPTk/2k\leq\operatorname{OPT}_{\leq k}/2, we obtain

(1+η)2Dϵt=1TE[gtTxt]OPTk+O(DkOPTkϵlnϵOPTkDk)+O(DklnϵOPTkDk).(1+\eta)\frac{2D\ell}{\epsilon}\sum_{t=1}^{T}\mathbb{E}[g_{t}^{T}x_{t}]\leq\operatorname{OPT}_{\leq k}+O\left(\sqrt{\frac{D\ell k\operatorname{OPT}_{\leq k}}{\epsilon}}\ln\frac{\epsilon\operatorname{OPT}_{\leq k}}{Dk}\right)+O\left(D\ell k\ln\frac{\epsilon\operatorname{OPT}_{\leq k}}{Dk}\right).

where η=ln1/(1γ)\eta=\ln{1/(1-\gamma)} is the learning rate. It follows that the total expected cost is at most

E[ALG]OPTk+O(m2ϵOPTk)+O(DkOPTkϵlnϵOPTkDk)+O(mϵDklnϵOPTkDk).\begin{aligned}\mathbb{E}[\operatorname{ALG}] \\ \leq\operatorname{OPT}_{\leq k}+O(m^{2}\epsilon\operatorname{OPT}_{\leq k})+O\left(\sqrt{\frac{D\ell k\operatorname{OPT}_{\leq k}}{\epsilon}}\ln\frac{\epsilon\operatorname{OPT}_{\leq k}}{Dk}\right)+O\left(m\epsilon D\ell k\ln\frac{\epsilon\operatorname{OPT}_{\leq k}}{Dk}\right).\end{aligned}

Finally, by setting ϵ:=(OPTk)1/3(Dk)1/3m4/3\epsilon:=(\operatorname{OPT}_{\leq k})^{-1/3}(D{\ell}k)^{1/3}m^{-4/3} we obtain the desired bound. ∎

Corollary 5.4. Algorithm 2 is (1+ϵ)(1+\epsilon)-competitive against OPTk\operatorname{OPT}_{\leq k} for kk as large as

Ω(ϵ3OPTkDm2(lnZ)3)\Omega\left(\frac{\epsilon^{3}\operatorname{OPT}_{\leq k}}{D\ell m^{2}(\ln{Z})^{3}}\right)

where Z=1/3(OPTk)2/3/(D2/3m4/3)Z={\ell}^{1/3}(OPT_{\leq k})^{2/3}/(D^{2/3}m^{4/3}).

6 Upper Bound in the Setting of Arora et al. 2012

We demonstrate how to use the solutions x1,,xTx_{1},\dots,x_{T} produced by Algorithm 1 in order obtain solutions in the setting of MAB against mm-memory bounded adversaries introduced by Arora et al. 2012. To achieve this, we propose Algorithm 3 and analyze its performance. Note that Algorithm 1 does not require any look-ahead, so it can be used directly in the setting of Arora et al. 2012.

Algorithm 3 Producing solutions for MAB against m-memory bounded adversaries

  1. Input: x1,,xTx_{1},\dotsc,x_{T} resulting from Algorithm 1
  2. for t=1,,Tt=1,\dotsc,T do
  3. if xtxt1x_{t}\neq x_{t-1} then it Round(it1,xt1,xt)i_{t}\sim\text{ Round$(i_{t-1},x_{t-1},x_{t})$}
  4. else it:=it1i_{t}:=i_{t-1}
  5. play iti_{t}

To obtain a regret bound in this setting, we must relate the total cost incurred by Algorithm 3 to E[t=1TftTxt]\mathbb{E}[\sum_{t=1}^{T}f_{t}^{T}x_{t}] which we can upper bound using Lemma 3.8.

Lemma 6.1. Given x1,,xT[0,1]x_{1},\dotsc,x_{T}\in[0,1]^{\ell} produced by Algorithm 1, the expected cost of Algorithm 3 is at most

O(mϵT)+E[t=1TftTxt]O(m\epsilon T)+\mathbb{E}\left[\sum_{t=1}^{T}f_{t}^{T}x_{t}\right]

Proof. We begin the proof by observing that E[lt(it)Xt]E[ftTxt]\mathbb{E}[l_{t}(i_{t})\cdot X_{t}]\leq\mathbb{E}[f_{t}^{T}x_{t}], since the algorithm plays iti_{t} sampled from xtx_{t} during exploitation rounds. For the time steps leading up to an exploration round and the exploration step itself we can only say that the cost per round incurred is at most 11. We thus have

E[ALG]=E[t=1Tt(it)]E[t=1T(1(1Xt)+t(it)Xt)]E[t=1T(1Xt)]+E[t=1TftTxt]\begin{aligned}\mathbb{E}[\operatorname{ALG}] \\ =\mathbb{E}\left[\sum_{t=1}^{T}\ell_{t}(i_{t})\right] \\ \leq\mathbb{E}\left[\sum_{t=1}^{T}\left(1\cdot(1-X_{t})+\ell_{t}(i_{t})\cdot X_{t}\right)\right] \\ \leq\mathbb{E}\left[\sum_{t=1}^{T}(1-X_{t})\right]+\mathbb{E}\left[\sum_{t=1}^{T}f_{t}^{T}x_{t}\right]\end{aligned}

It remains to estimate the first term. By definition of Xt,Et,βtX_{t},E_{t},\beta_{t} and Observation 3.2 we have:

E[t=1T(1Xt)]2m+i=0m1E[t=2m+1TEti]=2m+i=0m1t=2m+1TE[βtim]E[Xtim]2m+i=0m1t=2m+1TE[βtim]O(mϵT).  \begin{aligned}\mathbb{E}\left[\sum_{t=1}^{T}(1-X_{t})\right] \\ \leq 2m+\sum_{i=0}^{m-1}\mathbb{E}\left[\sum_{t=2m+1}^{T}E_{t-i}\right] \\ =2m+\sum_{i=0}^{m-1}\sum_{t=2m+1}^{T}\mathbb{E}[\beta_{t-i-m}]\cdot\mathbb{E}[X_{t-i-m}] \\ \leq 2m+\sum_{i=0}^{m-1}\sum_{t=2m+1}^{T}E[\beta_{t-i-m}] \\ \leq O(m\epsilon T).\;\square\end{aligned}

We also need to link the real and perceived costs resulting from following an optimal policy.

Lemma 6.2. Let xΔx^{*}\in\Delta^{\ell} be a solution minimizing t=1TtTx\sum_{t=1}^{T}\ell_{t}^{T}x^{*}. We have

E[t=1TgtTx]ϵ2Dt=1TtTx\mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x^{*}\right]\leq\frac{\epsilon}{2D\ell}\sum_{t=1}^{T}\ell_{t}^{T}x^{*}

Proof. By Observation 3.4, we have

E[gtTx]=E[E[gtTxFt1]]=E[Et2DftTx]=ϵ2DE[XtmftTx]ϵ2DftTx\begin{aligned}\mathbb{E}[g_{t}^{T}x^{*}] \\ =\mathbb{E}\left[\mathbb{E}\left[g_{t}^{T}x^{*}\mid\mathcal{F}_{t-1}\right]\right]=\mathbb{E}\left[\frac{E_{t}}{2D\ell}f_{t}^{T}x^{*}\right] \\ =\frac{\epsilon}{2D\ell}\mathbb{E}[X_{t-m}f_{t}^{T}x^{*}]\leq\frac{\epsilon}{2D\ell}f_{t}^{T}x^{*}\end{aligned}

for each t=1,,Tt=1,\dotsc,T. The second equality holds because Et=1E_{t}=1 only if the same action was taken for the last mm steps. Summing over tt, we get

E[t=1TgtTx]ϵ2Dt=1TftTx=ϵ2Dt=1TtTx.  \mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x^{*}\right]\leq\frac{\epsilon}{2D\ell}\sum_{t=1}^{T}f_{t}^{T}x^{*}=\frac{\epsilon}{2D\ell}\sum_{t=1}^{T}\ell_{t}^{T}x^{*}.\;\square

Putting everything together, we may now prove the following theorem.

Theorem 6.3. Consider \ell available arms and let m1m\geq 1 be the memory bound of the adaptive adversary in the setting of Arora et al. 2012. Then Algorithm 3 achieves the following policy regret bound

O((mln)1/3T2/3)O\left((m\ell\ln{\ell})^{1/3}T^{2/3}\right)

Proof. We begin the proof by observing that Lemma 3.8 still holds in the setting of Arora et al. 2012 as it is based solely on the dynamics of Algorithm 1 and the stability assumption on Aˉ\bar{A}. Using Lemma 6.1 followed by Lemma 3.8 we have

E[ALG]O(mϵT)+E[t=1TftTxt]O(mϵT)+2m+(1+mϵ(1ϵ)m+mηϵ)2DϵE[t=1TgtTxt]\begin{aligned}\mathbb{E}[ALG] \\ \leq O(m\epsilon T)+\mathbb{E}\left[\sum_{t=1}^{T}f_{t}^{T}x_{t}\right] \\ \leq O(m\epsilon T)+2m+\left(1+\frac{m\epsilon}{(1-\epsilon)^{m}}+\frac{m\eta\epsilon}{\ell}\right)\cdot\frac{2D\ell}{\epsilon}\mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x_{t}\right]\end{aligned}

Arguing as in the proof of Theorem 3.9, we can use Proposition 2.4 and Lemma 6.2 to obtain

2DϵE[t=1TgtTxt](1+γ)t=1TtTx+2Dlnϵγ\frac{2D\ell}{\epsilon}\mathbb{E}\left[\sum_{t=1}^{T}g_{t}^{T}x_{t}\right]\leq(1+\gamma)\sum_{t=1}^{T}\ell_{t}^{T}x^{*}+\frac{2D\ell\ln\ell}{\epsilon\gamma}

Since t=1TtTxT\sum_{t=1}^{T}\ell_{t}^{T}x^{*}\leq T, it follows that

E[ALG]t=1TtTxO((mϵ+γ)T)+O(Dlnϵγ).\mathbb{E}[\operatorname{ALG}]-\sum_{t=1}^{T}\ell_{t}^{T}x^{*}\leq O\left((m\epsilon+\gamma)T\right)+O\left(\frac{D\ell\ln\ell}{\epsilon\gamma}\right).

Since the losses in the setting of Arora et al. 2012 are contained in [0,1][0,1]^{\ell}, we may drop the dependence on DD. By choosing ϵ:=(ln)1/3m2/3T1/3\epsilon:=(\ell\ln{\ell})^{1/3}m^{-2/3}T^{-1/3} and γ:=(mln)1/3T1/3\gamma:=(m\ell\ln{\ell})^{1/3}T^{-1/3} we get the desired bound. ∎

Acknowledgements

This research was supported by Junior Researchers’ Grant awarded by Bocconi University thanks to the philanthropic gift of the Fondazione Romeo ed Enrica Invernizzi.

Appendix A Omitted Proofs from Section 3

We compare the cost of Algorithm 2 to the cost of a hypothetical algorithm AA^{\prime} which, at each time step tt, is located at state stits_{t}^{i_{t}}. At time step tt, this algorithm pays cost Ct=ct(stit)+d(st1it1,stit)C^{\prime}_{t}=c_{t}(s_{t}^{i_{t}})+d(s_{t-1}^{i_{t-1}},s_{t}^{i_{t}}).

As a proxy for the cost of Algorithm 2, we define CtC_{t} in the following way. If st=stits_{t}=s_{t}^{i_{t}}, we set Ct:=CtC_{t}:=C^{\prime}_{t}. Otherwise, we set

Ct:=d(st1it1,st)+ct(st)+d(st,bt)+d(bt,stit).C_{t}:=d(s_{t-1}^{i_{t-1}},s_{t})+c_{t}(s_{t})+d(s_{t},b_{t})+d(b_{t},s_{t}^{i_{t}}).

This way, the total cost of Algorithm 2 is at most t=1TCt\sum_{t=1}^{T}C_{t}, since the cost of its movement d(bt,st+1)d(bt,stit)+d(stit,st+1)d(b_{t},s_{t+1})\leq d(b_{t},s_{t}^{i_{t}})+d(s_{t}^{i_{t}},s_{t+1}) at time t+1t+1 is split into CtC_{t} and Ct+1C_{t+1}.

The following statement is part of the proof of Lemma 5.4 in Antoniadis et al. 2023a, we include it here for completeness.

Proposition A.1 (Antoniadis et al. 2023a). Consider t{1,,T}t\in\{1,\dotsc,T\} and denote τt\tau\leq t the last step such that sτ=sτiτs_{\tau}=s_{\tau}^{i_{\tau}}. Then CtCt+O(1)t=τ+1tCtC_{t}\leq C^{\prime}_{t}+O(1)\sum_{t^{\prime}=\tau+1}^{t}C^{\prime}_{t^{\prime}}.

Proof. If τ=t\tau=t, i.e., st=stits_{t}=s_{t}^{i_{t}}, then we have Ct=CtC_{t}=C_{t}^{\prime} and the sum t=τ+1tCt\sum_{t^{\prime}=\tau+1}^{t}C^{\prime}_{t^{\prime}} is empty. Otherwise, τ<t\tau<t and the following relations hold due to bt=bτ=sτiτb_{t}=b_{\tau}=s_{\tau}^{i_{\tau}}, triangle inequality, and the greedy choice of sts_{t} in Algorithm 2 respectively.

d(bt,stit)=d(bτ,stit)d(st1it1,st)d(st1it1,bt)+d(bt,st)d(bt,st)+ct(st)d(bt,stit)+ct(stit).\begin{aligned}d(b_{t},s_{t}^{i_{t}}) \\ =d(b_{\tau},s_{t}^{i_{t}}) \\ d(s_{t-1}^{i_{t-1}},s_{t}) \\ \leq d(s_{t-1}^{i_{t-1}},b_{t})+d(b_{t},s_{t}) \\ d(b_{t},s_{t})+c_{t}(s_{t}) \\ \leq d(b_{t},s_{t}^{i_{t}})+c_{t}(s_{t}^{i_{t}}).\end{aligned}

Plugging this in the definition of CtC_{t}, we get

Ct=d(st1it1,st)+ct(st)+d(st,bt)+d(bt,stit)d(bt,st1it1)+d(bt,st)+ct(st)+d(st,bt)+d(bt,stit)d(bt,st1it1)+2(d(bt,st)+ct(st))+d(bt,stit)[d(bt,st1it1)]+2[d(bt,stit)+ct(stit)]+[d(bt,stit)].\begin{aligned}C_{t} \\ =d(s_{t-1}^{i_{t-1}},s_{t})+c_{t}(s_{t})+d(s_{t},b_{t})+d(b_{t},s_{t}^{i_{t}}) \\ \leq d(b_{t},s_{t-1}^{i_{t-1}})+d(b_{t},s_{t})+c_{t}(s_{t})+d(s_{t},b_{t})+d(b_{t},s_{t}^{i_{t}}) \\ \leq d(b_{t},s_{t-1}^{i_{t-1}})+2\big(d(b_{t},s_{t})+c_{t}(s_{t})\big)+d(b_{t},s_{t}^{i_{t}}) \\ \leq[d(b_{t},s_{t-1}^{i_{t-1}})]+2[d(b_{t},s_{t}^{i_{t}})+c_{t}(s_{t}^{i_{t}})]+[d(b_{t},s_{t}^{i_{t}})].\end{aligned}

Between time steps τ\tau and tt, AA^{\prime} has to traverse from bt=sτiτb_{t}=s_{\tau}^{i_{\tau}} to st1it1s_{t-1}^{i_{t-1}} as well as stits_{t}^{i_{t}} and pay ct(stit)c_{t}(s_{t}^{i_{t}}). Therefore, each bracket in the equation above is bounded by t=τ+1tCt\sum_{t^{\prime}=\tau+1}^{t}C^{\prime}_{t^{\prime}}. ∎

Proof of Lemma 3.1. By Proposition A.1, the cost of Algorithm 2 is at most

t=1TCtt=1TCt+O(1)t=1Tτt+1tCt=t=1TCt+O(1)t=1T(att)Ct,\sum_{t=1}^{T}C_{t}\leq\sum_{t=1}^{T}C^{\prime}_{t}+O(1)\sum_{t=1}^{T}\sum_{\tau_{t}+1}^{t}C^{\prime}_{t}=\sum_{t=1}^{T}C^{\prime}_{t}+O(1)\sum_{t=1}^{T}(a_{t}-t)C^{\prime}_{t},

where τt:=max{ttt and st=stit}\tau_{t}:=\max\{t^{\prime}\mid t\leq t\text{ and }s_{t^{\prime}}=s_{t^{\prime}}^{i_{t^{\prime}}}\} and at:=min{ttt and st=stit}a_{t}:=\min\{t^{\prime}\mid t\geq t\text{ and }s_{t^{\prime}}=s_{t^{\prime}}^{i_{t^{\prime}}}\}. Therefore, it is enough to show that

E[t=1T(att)Ct]O(ϵm2)E[t=1TCt].\mathbb{E}\left[\sum_{t=1}^{T}(a_{t}-t)C^{\prime}_{t}\right]\leq O(\epsilon m^{2})\mathbb{E}\left[\sum_{t=1}^{T}C^{\prime}_{t}\right].

If at>ta_{t}>t, then ststits_{t}\neq s_{t}^{i_{t}} and there must be an exploration step within mm time steps before or after tt. Therefore, we have

E[(att)Ct]t=tmt+mE[CtEt(att)]t=tmt+mE[CtE[Et(att)Ft]].\begin{aligned}\mathbb{E}\left[(a_{t}-t)C^{\prime}_{t}\right] \\ \leq\sum_{t^{\prime}=t-m}^{t+m}\mathbb{E}\left[C^{\prime}_{t}E_{t^{\prime}}(a_{t}-t)\right] \\ \leq\sum_{t^{\prime}=t-m}^{t+m}\mathbb{E}\left[C^{\prime}_{t}\mathbb{E}\left[E_{t^{\prime}}(a_{t}-t)\mid\mathcal{F}_{t}\right]\right].\end{aligned}

Here, we used that iti_{t} and therefore CtC^{\prime}_{t} is determined only by random choices up to time tt. Now, for each t=tm,,t+mt^{\prime}=t-m,\dotsc,t+m, we have

E[Et(att)Ft]=E[βtmXtm(att)Ft]βtm(1+i=1Tmi(2mϵ)i)mβtmO(1),\begin{aligned}\mathbb{E}[E_{t^{\prime}}(a_{t}-t)\mid\mathcal{F}_{t}] \\ =\mathbb{E}[\beta_{t^{\prime}-m}X_{t^{\prime}-m}(a_{t}-t)\mid\mathcal{F}_{t}]\leq\beta_{t^{\prime}-m}(1+\sum_{i=1}^{T}mi(2m\epsilon)^{i})\leq m\beta_{t^{\prime}-m}O(1),\end{aligned}

because in order to have att=mia_{t}-t=mi, we need to have βt=1\beta_{t^{\prime\prime}}=1 in at least once in every block of 2m2m time steps between tt to t+mit+mi and ϵ<1/2\epsilon<1/2. Therefore, we have

E[t=1T(att)Ct]O(ϵm2)E[t=1TCt]\mathbb{E}\left[\sum_{t=1}^{T}(a_{t}-t)C^{\prime}_{t}\right]\leq O(\epsilon m^{2})\mathbb{E}\left[\sum_{t=1}^{T}C^{\prime}_{t}\right]

which concludes the proof. ∎

Appendix B Rounding Algorithm for MTS

We describe a procedure for rounding the solutions produced by fractional algorithms inspired by Blum & Burch 2000 and use it to prove Proposition 2.1 and Proposition 2.2.

For two distributions p,pΔNp,p^{\prime}\in\Delta^{N}, EMD(p,p)=i=1Nmax(0,p(i)p(i))\operatorname{EMD}(p,p^{\prime})=\sum_{i=1}^{N}\max(0,p(i)-p^{\prime}(i)). For every i,j[N]i,j\in[N], let τi,j0\tau_{i,j}\geq 0 represent the mass transferred from p(i)p(i) to p(j)p^{\prime}(j) such that p(i)=j=1Nτi,jp(i)=\sum_{j=1}^{N}\tau_{i,j} and EMD(p,p)=ijτi,j\operatorname{EMD}(p,p^{\prime})=\sum_{i\neq j}\tau_{i,j}. Suppose a fractional algorithm chose i[N]i\in[N] at the previous time step with the associated distribution pp. At the next time step (with a new associated distribution p)p^{\prime}), the algorithm moves to i[N]i^{\prime}\in[N] with probability τi,i/p(i)\tau_{i,i^{\prime}}/p(i). This procedure is summarized in Algorithm 4 which we also refer to as Round. Note that Algorithm 4 can be applied to distributions over the states of a metric space (i.e., N=MN=M) as well as distributions over heuristics/arms (i.e., N=N=\ell). We will not mention NN explicitly when calling the procedure as a sub-routine for conciseness.

Algorithm 4 Round

  1. Input: i,p,p,Ni,p,p^{\prime},N
  2. for j=1,,Nj=1,\dotsc,N do
  3. τi,j:=mass transferred from p(i) to p(j)\tau_{i,j}:=\text{mass transferred from $p(i)$ to $p^{\prime}(j)$}
  4. set q(j):=τi,jp(i)q(j):=\frac{\tau_{i,j}}{p(i)}
  5. sample iqi^{\prime}\sim q

Proof of Property 2.1. Given p1,,pTΔMp_{1},\dots,p_{T}\in\Delta^{M}, let s1,,sTs_{1},\dots,s_{T} be the solutions produced after iteratively calling Algorithm 4, i.e. st:=Round(st1,pt1,pt)s_{t}:=\text{Round$(s_{t-1},p_{t_{1}},p_{t})$} for every t[T]t\in[T]. Then for every t[T]t\in[T] we have

E[ct(st)+d(st,st1)]=i=1M(ct(i)pt(i)+j=1,jiMτi,j)=ctTpt+EMD(pt1,pt),\mathbb{E}[c_{t}(s_{t})+d(s_{t},s_{t-1})]=\sum_{i=1}^{|M|}\left(c_{t}(i)p_{t}(i)+\sum_{j=1,j\neq i}^{|M|}\tau_{i,j}\right)=c_{t}^{T}p_{t}+\operatorname{EMD}(p_{t-1},p_{t}),

from which we obtain the desired conclusion by summing over t=1,Tt=1,\dots T. ∎

Proof of Property 2.2. Given x1,,xTΔx_{1},\dots,x_{T}\in\Delta^{\ell}, let i1,,iTi_{1},\dots,i_{T} be the solutions produced after iteratively calling Algorithm 4, i.e. it:=Round(it1,xt1,xt)i_{t}:=\text{Round$(i_{t-1},x_{t_{1}},x_{t})$} for every t[T]t\in[T] and i0i_{0} is selected uniformly at random. We subsequently define stits_{t}^{i_{t}} as the state predicted by heuristic HitH_{i_{t}} at time tt. It follows that for every t[T]t\in[T] we have

E[ct(stit)+d(stit,st1it1)]ftTxt+DEMD(xt,xt1)=ftTxt+D2xt1xt1,\mathbb{E}[c_{t}(s_{t}^{i_{t}})+d(s_{t}^{i_{t}},s_{t-1}^{i_{t-1}})]\leq f_{t}^{T}x_{t}+D\cdot\operatorname{EMD}(x_{t},x_{t-1})=f_{t}^{T}x_{t}+\frac{D}{2}\lVert x_{t-1}-x_{t}\rVert_{1},

where we argued as in the proof of Property 2.1 and used the fact that the distance between any two states is bounded by the diameter DD. By summing over t=1,Tt=1,\dots T we obtain the desired conclusion. ∎

Appendix C Online Learning from Expert Advice

C.1 Classical Algorithms

In this setting, a learner plays an iterative game against an oblivious adversary for TT rounds. At each round tt, the algorithm chooses among \ell experts, incurs the cost associated to its choice, and then observes the losses of all the experts at time tt. In this full-feedback model, several successful algorithms have been proposed and demonstrated to achieve strong performance guarantees. For an in-depth analysis of these classical algorithms, we invite the reader to see (Cesa-Bianchi & Lugosi 2006; Blum & Burch 2000).

HEDGE.

The idea behind this algorithm is simple: associate to each expert a weight and then use an exponential update rule for the weights after observing a new loss function. The weights are normalized to produce a probability distribution over the expert set, from which the subsequent action is sampled. The learning dynamics are summarized in Algorithm 5.

Algorithm 5 HEDGE

  1. Input: η,,T\eta,\ell,T
  2. w0(i):=1i[]w_{0}(i):=1\quad\forall i\in[\ell]
  3. for t=1,,Tt=1,\dots,T do
  4. Wt=i[]wt(i)W_{t}=\sum_{i\in[\ell]}w_{t}(i)
  5. xt(i)=wt(i)/Wti[]x_{t}(i)=w_{t}(i)/W_{t}\quad\forall i\in[\ell]
  6. Play itxti_{t}\sim x_{t}
  7. Observe gt[0,1]g_{t}\in[0,1]^{\ell}
  8. Set wt+1(i):=wt(i)exp(ηgt1(i))i[]w_{t+1}(i):=w_{t}(i)\exp(-\eta\cdot g_{t-1}(i))\quad\forall i\in[\ell]

SHARE.

This algorithm starts from the same exponential update rule as HEDGE, but introduces an additional term. Given the reduction in the sum of the weights Δ\Delta, the SHARE algorithm adds to each weight a fixed fraction αΔ\alpha\cdot\Delta. The effect of this change is that information is shared across experts, which makes the algorithm better at tracking the best moving expert. This allows SHARE to achieve good performance with respect to a benchmark that is a allowed to switch experts a limited number of time. Algorithm 6 summarizes these dynamics.

Algorithm 6 SHARE

  1. Input: η,α,,T\eta,\alpha,\ell,T
  2. w0(i):=1i[]w_{0}(i):=1\quad\forall i\in[\ell]
  3. for t=1,,Tt=1,\dots,T do
  4. Wt=i[]wt(i)W_{t}=\sum_{i\in[\ell]}w_{t}(i)
  5. xt(i)=wt(i)/Wti[]x_{t}(i)=w_{t}(i)/W_{t}\quad\forall i\in[\ell]
  6. Play itxti_{t}\sim x_{t}
  7. Observe gt[0,1]g_{t}\in[0,1]^{\ell}
  8. Compute Δ:=i[]wt(i)(1exp(ηgt(i)))\Delta:=\sum_{i\in[\ell]}w_{t}(i)(1-\exp(-\eta\cdot g_{t}(i)))
  9. Set wt+1(i):=wt(i)exp(ηgt1(i))+αΔi[]w_{t+1}(i):=w_{t}(i)\exp(-\eta\cdot g_{t-1}(i))+\alpha\cdot\Delta\quad\forall i\in[\ell]

C.2 Proof of Property 2.3

We consider the weight vector wt[0,)w_{t}\in[0,\infty)^{\ell} associated to each expert and the loss vector gt1[0,1]g_{t-1}\in[0,1]^{\ell}. The distribution over the experts xt1[0,1]x_{t-1}\in[0,1]^{\ell} is obtained as xt1(i)=wt1(i)/Wt1x_{t-1}(i)=w_{t-1}(i)/W_{t-1}, where Wt1=j=1wt1(j)W_{t-1}=\sum_{j=1}^{\ell}w_{t-1}(j).

The HEDGE algorithm with parameter η>0\eta>0 uses the following update rule

wt(i):=wt1(i)exp(ηgt1(i))i[].w_{t}(i):=w_{t-1}(i)\cdot\exp{(-\eta\cdot g_{t-1}(i))}\quad\forall i\in[\ell].

The SHARE algorithm with parameters η>0\eta>0 and α[0,1/2]\alpha\in[0,1/2] uses the following update rule

wt(i):=wt1(i)exp(ηgt1(i))+αΔ/i[]w_{t}(i):=w_{t-1}(i)\cdot\exp{(-\eta\cdot g_{t-1}(i))}+\alpha\cdot\Delta/\ell\quad\forall i\in[\ell]

where Δ:=j=1l(wt1(j)exp(ηgt1(j))wt1(j))\Delta:=\sum_{j=1}^{l}(w_{t-1}(j)-\exp{(-\eta\cdot g_{t-1}(j))}w_{t-1}(j)).

The following statement is part of the proof of Theorem 10 in Blum & Burch 2000, which we include here for completeness.

Lemma C.1. The SHARE algorithm satisfies the following

i:xt(i)<xt1(i)(xt1(i)xt(i))i:xt(i)<xt1(i)xt1(i)(1exp(ηgt1(i)))\sum_{i:x_{t}(i)<x_{t-1}(i)}(x_{t-1}(i)-x_{t}(i))\leq\sum_{i:x_{t}(i)<x_{t-1}(i)}x_{t-1}(i)(1-\exp{(-\eta\cdot g_{t-1}(i))})

for every t[T]t\in[T].

Proof. Using the update rule in (6) we have

i:xt(i)<xt1(i)(xt1(i)xt(i))=i:xt(i)<xt1(i)(wt1Wt1wt1exp(ηgt1(i))+αΔ/Wt)i:xt(i)<xt1(i)(wt1Wt1wt1exp(ηgt1(i))Wt)i:xt(i)<xt1(i)(wt1Wt1wt1exp(ηgt1(i))Wt1)\begin{aligned}\sum_{i:x_{t}(i)<x_{t-1}(i)}(x_{t-1}(i)-x_{t}(i)) \\ =\sum_{i:x_{t}(i)<x_{t-1}(i)}\left(\frac{w_{t-1}}{W_{t-1}}-\frac{w_{t-1}\cdot\exp{(-\eta\cdot g_{t-1}(i))}+\alpha\cdot\Delta/\ell}{W_{t}}\right) \\ \leq\sum_{i:x_{t}(i)<x_{t-1}(i)}\left(\frac{w_{t-1}}{W_{t-1}}-\frac{w_{t-1}\cdot\exp{(-\eta\cdot g_{t-1}(i))}}{W_{t}}\right) \\ \leq\sum_{i:x_{t}(i)<x_{t-1}(i)}\left(\frac{w_{t-1}}{W_{t-1}}-\frac{w_{t-1}\cdot\exp{(-\eta\cdot g_{t-1}(i))}}{W_{t-1}}\right)\end{aligned}

where the last inequality uses the observation that WtWt1W_{t}\leq W_{t-1} for all t[T]t\in[T]. ∎

Proof of Property 2.3. The proof for HEDGE follows immediately from Theorem 3 in Blum & Burch 2000. The result for SHARE is obtained by applying C.1, followed by the previous argument, since the right-hand side of (7) contains the update rule in (5). As a consequence, for both HEDGE and SHARE, η\eta (i.e., the learning rate parameter) directly appears in the expression of Property 2.3. ∎

Appendix D Estimating the Baseline Online

The bounds obtained in Theorem 3.9 and Theorem 5.3 require tuning parameters based on the values of OPT0\operatorname{OPT}_{\leq 0} and OPTk\operatorname{OPT}_{\leq k}, respectively. These values are typically unknown a priori and we need to estimate them online. In particular, our algorithm can observe the MTS input instance and, at each time tt, compute the value of the offline optimal solution up to time tt. Let OFF\operatorname{OFF} denote the cost of the offline optimal solution to the given input instance. If at least one of the heuristics H1,,HH_{1},\dotsc,H_{\ell} achieves cost at most OFF\operatorname{OFF}, then OFFOPTkROFF\operatorname{OFF}\leq\operatorname{OPT}_{\leq k}\leq R\operatorname{OFF}. We use OFF\operatorname{OFF} as an estimate of OPTk\operatorname{OPT}_{\leq k} in order to tune the parameters of our algorithm and achieve regret bound depending on RR. Note that we do not need to know RR beforehand and we can ensure that RR is bounded by including some classical online algortihm which is competitive in the worst case among H1,,HH_{1},\dotsc,H_{\ell}.

We use the guess and double trick which resembles the classical problem of estimating the time horizon TT in a MAB setting, see Cesa-Bianchi & Lugosi 2006; Lattimore & Szepesvari 2017. Here, one starts with a prior estimate of the time horizon and an instance of some online algorithm whose parameters are tuned based on this estimate. Whenever the estimate becomes smaller than the index of the current iteration, the guess is doubled, a new instance of the online algorithm is created, and its parameters are set according to the new guess. In what follows, we show how to adapt this strategy to our setting. We focus on OPT0\operatorname{OPT}_{\leq 0}, but a similar argument can be made for OPTk\operatorname{OPT}_{\leq k}.

Let ALG(ω)\operatorname{ALG}(\omega) be Algorithm 2 configured with parameters ϵ:=(Dln)1/3m4/3ω1/3\epsilon:=(D\ell\ln{\ell})^{1/3}m^{-4/3}\omega^{-1/3} and γ:=(Dln)1/3m2/3ω1/3\gamma:=(D\ell\ln{\ell})^{1/3}m^{2/3}\omega^{-1/3}. Here D,,mD,\ell,m are known and ω\omega is our estimate of the unknown OPT0\operatorname{OPT}_{\leq 0}. Our strategy is to instantiate a sequence of algorithms ALG1,ALG2,,ALGN\operatorname{ALG}_{1},\operatorname{ALG}_{2},\dots,\operatorname{ALG}_{N} such that ALGi=ALG(2iω)\operatorname{ALG}_{i}=\operatorname{ALG}(2^{i}\omega) runs between rounds aia_{i} (included) and bib_{i} (excluded). The optimal heuristic on interval ii has cost OPTi2iω\operatorname{OPT}_{i}\leq 2^{i}\omega by construction. Let OFFi\operatorname{OFF}_{i} be the offline MTS optimal cost computed on the interval between aia_{i} and bib_{i}. Note that we can always compute this value at time tt after observing the sequence of local cost functions cai,cbi1c_{a_{i}}\dots,c_{b_{i}-1}. Suppose one of the heuristics is RR-competitive with high probability w.r.t. the offline MTS optimum. Then it must be that 2iωROFFi2^{i}\omega\leq R\operatorname{OFF}_{i} with high probability. This effectively provides a threshold for switching to the next instance without knowledge of the true value of OPTi\operatorname{OPT}_{i}. It remains to show that this procedure, summarized in Algorithm 7, guarantees a limited overhead w.r.t. to the bound that requires knowledge of OPT0\operatorname{OPT}_{\leq 0}.

Algorithm 7 Doubling algorithm

  1. Input: ω\omega
  2. i=0i=0
  3. t=1t=1
  4. ALG0:=ALG(ω)\operatorname{ALG}_{0}:=\operatorname{ALG}(\omega)
  5. while tTt\leq T do
  6. if OFFi>R2iω\operatorname{OFF}_{i}>R\cdot 2^{i}\omega then
  7. i++i++
  8. ALGi:=ALG(2iω)\operatorname{ALG}_{i}:=\operatorname{ALG}(2^{i}\omega)
  9. Choose sts_{t} according to ALGi\operatorname{ALG}_{i}
  10. t++t++

Proposition D.1. Let D,,mD,\ell,m be fixed and assume there exists Hˉ{H1,,H}\bar{H}\in\{H_{1},\dots,H_{\ell}\} such that Hˉ\bar{H} is RR-competitive with high probability. Then Algorithm 7 achieves regret O(R2/3OPT02/3)O(R^{2/3}\operatorname{OPT}_{\leq 0}^{2/3}) with respect to OPT0\operatorname{OPT}_{\leq 0}.

Proof. By construction of the sequence of algorithms, we have that 2iωOPTi2^{i}\omega\leq\operatorname{OPT}_{i} and i=1NOPTiOPT0\sum_{i=1}^{N}\operatorname{OPT}_{i}\leq\operatorname{OPT}_{\leq 0}. It follows that

i=1N2iω=ω(2N1)OPT0,\sum_{i=1}^{N}2^{i}\omega=\omega(2^{N}-1)\leq OPT_{\leq 0},

which implies that Nlog(OPT0)N\leq\log(\operatorname{OPT}_{\leq 0}). Moreover, we have

Reg=E[ALG]OPT0=i=0N(E[ALGi]OPTi)i=0NO(OPTi2/3)O(i=0N(R2i+2ω)2/3)O(R2/3OPT02/3),\begin{split}\operatorname{Reg}&=\mathbb{E}[\operatorname{ALG}]-\operatorname{OPT}_{\leq 0}=\sum_{i=0}^{N}\left(\mathbb{E}[\operatorname{ALG}_{i}]-\operatorname{OPT}_{i}\right)\\ &\leq\sum_{i=0}^{N}O(\operatorname{OPT}_{i}^{2/3})\leq O\left(\sum_{i=0}^{N}(R\cdot 2^{i+2}\omega)^{2/3}\right)\\ &\leq O\left(R^{2/3}\operatorname{OPT}_{\leq 0}^{2/3}\right),\\ \end{split}

where the first inequality comes from Theorem 1.1 and the second from the assumption in the hypothesis. ∎

The previous result means that we can guarantee regret which is worse by a factor of R2/3R^{2/3} w.r.t. to the bound which requires knowledge of OPT0\operatorname{OPT}_{\leq 0}. RR depends on the MTS variant being solved. For general MTS, we can assume R2n1R\leq 2n-1 by including the classical deterministic algorithm by Borodin et al. 1992, or R=O(log2n)R=O(\log^{2}n) by including the algorithm by Bubeck et al. 2019. Using the procedure of Komm et al. 2022, any algorithm for MTS which is RR-competitive in expectation can be made (1+α)R(1+\alpha)R-competitive with high probability for any α>0\alpha>0.

Resources

1 file