Learning Predictions for Algorithms with Predictions
Anonymous Author(s)
AfﬁliationAddress email
Abstract
A burgeoning paradigm in algorithm design is the ﬁeld of algorithms with predictions , in which algorithms are designed to take advantage of a possibly-imperfectprediction of some aspect of the problem.
While much work has focused on usingpredictions to improve competitive ratios, running times, or other performancemeasures, less effort has been devoted to the question of how to obtain the predictions themselves, especially in the critical online setting.
We introduce a generaldesign approach for algorithms that learn predictors: (1) identify a functionaldependence of the performance measure on the prediction quality, and (2) applytechniques from online learning to learn predictors against adversarial instances,tune robustness-consistency trade-offs, and obtain new statistical guarantees.
Wedemonstrate the effectiveness of our approach at deriving learning algorithmsby analyzing methods for bipartite matching, ski-rental, page migration, and jobscheduling.
In the ﬁrst two settings we improve upon existing learning-theoreticresults by deriving online results, obtaining better or more general statistical guarantees, and utilizing a much simpler analysis, while in the last two we provide theﬁrst learning-theoretic guarantees.
Introduction
Algorithms with predictions, a subﬁeld of beyond-worst-case analysis of algorithms [36], aims todesign methods that make use of machine-learned predictions in order to reduce runtime, error orsome other performance cost.
Mathematically, given some prediction x , algorithms in this ﬁeld aredesigned such that the cost C t ( x ) of an instance t while using the prediction is upper-bounded bysome measure U t ( x ) of the quality of the prediction on that instance.
The canonical example here isthat the cost of binary search on a sorted array of size n can be improved from O (log n ) to at most
U t ( x ) = 2 log η t ( x ) , where η t ( x ) is the distance between the true location of a query t in the arrayand the location predicted by the predictor x [36].
In recent years, algorithms whose cost depends onthe quality of possibly imperfect predictions have been developed for numerous important problems,including caching [41, 24, 34], scheduling [30, 43], ski-rental [29, 1, 15], bipartite matching [16],page migration [22], and many more [10, 17, 36].
While there has been a signiﬁcant effort to develop algorithms that can take advantage of learnedpredictions, until very recently [13, 33] there has been less focus on actually learning to predict.
For example, of the works listed above only two focusing on ski-rental [1, 15] and one other [16]show sample complexity guarantees, and none consider the important online learning setting, inwhich problem instances are not guaranteed to come from a ﬁxed distribution.
This is in contrastto the related area of data-driven algorithm design [20, 3], which has established techniques suchas dispersion [6] and others [8, 11] for deriving learning-theoretic guarantees, leading to end-to-endresults encompassing both learning and computation.
It is also despite the fact that, as we see in thiswork, learning even simple predictors is in many cases a non-trivial problem.
[Table]
† Forthesealgorithmswealsoprovidenewstatisticalguaranteesinthei.
[Table] [Table] [Table] We bridge this gap and provide a framework for obtaining learning-theoretic guarantees for algorithmswith predictions.
In addition to improving sample complexity bounds, we show how to learn theparameters of interest in an online setting, and prove bounds on the overall regret.
We accomplish thisusing a two-step approach inspired by recent work on theoretical meta-learning [25], which has beenused to derive numerous multi-task learning results by optimizing regret-upper-bounds that encodethe task-similarity [31, 32, 9, 26].
As evidenced by our results in Table 1, we believe the two-stepframework below holds similar potential for obtaining guarantees for algorithms with predictions.
Our framework is as follows:
For a given algorithm, derive a convenient-to-optimize upper bound
U t ( x ) on the cost C t ( x )that depends on both the prediction x and information speciﬁc to instance t returned once thealgorithm terminates, e
g. the optimum in combinatorial optimization.
We ﬁnd that in many casessuch bounds already exist, and the quality of the prediction can be measured by a distance fromsome ground truth obtained from the output, a quantity that is usually convex and thus learnable.
Apply online learning to obtain both regret guarantees against adversarial sequences and samplecomplexity bounds for i.i.d.
instances.
We provide pseudo-code for a generic setup in Algorithm 1.
Table 1 summarizes instantiations of our framework on multiple problems.
Our approach is designedto be simple-to-execute, leaving much of the difﬁculty to what the ﬁeld is already good at: designingalgorithms and proving prediction-quality-dependent upper bounds on their costs.
Once the latter isaccomplished, our framework leverages problem-speciﬁc structure to design a customized learningalgorithm for each problem, leading to strong regret and sample complexity guarantees.
In particular,in two of the four speciﬁc problems we study we improve upon existing guarantees in either samplecomplexity or generality, while in the other two we show the ﬁrst learning-theoretic guaranteeswhatsoever.
In all cases we are the ﬁrst to show regret guarantees in the online setting.
Thisdemonstrates the usefulness of and need for such a theoretical framework for studying these problems.
We summarize the diverse set of contributions enabled by our theoretical framework below:
Bipartite matching: Our starting example builds upon the work on minimum-weight bipartite matching using the Hungarian algorithm by Dinitz et al.
We show how our framework
leads directly to algorithms that yield both the ﬁrst regret guarantees in the online setting andnew sample complexity bounds that improve over the previous approach.
In the Appendix weshow similar improvements for b -matching; in-fact, our guarantees cover the more general caseof demand vectors b chosen i
i
d. or adversarially, unlike Dinitz et al.
[16] that keep them ﬁxed.2.
Page migration: We next study a more challenging application, online page migration , and
show how we can adapt the algorithmic guarantee of Indyk et al.
[22] into a learnable upper boundfor which we can again provide both adversarial and statistical guarantees.
Tuning robustness-consistency trade-offs: Many bounds for online algorithms with predictionsincorporate parameterized trade-offs between trusting the prediction completely or falling backon a worst-case approximation.
The structure of these trade-offs lends itself to online tuningof the trade-off parameter, which we instantiate on a simple job scheduling problem with aﬁxed predictors.
Then we turn to the more challenging problem of simultaneously tuning theseparameters and learning predictions, which we
Related work
Algorithms with predictions is a type of beyond-worst-case analysis of algorithms [42]; along withareas like smooth analysis [45] and data-driven algorithm design [3], it takes advantage of the factthat real-world instances are not worst-case.
Inspired by success in applications such as learnedindices [27], there has been a great deal of theoretical study focusing on algorithms whose guaranteesdepend on the quality of a given predictor (c.f. the Mitzenmacher and Vassilvitskii [36] survey).
Theactual learning of this predictor has been studied less [1, 15, 16] and rarely in the online setting; we aimto change this with our study.
Some papers improve online learning itself using predictions [39, 23,14], but they also assume known predictors or only learn over a small set of policies, and their goal isminimizing regret not computation.
In-general, we focus on showing how algorithms with predictionscan make use of online learning rather than on new methods for the latter.
Several works [4, 40, 2] uselearning while advising an algorithm, in-effect taking a learning-inspired approach to better make useof a prediction within an algorithm, whereas we focus on learning the prediction outside of the targetalgorithm.
Our paper presents the ﬁrst general framework for efﬁciently learning useful predictors.
Data-driven algorithm design is a related area that has seen more learning-theoretic effort [20, 6, 3].
At a high-level, it often studies tuning parameters such as the gradient descent step-size [20] orsettings of branch and bound [5], whereas the predictors in algorithms with predictions guess thesequence in an online algorithm [22] or the actual outcome of the computation [16].
The distinctioncan be viewed as terminological, since a prediction can be viewed as a parameter, but it can mean thatin our settings we have full information about the loss function since it is typically some discrepancybetween the full sequence or computational outcome and the prediction.
In contrast, in data-drivenalgorithm design getting the cost of each parameter often requires additional computation, leading to(semi-)bandit settings [7].
A more salient difference is that data-driven algorithm design guaranteescompete with the parameter that minimizes average cost but do not always quantify the improvementattainable via learning; in algorithms with predictions we do generally quantify this improvementwith an upper bound on the cost that depends on the prediction quality, but we usually only competewith the parameter that is optimal for prediction quality, which is not always cost-optimal.
We doadapt data-driven algorithm design tools like dispersion [6] for algorithms with predictions.
Our two-step approach to providing guarantees for algorithms with predictions is inspired by the
Average Regret-Upper-Bound Analysis (ARUBA) framework [25] for studying meta-learning [18].
Instead of instances they have tasks with different data-points, and the upper bounds are on learningtheoretic quantities such as regret rather than computational costs such as runtime.
Mathematically,
ARUBA takes advantage of similar structure in the regret-upper-bounds that we ﬁnd in algorithmswith predictions, namely that the upper bounds encode some measure of the quality of the prediction(in their case an initialization for gradient descent) via a comparison to the ground-truth (in theircase the optimal parameter).
However, whereas in ARUBA the need to know this optimal parameterafter seeing a task is a weakness that does not hold in practice, in algorithms with predictions thecorresponding quantity—the feedback listed in Table 1—is generally known after seeing the instance.
Framework overview and application to bipartite matching
In this section we outline the theoretical framework for designing algorithms and proving guaranteesfor learned predictors.
As an illustrative example we will use the Hungarian algorithm for bipartitematching, for which Dinitz et al.
[16] demonstrated an instance-dependent upper bound on therunning time using a learned dual vector.
Along the way, we will show an improvement to theirsample complexity bound together with the ﬁrst online results for this setting.
Bipartite matching:
For a bipartite graph on n nodes and m edges, min-weight perfect matching(MWPM) asks for the perfect matching with the least weight according to edge-costs c ∈
Z m ≥ 0 .
Acommon approach here is the Hungarian algorithm, a convex optimization-based approach for which
Dinitz et al.
[16] showed a runtime bound of ˜ O
( m √ n min {(cid:107) ˆx − x ∗ ( c ) (cid:107) 1 , √ n } ) , where ˆx ∈ Z ninitializes the duals in a primal-dual algorithm and
x ∗ ( c ) ∈
Z n is dual of the optimal solution; notethat the latter is obtained for free after running the Hungarian method.
Step 1 -Upper bound:
The ﬁrst step of our approach is to ﬁnd a suitable function U t ( x ) of theprediction x that (a) upper bounds the target algorithm’s cost C t ( x ) , (b) can be constructed completelyonce the algorithm terminates, and (c) can be efﬁciently optimized.
These qualities allow learning thepredictor in the second step.
The requirements are similar to those of ARUBA for showing results formeta-learning [25], although there the quantity being upper-bounded was regret, not algorithmic cost.
line learning
X to predictor for a method AlgorithmWithPrediction that takes advice from X and returns upper bounds U t on its cost.
The goal of OnlineAlgorithm is low regret over the sequence U t , so that on-average C t is upper bounded by the smallest possible average of U t ( x ) , up to some error decreasing in T .
For speciﬁc instantiations of both algorithms and the way they provide feedback see Table 1.
initialize ˆx 1 ∈ X for OnlineAlgorithm for instance t = 1 , . .
, T do obtain instance I t run AlgorithmWithPrediction( I t , ˆx t ) suffer cost C t ( ˆx ) ≤ U t ( ˆx t ) get feedback to construct upper bound U t ˆx t
+1 ← OnlineAlgorithm
( U t , ˆx t )
Many guarantees for algorithms with predictions are already amenable to being optimized, althoughwe will see that they can require some massaging in order to be useful.
In many cases the guarantee isa distance metric between the prediction ˆx and some instance-dependent perfect prediction x ∗ , whichis convex and thus straightforward to learn.
This is roughly true of our bipartite matching example,although taking the minimum of a constant and the distance (cid:107) ˆx − x ∗ ( c ) (cid:107) 1 between the predicted andactual duals makes the problem non-convex.
However, we can further upper bound their result by˜ O ( m √ n (cid:107) ˆx − x ∗ ( c ) (cid:107) 1 ) ; note that Dinitz et al.
[16] also optimize this quantity, not the tighter upperbound with the minimum.
While this might seem to be enough for step one, Dinitz et al.
[16] alsorequire the prediction ˆx to be integral, which is difﬁcult to combine with standard online procedures.
In order to get around this issue, we show that rounding any nonnegative real vector to the closestinteger vector incurs only a constant multiplicative loss in terms of the (cid:96) 1 -distance.
Claim 3.1.
Given any vectors x ∈ Z n and y ∈ R n , let ˜y ∈
Z n be the vector whose elements arethose of y rounded to the nearest integer.
Then (cid:107) x − ˜y
(cid:107) 1 ≤ 2 (cid:107) x − y (cid:107) 1 .
Proof.
Let S ⊂ [ n ] be the set of indices i ∈ [ n ] for which x
[ i ] ≥ y
[ i ] ⇐⇒
˜y
[ i ] = (cid:100)
y
[ i ] (cid:101) .
Fori ∈ [ n ] \ S we have | x [ i ] − y
[ i ] | ≥ 1 / 2 ≥ | ˜y [ i ] − y
[ i ] | so it follows by the triangle inequality that
[Equation]
Combining this projection with the convex relaxation above and the result of Dinitz et al.
[16]shows that for any predictor x ∈ R n we have (up to afﬁne transformation) a convex upper bound
U t ( x ) = (cid:107) x − x ∗ t (cid:107) 1 on the runtime of the Hungarian method, as desired.
We now move to step two.
Step 2 - Online learning: The second component of our approach is natural: once one has an upperbound on the cost, apply standard online learning algorithms and results to these upper bounds toobtain guarantees for learning predictions.
For example, for bipartite matching we can apply thep -norm algorithm [19] to the sequence of losses U t ( x )
= (cid:107) x − x ∗ ( c t ) (cid:107) 1 ; as shown in Theorem 3.1,this yields a regret guarantee via a textbook result.
The simplicity here is the point; by relegatingas much of the difﬁculty as we can to obtaining an easy-to-optimize upper bound in step one, wemake the actual learning-theoretic component easy.
However, as we show in the following sections,it is not always easy to obtain a suitable upper bound, nor is it always obvious what online learningalgorithm to apply, e.g. if the upper bounds are non-convex.
Our use of online learning for this step is motivated by two factors:
Being able to do well on non-i.i.d.
instances is important in practical applications, e.g. in job
scheduling problems where demand for computational resources is constantly changing over time.
There are classic procedures for converting regret guarantees into sample complexity bounds via
online-to-batch conversion [12].
As shown in Theorem 3.1, for the bipartite matching example
this conversion leads to a better sample complexity than that of Dinitz et al.
We now show how this second step is implemented for the bipartite matching problem by improvingupon the result of Dinitz et al.
[16] in Theorem 3.1 below; the speciﬁc improvement is in the entirelynew regret guarantee against adversarial cost vectors and a O ( √ n ) improvement in the samplecomplexity.
Note how the proof requires only their existing algorithmic contribution, Claim 3.1, andsome standard tools in online convex optimization.
Theorem 3.1.
Suppose we have a ﬁxed bipartite graph with n ≥ 3 vertices and m ≥ 1 edges.
For any cost vector c ∈ Z m ≥ 0 and any dual vector ˆx ∈ R n there exists an algorithm for MWPM that runs in time
[Equation]
for U ( x ) = (cid:107) x − x ∗ ( c ) (cid:107) 1 , where x ∗ ( c ) the optimal dual vector associated with c .2.
For any δ, ε > 0 and any distribution D over integer m -vectors with (cid:96) ∞ -norm ≤ C there exists a poly-time algorithm that takes O (cid:16)(cid:0) Cnε (cid:1) 2 log nδ (cid:17) samples from D and returns ˆx s.t. w.p. ≥ 1 − δ :
[Equation]
(cid:107) ˆx − x ∗ ( c ) (cid:107) 1 ≤ min (cid:107) x (cid:107)
[Equation]
Let c 1 , . .
c T ∈
Z m ≥ 0 be an adversarial sequence of m -vectors with (cid:96) ∞ -norm ≤ C .
There exists an efﬁcient algorithm that predicts ˆx t after seeing c 1 , . . .
, c t − 1 and achieves regret
[Equation]
Proof.
The ﬁrst result follows by combining Dinitz et al.
[16, Theorem 13] with Claim 3.1.
Forthe third result, let ˆx t be the sequence generated by running the p -norm algorithm [19] withp = 2log n 2log n − 1 and step-size Cn (cid:113) p − 1 eT on the losses U t ( x ) = (cid:107) x − x ∗ ( c t ) (cid:107) 1 over domain [ − C, C ] n .
Since these losses are 1 -Lipschitz in the (cid:96) ∞ -norm and the duals are Cn -bounded in the (cid:96) 1 -norm theregret guarantee follows from Orabona [37, Section 6.6].
For the second result, we apply standardonline-to-batch conversion to the third result, i.e. we draw T = Ω (cid:16)(cid:0) Cnε (cid:1) 2 log nδ (cid:17) samples c t ,run the p -norm algorithm as above on the resulting losses U t , and set ˆx = 1 T (cid:80)
Tt =1 ˆx t to be theaverage of the resulting predictions ˆx t .
Then applying Jensen’s inequality, Cesa-Bianchi et al.
Proposition 1], the regret guarantee above, and Hoeffding’s inequality yields
E [Equation]
(cid:107)
[Table] T
This concludes an overview of our two-step approach for obtaining learning guarantees for algorithmswith predictions.
To summarize, we propose to (1) obtain simple-to-optimize upper bounds U t ( x ) onthe cost of the target algorithm on instance t as a function of prediction x and (2) optimize U t ( x ) usingonline learning.
While conceptually simple, even in this illustrative example it already improves uponpast work; in the sequel we demonstrate further results that this approach makes possible.
Not that,like Dinitz et al.
[16], we are also able to generalize Theorem 3.1 to b -matchings, which we do in Appendix B; another advantage of our approach is that it lets us prove online and statistical learning in thecase where the demand vector b varies across instances rather than staying ﬁxed as in Dinitz et al.
Predicting requests for page migration
Equipped with our two-step approach for deriving guarantees for learning predictors, we investigateseveral more important problems in combinatorial optimization, starting with the page migrationproblem.
Our results demonstrate that even for learning such simple predictors there are interestingtechnical challenges in deriving a learnable upper bound.
Nevertheless, once this is accomplishedthe second step of our approach is again straightforward.
Page migration: Consider a server that sees a sequence of requests s [1] , . . .
, s [ n ] from metric space( K , d ) and at each timestep decides whether to change its state a [ i ] ∈ K at cost Dd ( a [ i − 1] , a [ i ] ) forsome D > 1 ; it then suffers a further cost d ( a [ i ] , s [ i ] ) .
The online page migration (OPM) problem isthen to minimize the cost to the server.
Recently, Indyk et al.
[22] studied a setting where we are givena sequence of predicted points ˆ s [1] , . .
, ˆ s [ n ] ∈ K to aid the page migration algorithm.
They show thatif there exists γ, q ∈ (0 , 1) s.t. γD ∈ [ n ] and for any i ∈ [ n ] we have (cid:80) i + γD − 1 j = i 1 s [ j ] (cid:54)
=
ˆ s [ j ] ≤ qγDthen there exists an algorithm with competitive ratio (1 + γ )(1 + O ( q )) w.r.t.
to the ofﬂine optimal.
This algorithm depends on γ but not q , so we study the setting where γ is ﬁxed.
Deriving an upper bound: As in the previous section, the predictions are discrete, so to use our approach we must convert it into a continuous problem.
As we have ﬁxed γ , the competitive ratio is an afﬁne function of the following upper bound on q :
[Equation]
We assume that the set of points K is ﬁnite with indexing k = 1 , . . .
, |K| and use this to introduce ourcontinuous relaxation, a natural randomized approach converting the problem of learning a predictioninto n experts problems on |K| experts.
For each j ∈ [ n ] we deﬁne a probability vector p [ j ] ∈ (cid:52) |K|governing the categorical r.v.
ˆ s [ j ] , i.e. Pr { ˆ s [ j ] = k } = p [ j,k ] ∀ k ∈ K .
Under these distributions theexpected competitive ratio will be (1 + γ )(1 + O ( E
ˆ s ∼ p Q
(ˆ s, s ))) , for p the product distribution ofthe vectors p j .
Note that forcing each p j to be a one-hot vector recovers the original approach withno loss, so optimizing E ˆ s ∼ p Q
(ˆ s, s ) over p ∈ (cid:52) n |K| would ﬁnd a predictor that ﬁts the original result.
However, E ˆ s ∼ p Q (ˆ s, s ) is not convex in p .
The simplest relaxation is to replace the maximum bysummation, but this leads to a worst-case bound of O (cid:16) nγD (cid:17) .
We instead bound E ˆ s ∼ p Q
(ˆ s, s ) —andthus also the expected competitive ratio—by a function of the following maximum over expectations:
[Equation]
where s [ j,k ] = 1 s [ j ] = k ∀ k ∈ K , i.e. s [ j ] encodes the location in K of the j th request.
As a maximumover n − γD + 1 convex functions this objective is also convex.
Note also that if U s ( p ) is zero—i.e.the probability vectors are one-hot and perfect—then E ˆ s ∼ p Q
(ˆ s, s ) ≥ q will also be zero.
In fact, q isupper-bounded by a monotonically increasing function of U s ( p ) , but as this function is concave andnon-Lipschitz (c.f. Figure 1) we incur an additive O (cid:16) log( n − γD +1) γD (cid:17) loss to obtain an online-learnableupper bound.
This is formalized in the following result (proof in A.1).
Lemma 4.1.
There exist constants a < e, b < 2 /e
and a monotonically increasing function f :[0 , ∞ ) (cid:55)→ [0 , ∞ )
s.t. f (0)
=
and
[Equation]
We now have an convex bound on the competitive ratio for the OPM algorithm of Indyk et al.
For both this and bipartite matching we resorted to a relaxation of a discrete problem.
However,whereas before we only incurred a multiplicative loss (c.f. Claim 3.1), here we have an additiveloss that makes the bound meaningful only for γD (cid:29) log n .
However, as the method we proposeoptimizes U s ( p ) , which bounds q with no additive error via the function f in Lemma 4.1, in-practicewe may expect it to help minimize q in all regimes.
Note that the non-Lipschitzness near zero thatprevents using f for formal regret guarantees comes from the poor tail behavior of Poisson-likerandom variables with small means, which we do not expect can be signiﬁcantly improved.
Learning guarantees: Having established an upper bound, in Theorem 4.2 we again show how alearning-theoretic result follows from standard online learning.
This time, instead of the p -norm algorithm we run the exponentiated gradient (EG) method [44], a classic approach to learning from experts,on each of the n simplices to learn the probability vectors p
[ j ] .
EG performs updates by multiplying bythe negative gradient and is notable for having regret logarithmic in the size |K| of the simplices, whichis important if the metric space is large.
Note that as the relaxation is randomized, our algorithms output a dense probability vector; to obtain a prediction for OPM we must sample ˆ s t [ j ] ∼ p [ j ] ∀ j ∈ [ n ] .
Theorem 4.2.
Let ( K , d ) be a ﬁnite metric space.
For any request sequence s and any set of probability vectors p ∈ (cid:52) n |K| there exists an algorithm for OPM with expected competitive ratio
[Equation]
For any δ, ε > 0 and distribution D over request sequences s of length n in K there exists a poly-time algorithm that takes O (cid:18)(cid:16) γDε (cid:17) 2 (cid:0) n 2 log |K| + log 1 δ (cid:1)(cid:19) samples from D and returns ˆp s.t. w.p. [Equation]
− δ :
[Equation]
Let s 1 , . . .
, s T be an adversarial sequence of request sequences.
There exists an efﬁcient algorithms that plays p t after seeing s 1 , . . .
, s t − 1 and has regret
[Equation]
Proof.
The ﬁrst result follows by combining Indyk et al.
[22, Theorem 1] with Lemma 4.1.
For thethird result let p t be the sequence generated by running n exponentiated gradient (EG) algorithmswith step size (cid:113) log |K| 2 γ 2 D 2 T on the losses U s t ( p ) over (cid:52) n |K| .
Since these losses are γD -Lipschitz and themaximum entropy over the simplex is log |K| , the regret guarantee follows from [44, Theorem 2.15].
For the second result, we apply standard online-to-batch conversion to the third result, i.e. wedraw T = Ω (cid:18)(cid:16) γDε (cid:17) 2 (cid:0) n 2 log |K| + log 1 δ (cid:1)(cid:19)
samples s t , run EG on the resulting losses U s t ( p ) asabove, and set ˆp = 1 T (cid:80)
Tt =1 p t to be the average of the resulting actions p t .
Then applying Jensen’sinequality, Cesa-Bianchi et al.
[12, Proposition 1], the regret guarantee above, and Hoeffding’sinequality yields
[Equation]
T
As before, this result ﬁrst shows how the quantity of interest—in this case the competitive ratio—isupper-bounded by an afﬁne function of some measure U s ( p ) , for which we then provide regret andstatistical guarantees using online learning.
The difﬁculty deriving a suitable upper bound exempliﬁesthe technical challenges that arise in learning predictors, difﬁculties that may be encountered againin other sequence prediction problems such as TCP [10].
Nevertheless, our approach does yield anonline procedure that incurs only O ( log n γD ) additive error over Indyk et al.
[22] in the case of a perfectpredictor and, unlike their work, we provide an algorithm for learning the predictor itself.
Tuning robustness-consistency trade-offs for scheduling and ski-rental
We turn to tuning robustness-consistency trade-offs, introduced in Lykouris and Vassilvitskii [34].
This trade-off captures the tension between following the predictions when they are good (consistency)and doing not much worse than the worst-case guarantee in either case (robustness).
In many cases,this trade-off can be made explicit, by a parameter λ ∈ [0 , 1] .
The setting of λ is crucial, yet previouswork left the decision on the value of λ to the end-user.
Here we show that it is often eminentlylearnable in an online setting, achieving low regret guarantees.
Then we demonstrate how to accomplish a much harder task—tuning λ at the same time as learningto predict—on two related but technically very different variants of the ski-rental problem.
Thismeta-application highlights the applicability of our approach to non-convex upper bounds.
Robustness-consistency trade-offs: Most problems studied in online algorithms with predictions usually have existing worst-case guarantees on the competitive ratio, i.e. a constant γ ≥ 1 on how much worse (multiplicatively) a learning-free algorithm does relative to the ofﬂine optimal cost OPT t on instance t .
While the goal of algorithms with predictions is to use data to do better than this worst-case bound, an imperfect prediction may lead to performance that is much worse.
As a result, most guarantees strive to upper bound the cost of an algorithm with prediction x on an instance t in the following manner:
[Equation]
Here u t is some measure of the quality of x on instance t , λ ∈ [0 , 1] is a parameter, f is a monotonically increasing function that ideally satisﬁes f (0)
= 1 , and g t is a monotonically decreasingfunction that ideally satisﬁes g t (1)
=
γ OPT t .
A very common structure is f ( λ )
= 1 / (1 − λ ) andg t ( λ ) = γλ OPT t .
For example, consider job scheduling with predictions, a setting where we aregiven n jobs and their predicted runtimes with total absolute error η and must minimize the sumof their completion times when running on a single server with pre-emption.
Here Kumar et al.[29, Theorem 3.3] showed that a preferential round-robin algorithm has competitive ratio at mostmin (cid:110)
+2 η/n 1 − λ , 2 λ (cid:111) .
Thus if we know the prediction is perfect we can set λ = 0 and obtain the optimalcost (consistency); on the other hand, if we know the prediction is poor we can set λ
= 1 and get the(tight) worst-case guarantee of two (robustness).
Of course in-practice we often do not know how good a prediction is on a speciﬁc instance t ; wethus would like to learn to set λ , i.e. to learn how trustworthy our prediction is.
As a ﬁrst step,we can consider doing so when we are given a prediction for each instance and thus only need tooptimize over λ .
For example, the just-discussed problem of job scheduling has competitive ratioupper-bounded by U t ( λ )
=
min (cid:110)
+2 η t /n t 1 − λ , 2 λ (cid:111) for n t and η t the number of jobs and the predictionquality, respectively, on instance t .
Assuming a bound B on the average prediction error, we can showthat U t is Lipschitz on [0 , 1] and apply the continuous Hedge algorithm of Krichene et al.
[28]—anexpert algorithm for inﬁnite experts—to get a regret guarantee (proof in A.2):
Corollary 5.1.
For the competitive ratio upper bounds U t of the job scheduling problem with average prediction error η/n t at most B there exists an algorithm with expected regret
[Equation]
where the expectation is over the randomness of the algorithm.
Thus a standard online Lipschitz learning method is able produce a sequence of parameters λ t thatperforms as well as the best tradeoff asymptotically.
We next consider the more difﬁcult setting wherewe wish to learn to predict and tune λ simultaneously.
Ski-rental: We instantiate this challenge on ski-rental, a common setup in which each task t is a ski season with an unknown number of days n t ∈ Z ≥ 2 ; to ski each day, we must either buy skis at price b t or rent each day for the price of one.
The optimal ofﬂine behavior is to buy iff b t < n t , and the best algorithm has worst-case competitive ratio e/ ( e − 1) .
Kumar et al.
[29] and Bamas et al.
Theorem 2] further derive an algorithm with the following robustness-consistency trade-off between blindly following a prediction x and incurring cost u t ( x ) =
b t 1 x>b t + n t 1 x ≤ b t or going with the worst-case guarantee:
[Equation]
Assuming a bound N ≥ 2 on the number of days and B > 0 on the buy price we can show that U t isbounded and Lipschitz w.r.t.
λ .
We can thus run randomized exponentiated gradient over the productset [ N ] × { δ/ 2 , . .
, 1 − δ/ 2 } on the functions U t ( · , x t ) for some δ s.t.
/δ ∈
Z ≥ 2 to get a bound onthe expected regret (proof in A.3).
Corollary 5.2.
For the competitive ratio upper bounds U t of the discrete ski-rental problem thereexists an online algorithm with expected regret
[Equation]
Thus via an appropriate discretization the sequence of predictions ( x t , λ t ) does as well as the joint optimum on this problem.
However, we can also look at a case where we are not able to just discretize to get low regret.
In particular, we consider the continuous ski-rental problem, where each day n t > 1 is a real number, and study how to pick thresholds x after which to buy skis, which has cost u t ( x ) = n
[Equation]
1 n t ≤ x + ( b t + x )1 n t >x .
Note that x = 0 and x = N recovers the previous setting where our decision was to buy or not at the beginning.
For this setting, Diakonikolas et al.
[15] adapt an algorithm of Mahdian et al.
[35] to bound the cost as follows:
[Equation]
While the bound is simpler as a function of λ , it is discontinuous in x because u t is piecewiseLipschitz.
Since one cannot even attain sublinear regret on adversarially chosen threshold functions,we must make an assumption on the data.
In particular, we will assume the days are dispersed :
Deﬁnition 5.3.
A set of (possibly random) points n 1 , . .
. , n T ∈ R are β -dispersed if ∀ ε ≥ T − βthe expected number in any ε -ball is ˜ O ( εT ) , i.e. E max x ∈ [0 ,N ] | [ x ± ε ] ∩ { n 1 , . .
. , n T }| =
˜ O ( εT ) .
Dispersion encodes the stipulation that the days, and thus the discontinuities of u t ( x, λ ) , are not tooconcentrated.
In the i.i.d.
setting, a simple condition that leads to dispersion with β = 1 / 2 is theassumption that the points are drawn from a κ -bounded distribution [6, Lemma 1].
Notably this is astrictly weaker assumption than the log-concave requirement of Diakonikolas et al.
[15] that they usedto show statistical learning results for ski-rental.
Having stipulated that the ski-days are β -dispersed,we can show that it implies dispersion of the loss functions [6] and thus obtain the following guaranteefor the exponentially weighted forecaster [6, 9] applied to U t ( x, λ ) (proof in A.4):
Corollary 5.4.
For cost upper bounds U t of the continuous ski-rental problem there exists an onlinealgorithm with expected regret
[Equation]
Thus in two mathematically quite different settings of ski-rental we can directly apply online learningto existing bounds to not only learn online the best action for ski-rental, but to at the same time learnhow trustworthy the best action is via tuning the robustness-consistency trade-off.
Conclusion and future work
[Figure]
The ﬁeld of algorithms with predictions has been successful in circumventing worst case lowerbounds and showing how simple predictions can improve algorithm performance.
However, exceptfor a few problem-speciﬁc approaches, the question of how to predict has largely been missingfrom the discussion.
In this work we presented the ﬁrst general framework for efﬁciently learninguseful predictions and applied it to a diverse set of previously studied problems, giving the ﬁrst lowregret learning algorithms, reducing sample complexity bounds, and showing how to learn the bestconsistency-robustness trade-off.
One current limitation is the lack of more general-case guaranteesfor simultaneously tuning robustness-consistency and learning the predictor, which we only show forski-rental.
There are also several other avenues for future work.
The ﬁrst is to build on our resultsand provide learning guarantees for other problems where the algorithmic question of how to usepredictions is already addressed.
Another is to try to improve known bounds by solving the problemsholistically: developing easy-to-learn parameters in concert with developing algorithms that can usethem.
Finally, there is the direction of identifying hard problems: what are the instances where noreasonable prediction can help improve an algorithm’s performance?
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s
contributions and scope?
[Yes]
(b) Did you describe the limitations of your work?
[Yes]
(c) Did you discuss any potential negative societal impacts of your work?
[N/A]
(d) Have you read the ethics review guidelines and ensured that your paper conforms to
them?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes] Assumptionsstated in Sections 3, 4, 5, and the Appendix.(b) Did you include complete proofs of all theoretical results?
[Yes] Proofs given inSections 3, 4, and the Appendix.
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[N/A]
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[N/A]
(c) Did you report error bars (e
g., with respect to the random seed after running experi-
ments multiple times)?
[N/A]
(d) Did you include the total amount of compute and the type of resources used (e
g., typeof GPUs, internal cluster, or cloud provider)?
[N/A]
If you are using existing assets (e
g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[N/A]
(b) Did you mention the license of the assets?
[N/A]
(c) Did you include any new assets either in the supplemental material or as a URL?
[N/A]
(d) Did you discuss whether and how consent was obtained from people whose data you’re
using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identiﬁable
information or offensive content?
[N/A]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if
applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A]
A Proofs of main results
A.1 Proof of Lemma 4.1
Proof.
For each j ∈ [ n ] deﬁne p
j = 1 − (cid:104) s
[ j ] , p [ j ] (cid:105) , i.e. the probability that ˆ s j (cid:54) =
s j , and the r.v.
X j ∼ Ber
( p j ) .
Deﬁne also the r.v. S
i
=
(cid:80) i + γD − 1 j = i
X j , s.t.
we have
[Equation]
X
[Equation]
Note that S
i is a Poisson binomial and so has moment-generating function E
p exp( tS i )
= 486 (cid:81) i + γD −j =
i (1 − p j + p j e t ) .
Therefore applying Jensen’s inequality and the union bound yieldsexp (cid:18) [Equation] (cid:19) [Equation]
n
[Equation]
j =
[Equation]
− p
[Equation]
+ p j e
[Equation]
) for all t >
and i ∗ ∈ arg max i ∈ [ n − γD
+
E p S i .
We then havet E p max i ∈ [ n − γD
+
S i ≤ log( n − γD + 1) + i ∗ + γD − 1 (cid:88)
j = i ∗ log(1 − p j + p j e t )
[Equation]
Dividing by t = W (cid:16) log( n − γD +1) x (cid:17) + 1 shows that f ( x ) =
x (exp( t ) − 1)+log( n − γD +1) tγD , where W : [0 , ∞ ) (cid:55)→ [0 , ∞ ) is the Lambert W -function.
Deﬁne L = log( n − γD
+ 1) /e , so we are interested in bounding f
( x ) = x (exp( W ( L/x )+1) − 1)+ eL W
( L/x )+ .
We compute its derivative:
[Equation]
and second derivative:
[Equation]
Since the second derivative is always negative, f is a concave function on x ≥ 0 .
Thus for ω = W
(1)we have
[Equation]
L ( ω + 1 / 3) + Le/ω + 2 eL
L ( ω + 1)( x − L ) = (cid:0) e/ω + 1 / ( ω + 1) 3 − ( e + 1) / ( ω + 1) − 1 / ( ω + 1) 2 (cid:1) x + (cid:0) 1 / ( ω + 1) 2 + e/ ( ω + 1) − 1 / ( ω + 1) 3 (cid:1) L < ex + 2 e log( n − γD + 1)
A.2 Proof of Corollary 5.1
Proof.
We have that U t ( λ ) is bounded above by 3(1 + 2 B ) , its largest gradient is attained at2 / (3 + 2 η t /n ) where it is bounded by (3 + 2 B ) / 2 .
Applying Krichene et al.
[28, Corollary 2] andsimplifying yields the result.
A.3 Proof of Corollary 5.2
Proof.
U t ( x, λ ) is bounded above by 2 N and its largest gradient is attained at λ
= min { b t ,n t } u t ( x ) ≥ 1 Nwith norm bounded by B exp(1 /N )
(exp(1 /N )
− 1) 2 .
Let Λ = { kδ } (cid:98)
/δ
(cid:99) k
=1 for some δ ∈ (0 , 1] .
Then we run EG onthe simplex over [ N ] × Λ and with step-size 12 N (cid:113) log Nδ 2 T to obtain regret compared to the best elementof [ N ] × Λ of 2 N (cid:113) 2 T log
Nδ [44, Theorem 2.15].
Setting δ = min (cid:110) N (exp(1 /N ) − 1) 2 B exp(1 /N )
(cid:113) 2 T , 1 (cid:111) yields
E T (cid:88) t =
[Equation]
log( BT ) + max (cid:26) log N, 1 N
[Equation]
log (cid:18) exp (cid:18)
N (cid:19) −(cid:19)(cid:27)(cid:19)
+ [Equation]
min x ∈ [ N ]
[Equation]
λ
[Equation]
T (cid:88) t =
U t ( x, λ ) ≤
[Equation]
N (cid:112) T log( BNT ) + min x ∈ [ N ] ,λ ∈ (0 , 1]
T (cid:88) t =
U t ( x, λ )
A.4 Proof of Corollary 5.
Proof.
U t ( x, λ ) is bounded above by e ( N + B ) , its largest gradient w.r.t.
λ is attained at λ =
e min { n t ,b t } ( e − 1) u t ( x )+ e min { n t ,b t } , where it is bounded by (cid:16) 2 e ( N + B ) e −(cid:17) 2 , and its largest gradient w.r.t.
x is e ( N + B ) .
Thus the function is 5 e ( N + B ) 2 -Lipschitz w.r.t.
the Euclidean norm, apart from discontinuities atx = n t .
Now, note that our assumption that the points n 1 , . .
. , n T are β -dispersed implies exactly thatthe functions U t are β -dispersed
(c.f.
Balcan et al.
[9, Deﬁnition 2.1]), so the exponentially-weightedforecaster attains expected regret ˜ O
(cid:16)(cid:112) T log( NT )
+ ( N + B ) 2 T 1 − β (cid:17) .
B
b -
matching
Deﬁnition B.1.
For b ∈ R n ≥
the b -seminorm (cid:107) · (cid:107) b , 1 : R n (cid:55)→ R ≥ 0 is (cid:107) x (cid:107) b , 1 = (cid:80) ni
=1 b [ i ] | x [ i ] | .
Claim B.1.
Given any vectors x ∈ Z n and y ∈ R n , let ˜y ∈
Z n be the vector whose elements arethose of y rounded to the nearest integer.
Then for all b ∈ Z n we have (cid:107) x − ˜y (cid:107) b , 1 ≤ 2 (cid:107) x − y (cid:107) b , 1 .
Proof.
Let S ⊂ [ n ] be the set of indices i ∈ [ n ] for which x
[ i ] ≥ y
[ i ] ⇐⇒
˜y
[ i ] = (cid:100)
y
[ i ] (cid:101) .
Fori ∈ [ n ] \ S we have | x [ i ] − y
[ i ] | ≥ 1 / 2 ≥ | ˜y [ i ] − y
[ i ] | so it follows by the triangle inequality that
[Equation]
b
[Equation]
=
[Equation]
Theorem B.2.
Suppose we have a ﬁxed graph with n ≥ 3 vertices and m ≥ 1 edges.
For any cost vector c ∈ Z m ≥ 0 , any demand vector b ∈ Z n ≥ 0 , and any dual vector ˆx ∈ R n there exists an algorithm for minimum weight perfect b -matching that runs in time ˜ O ( mnU ( ˆx )) , whereU ( x ) = (cid:107) x − x ∗ ( c , b ) (cid:107) b , 1 for x ∗ ( c , b ) the optimal dual vector associated with c and b .2.
For any δ, ε > 0 and any distribution D over (cost, demand) vector pairs in Z m ≥
×
Z n ≥with respective (cid:96) ∞ -norms bounded by C and B there exists a poly-time algorithm that takes O (cid:16)(cid:0)
[Equation]
log nδ (cid:17) samples from D and returns ˆx s.t. w.p. ≥ 1 − δ :
[Equation]
Let ( c 1 , b 1 ) , . . .
, ( c T , b T ) ∈
Z m ≥
× Z n ≥ 0 be an adversarial sequence of (cost, demand) vector pairs with (cid:96) ∞ -norms bounded by C and B , respectively.
There exists an efﬁcient algorithm that predicts ˆx t after seeing ( c 1 , b 1 ) , . . .
, ( c t − 1 , b t − 1 ) and achieves regret
[Equation]
Proof.
The ﬁrst result follows by Dinitz et al.
[16, Theorem 31] and Claim B.1.
For the third, let ˆx t begenerated by running the p -norm algorithm [19] with p = 2log n 2log n − 1 and step-size CnB (cid:113) p − 1 eT on losses
U t ( x ) = (cid:107) x − x ∗ ( c t , b t ) (cid:107) b t , 1 over [ − C, C ] n .
Since these are B -Lipschitz in the (cid:96) ∞ -norm and the duals are Cn -bounded in the (cid:96) 1 -norm the regret follows from Orabona [37, Section 6.6].
For the secondresult, apply online-to-batch conversion to the third result, i.e. draw T = Ω (cid:16)(cid:0) CBnε (cid:1) 2 log nδ (cid:17) samples( c t , b t ) , run the p -norm algorithm as above on the resulting losses U t , and set ˆx = 1 T (cid:80) Tt =1 ˆx t tobe the average of the resulting predictions ˆx t . Then applying Jensen’s inequality, Cesa-Bianchi et al.[12, Proposition 1], the regret guarantee, and Hoeffding’s inequality yields [Equation]
C Additional applications
C.1 Linear predictors from instance features
Computational instances on which we want to run algorithms with predictions often come withinstance-speciﬁc features, e.g. ones derived from text descriptions of the instance or summarystatistics about related graphs or environments [27, 30].
It is thus natural to learn parameterizedfunctions, e.g. linear mappings or neural networks, from these features to predictions.
However, therehas been very little work, in either the statistical or online setting, showing that such predictions arelearnable.
In this section we show how our framework naturally handles this setting by exploiting theconvexity of compositions of convex and afﬁne functions, resulting in the ﬁrst formal guarantees forlinear predictors for algorithms with predictions.
While the ﬁrst application to the matching problemof Dinitz et al.
[16] is a straightforward extension, we also show how to handle more complicatedcases, such as when the output space is constrained to probability simplices as in the page migrationproblem.
Note we assume all feature vectors lie in the f -dimensional simplex; this is generally easyto accomplish by normalization.
For simplicity we also only consider learning the linear transformfrom features to predictors and not the intercept, as the latter follows by appending an extra dimensionwith value 1 / 2 to the feature vector and doubling the bound on the norm of the linear transform.
C.1.1 b -matching
Our ﬁrst application for learning mappings from instance features is to the b -matching setting.
Notethat the learning-theoretic results for the regular bipartite matching setting in Section 3 follow directlyby setting b = 1 n for all instances, and that the learning-theoretic results of Theorems 3.1 and B.2are also special cases of the following when f = 1 1 for all instances.
Theorem C.1.
Consider the setting of Theorem B.2.
{+For any δ, ε > 0 and any distribution D over (cost, demand, feature) vector triples in Z m ≥ 
+}
× Z n ≥ 0 × (cid:52) f s.t. the respective (cid:96)
∞ -norms of the ﬁrst two are bounded by C and B , respectively, there exists a poly-time algorithm that takes O (cid:16)(cid:0) CBnε (cid:1) 2 (cid:0) f 2 log( nf ) + log 1 δ (cid:1)(cid:17) samples from D and returns ˆA ∈ R n × f s.t. w.p. ≥ 1 − δ :
[Equation]
Let ( c 1 , b 1 , f 1 ) , . . .
, ( c T , b T , f T ) ∈
{+Z m ≥ 
+}
× Z n ≥ 0 × (cid:52) f be an adversarial sequence of (cost, demand, feature) vector triples s.t.
the (cid:96) ∞ -norms of the ﬁrst two are bounded by C and
B , respectively.
There exists an efﬁcient algorithm that predicts ˆA t ∈ R n × f after seeing ( c 1 , b 1 , f 1 ) , . . . , ( c t − 1 , b t − 1 , f t − 1 ) and achieves regret [Equation] Proof.
For the second result let ˆA t be generated by running the p -norm algorithm
[19] withp = 2log( nf
[Equation]
nf ) − 1 and step-size CnfB (cid:113) p − 1 eT on losses U t
( Af ) = (cid:107) Af − x ∗ ( c t , b t ) (cid:107) b t , 1 over[ − C, C ] n × f . Since these are B -Lipschitz in the (cid:96) ∞ -norm and the dual are Cn -bounded in the(cid:96) 1 -norm the regret follows from [37, Section 6.6].
For the ﬁrst result, apply online-to-batchconversion to the third result, i.e. draw T = Ω (cid:16)(cid:0) CBnε (cid:1) 2 (cid:0) f 2 log( nf ) + log 1 δ (cid:1)(cid:17) samples ( c t , b t , f t ) ,run the p -norm algorithm as above on the resulting losses U t , and set ˆA = 1 T (cid:80) Tt =1 ˆA t to be theaverage of the resulting predictions ˆA t . Then applying Jensen’s inequality, Cesa-Bianchi et al.
Proposition 1], the regret guarantee, and Hoeffding’s inequality yields [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
C.1.2 Online page migration
Using instance features for online page migration is more involved because the output space must beconstrained to the product of n |K| -dimensional simplices.
However, we can solve this by restrictingto tensors consisting of matrices whose columns sum to one, also known as rectangular stochasticmatrices.
Note that the learning-theoretic results of Theorem 4.2 are special cases of the followingwhen f = 1 1 for all instances.
Theorem C.2.
In the setting of Theorem 4.2 let S n ×|K|× f be the set of stacks of |K| ×
f nonnegativematrices whose columns have unit norm.1.
For any δ, ε > 0 and distribution D over request sequences s of length n in K and associated feature vectors f ∈ (cid:52) f there exists a poly-time algorithm that takes
O (cid:18)(cid:16) γDε (cid:17) 2 (cid:0) n 2 f 2 log |K| + log 1 δ (cid:1)(cid:19) samples from D and returns
ˆA s.t. w.p.
[Equation]
δ :
[Equation]
Let ( s 1 , f 1 ) , . . .
, ( s T , f T ) be an adversarial sequence of (request sequences, feature) pairs.
There exists an efﬁcient algorithm that plays A t after seeing ( s 1 , f 1 ) , . . .
, ( s t − 1 , f t − 1 ) and has regret
[Equation]
Proof.
For the second result let A t be the sequence generated by running nf EG algorithms with stepsize (cid:113) log |K| 2 γ 2 D 2 T on the losses U s t
( Af ) over S n ×|K|× f .
Since these losses are γD -Lipschitz and themaximum entropy over the simplex is log |K| , the regret guarantee follows from [44, Theorem 2.15].
For the ﬁrst result, apply standard online-to-batch conversion to the second result, i.e. draw T =Ω (cid:18)(cid:16) γDε (cid:17) 2 (cid:0) n 2 f 2 log |K| + log 1 δ (cid:1)(cid:19) samples ( s t , f t ) , run EG on the resulting losses U s t ( Af t ) asabove, and set ˆA = 1 T (cid:80)
Tt =
1 A t to be the average of the resulting actions A t .
Then applying Jensen’sinequality, Cesa-Bianchi et al.
[12, Proposition 1], the regret guarantee above, and Hoeffding’s inequality yields
[Equation]
T
C.1.3 Online scheduling
Our last result for learning linear feature maps considers a new application of online scheduling forminimizing the fractional makespan, following the work of Lattanzi et al.
In this setting, weconsider m machines and the problem of assigning a sequence of variable-sized jobs to each underfeasible assignment constraints [30, Section 3].
The original authors provide an algorithm that usespredictions of machine weights to assign jobs based on how well those weights correspond to machinedemand.
They also consider learning linear as well as more complicated predictors from features butshow no guarantees.
In this section we provide learning guarantees for the linear prediction settingin which we target the logarithm of the machine weights, which makes the problem convex.
Forthe online result, we use the parameter-free algorithm of Orabona and Pal [38], which enables us tonot assume any bound on the machine weights and thus be able to compete with the optimal linearpredictor in all of R m × f .
Theorem C.3.
Suppose we are in the online restricted assignment setting with m ≥ 1 machines, asdeﬁned in Lattanzi et al.
[30, Section 2.1].
For any predicted machine logits ˆx ∈ R m there exists an online algorithm whose fractional makespan has competitive ratio
[Equation]
for U ( x ) = (cid:107) x − log w (cid:107) ∞ , where w ∈ R m> 0 are good machine weights, as deﬁned in Lattanziet al.
[30, Section 3]
For any δ, ε > 0 and distribution D over machine (weight, feature) vector pairs in R m> 0 ×(cid:52) f such that the natural logarithm of each entry of the former is bounded in (cid:96) ∞ -norm by B there exists poly-time algorithm that takes O (cid:16) (cid:0) Bε (cid:1) 2 (cid:0) mf + log 1 δ (cid:1) (cid:17) samples from D and returns ˆ A ∈ R m × f s
t. w
p. ≥ 1 − δ
[Equation]
Let ( w 1 , f 1 ) , . . .
, ( w T , f T ) ∈ R m> 0 × (cid:52) f be an adversarial sequence of (weights, feature) pairs.
There exists an efﬁcient
algorithm
that plays
A t after seeing ( w 1 , f 1 ) , . . .
, ( w t − 1 , f t − 1 ) and has regret w.r.t.
any
A
∈
R m
× f of
T (cid:88) t =
[Equation]
Note that for the case of bounded matrices A there exists an efﬁcient algorithm with regret
[Equation]
Proof.
The ﬁrst result follows by substituting max i ˆx
[ i ] / w [ i ] for η in Lattanzi et al.
[30, Theorem 3.1]and then upper bounding the maximum by the (cid:96) ∞ -norm.
For the third result let A t be the sequencegenerated by running the KT OCO algorithm Orabona and Pal [38, Algorithm 1] using ε = 1 andthe gradients of (cid:107)
A t f t − log w t (cid:107) ∞ as the reward vectors; the regret guarantee then follows from
Orabona and Pal [38, Corollary 5] and the fact that the gradients are 1-Lipschitz w.r.t.
the (cid:96) 1 -normand thus also the Euclidean norm.
Note that the case of competing with B -bounded
A follows byapplying projected online gradient descent (OGD) over (cid:107) A (cid:107) max ≤ B with step-size B (cid:113) mf 2 T [44,
Corollary 2.7].
Finally, the second result follows by applying online-to-batch conversion to thebounded version of the third, i.e. draw T = Ω (cid:16)(cid:0) Bε (cid:1) 2 (cid:0) mf + log 1 δ (cid:1)(cid:17) samples ( w t , f t ) , run OGD onthe resulting losses (cid:107)
Af t − log w t (cid:107) ∞ as above, and set ˆA = 1 T (cid:80)
Tt =
1 A t to be the average of theresulting actions A t .
Then applying Jensen’s inequality, Cesa-Bianchi et al.
[12, Proposition 1], theregret guarantee above, and Hoeffding’s inequality yields
[Equation]
t =
[Table]
(cid:107)
A t f t − log w t (cid:107) ∞ + 2 B (cid:114)
T log δ ≤ min (cid:107)
[Table]
(cid:107)
[Table]
T
T (cid:88) t =
[Table]
(cid:107)
Af t − log w t (cid:107) ∞ + B (cid:114) 2 mf
T + 2 B (cid:114)
T log δ ≤ min
[Table]
E
[Table]
, f ) (cid:107)
Af
[Equation]
log w (cid:107) ∞ + B (cid:114) 2 mf
T + 4 B (cid:114)
T log δ
C.2 Faster graph algorithms with predictions
In this section we compare to the results of Chen et al.
[13], who analyze several prediction-basedgraph algorithms, including one with an improved prediction-dependent runtime for the matchingapproach of Dinitz et al.
[16] and a prediction-dependent bound for single-source shortest path.
From the learnability perspective, they observe two important error metrics in the analysis of graphalgorithms with predictions: the (cid:96) 1 -metric of Dinitz et al.
[16] measuring the (cid:96) 1 -norm between theprediction and a ground truth vector such as the dual and the (cid:96) ∞ -metric measuring the (cid:96) ∞ -normbetween the same quantities.
In the ﬁrst case their setting and results are equivalent to those of Dinitzet al.
[16], so we improve upon this by a factor of O ( d ) , where d is the dimension of the hint.
To analyze the (cid:96) ∞ case, we start by showing that—as in the (cid:96) 1 case—we can round integer vectorswith only a multiplicative factor loss:
Claim C.1.
Given any vectors x ∈ Z n and y ∈ R n , let ˜y ∈
Z n be the vector whose elements arethose of y rounded to the nearest integer.
Then we have (cid:107) x − ˜y (cid:107) ∞ ≤ 2 (cid:107) x − y (cid:107) ∞
[Equation]
Proof.
Let S ⊂ [ n ] be the set of indices i ∈ [ n ] for which x
[ i ] ≥ y
[ i ] ⇐⇒
˜y
[ i ] = (cid:100)
y
[ i ] (cid:101) .
Fori ∈ [ n ] \ S we have | x [ i ] − y
[ i ] | ≥ 1 / 2 ≥ | ˜y [ i ] − y
[ i ] | so it follows by the triangle inequality that
[Equation]
We are thus able to also use online convex optimization in this setting and apply the rounded outputsto graph algorithms.
In particular, we can use regular OGD to improve upon the (cid:96) ∞ -learnabilityresult of Chen et al.
[13] by a factor of O ( d 2 ) , where d is the dimension of the prediction:
Theorem C.4.
Consider any graph algorithm with optimal d -dimensional M -bounded predictionsh ( c ) associated with every instance c .1.
For any δ, ε > 0 and distribution D over instances there exists a poly-time algorithm that takes
O (cid:16)(cid:0)
Mε (cid:1) 2 (cid:0) d
+ log 1 δ (cid:1)(cid:17) samples from D and returns ˆh ∈ R d s.t. w.p. ≥ 1 − δ
[Equation]
Let c 1 , . .
c T be an adversarial sequence of instances.
There exists an efﬁcient algorithm that plays ˆh t after seeing c 1 , . . .
, c t − 1 and achieves regret
[Equation]
Proof.
The proof is the same as for the last two results of Theorem C.3 in the special case f = 1 .
C.3 Permutation predictions for non-clairvoyant scheduling
{+Finally, we discuss the the applicability of our framework to the results in Lindermayr and Megow [33], who study how to prioritize among n jobs by predicting the best permutation of them under weights w ∈ R n ≥ 0 and processing requirements p ∈ R n ≥ 
+}
that are only known after completion.
Ignoring robustness-consistency tradeoffs and terms that do not depend on the prediction, they show that in several settings the competitive ratio depends linearly on the following error of an n × n permutation matrix X :
[Equation]
T ) where U ∈ { 0 , 1 } n × n is upper triangular.
The above expression is derived from the third equation inthe proof of Theorem 4.1 of Lindermayr and Megow [33] for the case of z = 1 sample; we constructthe matrix form to reason about its online learnability.
Naively, a sequence of bounded functions of permutations is inefﬁciently learnable by using randomized EG over the n !
experts corresponding to each permutation:
Theorem C.5.
Consider the setting of Lindermayr and Megow [33] with n jobs with W -boundedweights and P -bounded processing times.
Let P n × n be the set of n × n permutation matrices.
For any δ, ε > 0 and distribution D over weights and processing requirements there exists an algorithm that takes O (cid:16)(cid:0)
WPnε
[Equation]
2 (cid:0) n log n + log 1 δ (cid:1)(cid:17) samples from D and returns a discrete distribution ˆx ∈ (cid:52) n ! over P n × n such that
[Equation]
Let ( w 1 ,
p w T , p T ) be an adversarial sequence of job (weight, processing requirement)
pairs.
There exists an algorithm that plays X t after seeing ( w 1 , p 1 ) , w t − 1 , p t − 1 )
and
achieves regret
[Equation]
where the expectation is over the randomness of the algorithm.
Proof.
For the second result let ˆx t ∈ (cid:52) n !
be the sequence generated by running EG with step-size 637 (cid:113) log( n !)
2 T over the n !
experts corresponding to each element of P n × n .
Then the sequence of permutation matrices X t ∼ ˆx t sampled from this distribution satisﬁes the guarantee on the expected regret [44,
Corollary 2.14] since log( n !)
≤ n log n and U w , p is WPn -bounded.
The ﬁrst result follows by applying online-to-batch conversion to this sequence, i.e. we draw T = Ω (cid:16)(cid:0)
WPnε (cid:1) 2 (cid:0) n log n + log 1 δ (cid:1)(cid:17)samples ( w t , p t ) , run randomized EG as above, and set ˆx = 1 T (cid:80)
Tt =1 ˆx t to be the average of the resulting distributions ˆx t .
Then applying Jensen’s inequality, Cesa-Bianchi et al.
[12, Proposition 1],the regret guarantee above, and Hoeffding’s inequality yields
[Equation]
The sample complexity guarantee resulting from online-to-batch conversion matches that of Lindermayr and Megow [33], except that the output is a distribution over permutation matrices so the error isin expectation over that distribution.
However, randomized EG is incredibly inefﬁcient due to the needto store and sample from a distribution over n !
variables.
Another way of learning over permutationmatrices is to run an online learning algorithm over the set of doubly stochastic matrices [21].
Whenthe losses are linear functions of the permutation matrices this is yields efﬁcient low-regret algorithmsbecause each doubly stochastic matrix corresponds to a small convex combination of permutationmatrices, i.e. a distribution from which one can sample an action.
However, the losses U w , p arenonlinear and so a different approach is needed.