Online Bipartite Matching with Advice: Tight Robustness-Consistency Tradeoffs for the Two-Stage Model
Anonymous Author(s)
AfﬁliationAddress email
Abstract
We study the two-stage vertex-weighted online bipartite matching problem of
Feng, Niazadeh, and Saberi (SODA ‘21) in a setting where the algorithm has access to a suggested matching that is recommended in the ﬁrst stage.
We evaluatean algorithm by its robustness R , which is its performance relative to that of theoptimal ofﬂine matching, and its consistency C , which is its performance whenthe advice or the prediction given is correct.
We characterize for this problem the
Pareto-efﬁcient frontier between robustness and consistency, which is rare in theliterature on advice-augmented algorithms, yet necessary for quantifying such analgorithm to be optimal.
Speciﬁcally, we propose an algorithm that is R -robustand C -consistent for any ( R, C ) with 0  R  34 and p 1  R + p 1  C = 1 ,and prove that no other algorithm can achieve a better tradeoff.
Introduction
Online bipartite matching is a fundamental model used to assign incoming requests to servers, incoming workers to jobs, incoming impressions to online advertisers, etc.
Traditionally, it has beenstudied in either the adversarial setting, where nothing is assumed about the future; or the stochasticsetting where future arrivals are assumed to follow a distributional model.
However, algorithms forthe former tend to be overly conservative in their decisions; whereas algorithms for the latter canperform terribly when the assumed model is wrong.
Therefore, a recently budding literature hasstudied advice-augmented online algorithms which use a machine-learned prediction to reﬁne theirdecisions but do not perform as terribly when the prediction is wrong.
In many problems including online matching there is an inherent tradeoff between an algorithm’sperformance when the prediction is correct, called its consistency and the algorithm’s performanceunder the worst-case future, called its robustness .
This is because a high consistency can onlybe achieved by optimizing as if the predicted future was correct, resulting in a decision that can beterrible in the worst case.
Conversely, a high robustness requires hedging against all possible futures,which does not sufﬁciently prioritize the one predicted to come true.
In this paper we characterize a tight robustness-consistency tradeoff for online bipartite matching,by adding advice to the model of Feng et al.
[1] where the online vertices arrive in two stages (butmany online vertices can arrive simultaneously).
That is, we derive a continuum of algorithms fortwo-stage online bipartite matching that deﬁne the Pareto-efﬁcient frontier of the tradeoff betweenperformance when a prediction is right vs. performance when it is wrong.
To our knowledge, Paretoefﬁciency results are rare in the literature on advice-augmented online algorithms, especially whenit comes to online matching (as we review in Subsection 1.3); yet, they are necessary for quantifying an advice-augmented online algorithm to be optimal.
We now concretely explain the model, ouralgorithm, and the Pareto-efﬁcient frontier it achieves between robustness and consistency.
1.1 Model and Results
We focus on the vertex-weighted version of the two-stage online bipartite matching problem (see
Subsection 1.2 for other variants).
In this problem, there is an underlying bipartite graph G =( D, S, E ) , where D stands for “demand“ and S stands for “supply”.
The vertices in S are weightedand ofﬂine (i.e. known in advance), while the vertices in D arrive online in two batches D 1 and D 2 .
When the vertices in each batch arrive, all their incident edges to S are revealed, and the algorithm’stask is to choose a matching.
The algorithm’s choices are irrevocable, and its goal is to maximize thetotal weight of the matched ofﬂine vertices after both batches have arrived.
Observe that the optimalsecond-stage decision is clearly to select the best matching subject to the matching already chosenin the ﬁrst stage; therefore the complexity of the problem boils down to ﬁnding a good ﬁrst-stagematching.
In the advice-augmented model we introduce, the algorithm receives a suggested matching A tomake after the edges incident to the ﬁrst-stage vertices D 1 have been revealed.
Our model allowsfor an arbitrary advice A , although typically A would be the matching that, for a given (probabilistic)prediction of D 2 and its incident edges, maximizes the (expected) total weight matched after bothstages have arrived.
We deﬁne consistency based on this suggested matching, and explain later how it reduces to thestandard notion of consistency based on prediction error (see Subsection 1.2).
That is, we deﬁne analgorithm’s consistency as how well it performs relative to the best matching that could have beenobtained by exactly following the advice in the ﬁrst stage.
Meanwhile, we deﬁne an algorithm’srobustness using the standard notion of competitive ratio , which is the algorithm’s performancerelative to the optimal maximum-weight matching in hindsight.
We then say that an algorithm is
C -consistent
and R -robust, respectively, if its consistency is at least C and robustness is at least Rfor all possible graphs G and suggested matchings A .
Formally, this requires
[Equation]
where following the earlier descriptions, ALG ( G, A ) is the algorithm’s expected performance whengiven advice A and the graph ends up being G , ADVICE ( G, A ) is the performance from followingadvice A exactly on graph G , and OPT ( G ) is the maximum-weight matching in graph G .
Notethat since ADVICE ( G, A )  OPT ( G ) , any algorithm that is R -robust is automatically at least Rconsistent.
However, C can be higher than R , and having a consistency guarantee is desirable whenthe advice is good, because intuitively ADVICE ( G, A ) will be large and close to OPT ( G ) .
We now describe our algorithm.
Here, it is convenient to consider the fractional relaxation of theproblem, which allows vertices to be ﬁlled partially.
In Section 2 we formally deﬁne the fractionalproblem and show how to losslessly round any fractional solution to a randomized matching, so thatwe can focus on deﬁning our algorithm for the fractional problem.
First, in the absence of advice (i.e. when one only cares about robustness), traditional algorithmsfor online matching can be described as using a penalty function to “balance” how much to ﬁll theofﬂine vertices; the optimal competitive ratio is usually achieved by carefully choosing the rightpenalty function.
Using a linear penalty function, Feng et al.
[1] give an algorithm for two-stagebipartite matching that is 34 -robust, which they prove is optimal.
However, since this algorithmmakes no use of the advice, it is only 34 -consistent.
On the other hand, note that the naive algorithmwhich always follows the advice exactly is 1-consistent but 0-robust.
At this point, a natural idea forobtaining a continuum of robustness-consistency guarantees is to run the algorithm of Feng et al.
[1]with probability p , and otherwise run the naive algorithm with probability 1  p .
As the coin-ﬂipprobability p ranges from 0 to 1, the robustness/consistency of this coin-ﬂip algorithm ranges alongthe line between ( R, C ) =
(0 , 1) and ( R, C ) =
( 34 , 34 ) (see the orange dashed line in Figure 1).
To improve upon these naive guarantees, we revisit the penalty function approach.
Our main insightis that for any given robustness level R 2 [0 , 34 ] , there is actually a family of penalty functionsthat guarantees R -robustness.
While a traditional algorithm for online matching would choose thesame penalty function for all the ofﬂine vertices, we observe that by choosing different penalty functions, we can incentivize the algorithm to prioritize matching to the vertices that are suggestedby the advice, all while guaranteeing R -robustness.
We prove that such an algorithm ends up being
C -consistent, where C is the unique value (decreasing in R ) that satisﬁes the equation p 1  R +p 1  C = 1 .
This curve is also plotted in Figure 1 and is a signiﬁcant improvement over thestraight-line interpolation.
This elementary, symmetric curve also happens to be tight.
Organization of paper.
Notation and the reduction from integer to fractional matching is presentedin Section 2.
Our algorithm is formally deﬁned in Section 3.
Proofs of robustness and consistencyare sketched in Section 4 and Section 5 respectively, highlighting our new techniques.
The hardnessinstance certifying our tradeoff curve of p 1  R + p 1  C = 1 to be tight is presented in Section 6.
1.2 Discussion of Other Variants and Deﬁnitions
Multi-stage variant.
Classical models of online matching and budgeted allocation [2, 3] allow morethan two stages of online arrivals, and algorithms that hybridize between a ﬁxed “advice” algorithmand traditional algorithms that “balance” against the adversary were introduced in Mahdian et al.[4].
However, under this framework it is difﬁcult to deﬁne how the advice algorithm should reactif the observed arrivals start to diverge from its predictions, making any tightness results betweenrobustness and consistency elusive.
Therefore, we instead focus on the elegant two-stage model of Feng et al.
[1], avoiding any complexities in how the advice should adapt to the accuracy of pastpredictions.
We note that the guarantees in Mahdian et al.
[4] do not apply to our setting, since they do not handlethe innovation in Feng et al.
[1] of allowing multiple online vertices to arrive simultaneously.
However, even supposing they could be generalized with no loss, their guarantees would be signiﬁcantlyworse than ours (see Figure 1, which plots in green the tradeoff curve described in Theorem 4.1 intheir paper).
In fact, as observed in the upper-left part of Figure 1, the guarantees of Mahdian et al.[4] can be worse than the simplistic coin-ﬂip algorithm that either runs the “advice” algorithm, orruns the “balance” algorithm from the multi-stage setting 1 .
This demonstrates the need for a simpleradvice-augmented online matching framework as we propose, in which the Pareto-efﬁcient tradeoffbetween robustness and consistency can be exactly understood.
Unweighted variant.
In the special case where all ofﬂine vertices have a weight of 1, a better robustness-consistency tradeoff is possible—in fact, we show that the simplistic coin-ﬂip algorithm is optimal.
This is because in the unweighted case, any maximal matching is at least 12 as large as optimal, and therefore naively following the advice is now 12 -robust (instead of 0-robust) and still 1-consistent.
The robustness-consistency guarantees are now deﬁned by the straight line between ( R, C )
= ( 12 , 1) and ( R, C ) =
( 34 , 34 ) , which is optimal (see Appendix A).
However, in the more general vertex-weighted variant the straight-line guarantees are suboptimal, justifying the need for our approach in Subsection 1.1.
Consistency deﬁned based on prediction error.
Many papers about prediction-augmented online algorithms (reviewed in Subsection 1.3) do not analyze two separate ratios ALG ( G,A ) OPT ( G ) and ALG ( G,A ) ADVICE ( G,A ) .
Instead, their approach is to provide a general guarantee on ALG ( G,A ) OPT ( G ) parameterized by prediction error , and deﬁne consistency as the guarantee obtained when the error is 0.
Theprediction error captures how much the prediction deviates from the truth, and its precise deﬁnitiondepends on the problem at hand.
Our deﬁnition of robustness and consistency can be easily translated to a guarantee involving prediction error, because we can always deﬁne the error of advice A to be ⌘ := 1  ADVICE ( G,A ) OPT ( G,A ) .
Whenwe do so, our robustness/consistency guarantee immediately implies the parameterized guarantee
[Equation] [Equation]
[Equation] [Equation] R )) } , for any value of R 2 [0 , 34 ] that we can set.
More generally, our deﬁnition can accommodate other notions of predictions and their associatederror 2 , as long as it is possible to quantify how they affect the value of ADVICE ( G, A ) .
1.3 Further Related Work
Despite the recent surge of interest in both online matching and online algorithms with advice (seethe recent surveys Huang and Tr¨obst [6] and Mitzenmacher and Vassilvitskii [7] respectively), literature on online matching with advice has been relatively scant.
We mention some papers in thisintersection below, as well as other related work.
Online matching with advice.
Since Mahdian et al.
[4], more recently Antoniadis et al.
[8] haveintroduced an online random-order edge-weighted bipartite matching problem with advice that predicts the edge weights adjacent to each ofﬂine vertex in some optimal ofﬂine matching.
Lavastidaet al.
[5] introduced a framework that formalizes when predictions can be learned from past data,and their algorithmic performance degrades gracefully as a function of prediction error.
Broadlyspeaking, our work contrasts these three papers in that we are able to understand tight tradeoffs inwhether to trust some advice, although in an arguably simpler setting.
Online matching models in-between adversarial and stochastic.
Instead of abstracting all information about the future into a single piece of prediction/advice that could be wrong, anotherapproach is to postulate an explicit model for how the future can deviate from past observations.
Examples of this include the semi-online bipartite matching model of Kumar et al.
[9] and the partially predictable model of Hwang et al.
We note that random-order arrivals can also be viewedas a form of partial predictability which allows learning [11], and moreover it is possible to derive simultaneous guarantees under adversarial and random-order arrivals [12] which have the same ﬂavoras robustness-consistency guarantees.
Finally, we mention that the single sample model in Kaplanet al.
[13] can be viewed as a form of online matching with advice that is highly erroneous.
Optimality results in prediction-augmented online algorithms.
Tight robustness-consistencytradeoffs have become recently understood in prediction-augmented ski rental [14–16] and singlecommodity accept/reject problems [17, 18].
Our online matching problem contrasts these by havinga multi-dimensional state space, for which to our knowledge tightness results are rare.
We shouldmention that in multi-dimensional problems such as prediction-augmented caching [19] and onlinewelfare maximization [20], “optimality” results in which consistency can be achieved with no lossof robustness (i.e. there is no “tradeoff”) have been derived.
Two-stage models.
Two-stage models capture the essence of optimization under uncertainty, wherethe ﬁrst-stage decision must anticipate the uncertainty, and the second-stage decision is usually atrivial recourse after the uncertainty (in our case the second-stage graph) has been realized.
We referto Birge and Louveaux [21] and Bertsimas et al.
[22] for broad overviews of two-stage stochasticand robust optimization.
In this paper we focus on the two-stage online matching model of Fenget al.
[1], introducing advice to this model and fully characterizing the tradeoff between obeyingvs.
disobeying the advice.
We note that a multi-stage online matching model motivated by batchinghas also been recently considered in Feng and Niazadeh [23], and two-stage matching has beenformulated as a robust optimization problem in Housni et al.
Preliminaries and Notation
The problem input consists of a bipartite graph G
=
( D, S, E ) , where the online vertices in D arrivein two batches D 1 , D 2 .
We index the vertices in D (resp.
S ) with i (resp.
j ).
When the verticesin D k ( k = 1 , 2 ) arrive, all their incident edges to S are revealed, and the algorithm irrevocablychooses a matching M k between D k and S .
Each ofﬂine vertex j 2 S has a weight w j , and thegoal is to maximize
P ( i,j ) 2 M 1 [ M 2 w j .
We evaluate an algorithm by its robustness and consistency,which were deﬁned in Subsection 1.1.
Worst-case instances.
The following observation is crucial to our analysis.
Note that when bounding robustness and consistency, one can assume WLOG that the second-stage graph consists of amatching.
To see this, suppose we are bounding robustness, and consider the edges not matched by
OPT ( G ) in the second stage.
Deleting these edges does not change the value of OPT ( G ) and canonly decrease the value of the matching found by the algorithm.
Therefore we may assume that thesecond stage graph consists exactly of the matching selected by OPT ( G ) in the second stage.
Thesame argument shows that when bounding consistency, we may assume that the second-stage graphconsists exactly of the matching selected by ADVICE ( G, A ) in the second stage.
Therefore fromnow on we assume the second-stage graph is a matching.
Reduction to fractional matching.
The preceding observation about worst-case instances allowsus to focus on the fractional version of the problem, which is easier to analyze and deﬁned asfollows.
In each stage, the algorithm chooses a fractional matching instead of an integral one.
Letx =
( x ij : i 2 D 1 , j 2 S, ( i, j ) 2 E ) be the fractional matching chosen in the ﬁrst stage, so thatx satisﬁes the constraints x i :=
P j :( i,j ) 2 E x ij  1 and x j :=
P i :( i,j ) 2 E x ij  1 .
Similarly, lety =
( y ij : i 2 D 2 , j 2 S, ( i, j ) 2 E ) be the fractional matching in the second stage, which satisﬁesy i :=
P j :( i,j ) 2 E y ij  1 and y j :=
P i :( i,j ) 2 E y ij  1  x j .
The objective in the fractional problemis to maximize
P j 2 S w j ( x j + y j ) .
As mentioned earlier, the ﬁrst stage decisions x j are the criticalones; therefore we will use the terminology that each ofﬂine vertex j 2 S is ﬁlled to water level x jat the end of the ﬁrst stage.
Although the fractional problem seems at ﬁrst to be easier than the integral problem, it turns outto be straightforward to convert any fractional algorithm for two-stage bipartite matching into a(randomized)
integral one with the same robustness/consistency guarantees.
To see why, considerany fractional algorithm and let x be its ﬁrst-stage output.
To convert this to a randomized integralalgorithm, we sample an integral matching M 1 with marginals equal to x (i.e. P (( i, j ) 2 M ) =
x ijfor all edges ( i, j ) in the ﬁrst-stage graph).
We then take M 2 to be the maximum-weight matchingin the second-stage graph, subject to M 1 already being chosen.
To analyze the (expected) weight of the integral matching M 1 [ M 2 , note that in the ﬁrst stage theexpected weight of M 1 is equal to that of x by construction.
Now consider the second stage.
As wehave argued above, we may assume that the second-stage graph consists of a matching; let ( i, j ) beone of these edges.
The contribution of ( i, j ) to the value of the fractional algorithm is w j (1  x j ) ,because the remaining amount that ofﬂine vertex j can be ﬁlled is (1  x j ) .
On the other hand, theintegral algorithm will match ( i, j ) in M 2 if
and only if j is unmatched in M 1 , which happens withprobability (1  x j ) .
So the contribution of ( i, j ) to the expected increase of the integral algorithmis also w j (1  x j ) .
Since the integral version of the problem can be reduced to the fractional version, we focus on thelatter in the remainder of the paper.
Algorithm
As argued in Section 2, we can round a fractional matching to an integral one with no loss.
Thereforewe will focus on the fractional two-stage bipartite matching problem from now on.
Our algorithmis described in Algorithm 1.
As described in the introduction, the main challenge is to commit toa matching x when the ﬁrst-stage graph is revealed, that incorporates some advice but maintains aworst-case competitive ratio.
Input: Suggested matching A in the ﬁrst-stage graph and desired robustness level R .
1: (Deﬁne penalty functions) Let f L ( x ) = max { 0 , 1  1  Rx } and f U ( x ) =
min { 1 , 1  R 1  x } . 2: (First stage)
When the ﬁrst-stage vertices D 1 arrive, let S✓ S be the set of ofﬂine vertices that are in the suggested matching A .
Set f j = f L for all j 2 S 1 and f j = f U for all j 2 S \ S 1 .
Solve the following optimization problem for the ﬁrst-stage fractional matching ¯ x : ( P 1 ) max
X j 2 S w j ✓ x j  Z x j f j ( t ) dt
◆ s . t .
x i :=
X j :( i,j ) 2 E x ij 8 i 2 Dx j :=
X i 2 D 1 :( i,j ) 2 E x ij 8 j 2 S x ij 8 i 2 D 1 , ( i, j ) 2 E 3: (Second stage)
When the second-stage vertices D 2 arrive, solve for the optimal fractional matching ¯ y subject to the capacities already taken by ¯ x : ( P 2 ) max
X j 2 S w j
y j s .
t .
y i :=
X j :( i,j ) 2 E y
ij 8 i
Dy j :=
X i 2 D 2 :( i,j ) 2 E y ij  1  ¯ x j 8 j 2 S y ij 8 i 2 D 2 , ( i, j ) 2 E 4: Return ¯ x + ¯ y .
al.
Intuitively, the amount x j that each vertex j 2 S is ﬁlled to after the ﬁrst stage is governed by threefactors.
First, it should depend on the weight w j ; the larger w j is, the larger x j should be.
Second,it should depend on the advice; x j should be larger if j is recommended by the advice, and smallerif not.
Third, it should depend on how much the other ofﬂine vertices are ﬁlled; the larger x j iscompared to the other vertices competing to be ﬁlled, the more hesitant we should be of ﬁlling iteven further, because this can be exploited by a second-stage graph whose edges are incident to thevertices which have already been ﬁlled the most.
Typically, the third point is achieved by deﬁninga penalty f
( x j ) 2 [0 , 1] on the marginal beneﬁt of ﬁlling j , with f ( x j ) increasing in x j , whichencourages the balancing of the water levels across j 2 S .
This is combined with the ﬁrst pointby associating a potential w j (1  f ( x j )) with each j 2 S .
The algorithm then decreases thesepotentials while ﬁlling water levels, with the aim of equalizing them as much as possible.
Our main idea to address the second point, now that there is some advice, is to use a lower penaltyrate f L ( x j ) to incentivize the ﬁlling of ofﬂine vertices j 2 S 1 that are matched by the advice, anda higher penalty rate f U ( x j ) for j / 2 S 1 .
More speciﬁcally, for any desired “robustness” R , ouranalysis characterizes the envelope of penalty functions f : [0 , 1] !
[0 , 1] (see Theorem 1) that
[Figure] [Figure]
[Figure]
guarantees a worst-case competitive ratio of R , and deﬁnes f L , f U according to the lower, upperboundaries of this envelope respectively.
Figure 2 plots the penalty functions f L and f U for three values of R .
The parameter R 2 [0 , 34 ]affects the separation between f L and f U .
If R = 0 , then f L , f U are the constant functions 0 , 1respectively, from which it can be seen that Algorithm 1 will fully match all the vertices suggestedby the advice.
Intuitively, setting R = 0 is desirable when we trust that the advice will performwell.
On the other extreme, setting R = 34 guarantees the maximum possible robustness, which isnot reliant on the advice.
Surprisingly, even in this case there is a bit of separation between f L andf U (see Figure 2), and hence the algorithm still discriminates between ofﬂine vertices j 2 S 1 vs.j / 2 S 1 , despite its distrust in the advice.
We plot one intermediate value where R = 59 .
Finally, having decided penalty functions for the ofﬂine vertices, there is still the question of howto balance their potential levels when multiple online vertices D 1 can arrive in the ﬁrst stage.
Fortunately, this question was answered by Feng et al.
[1], who show that problem P 1 is the right oneto solve, and establish a neat structural decomposition on its solution.
Our Lemma 1 is a simpliﬁed version of the structural decomposition from their paper, which sufﬁces for our purposes, andimportantly, allowing for heterogeneous penalty functions across ofﬂine vertices j 2 S .
Deﬁnition 1.
Let ¯ x be the ﬁrst-stage fractional matching found by Algorithm 1.
For all j 2 S ,we say j is ﬁlled if ¯ x j = 1 or f j (¯ x j ) = 1 .
Let F denote the set of ﬁlled ofﬂine vertices, and let
U =
S \ F denote the set of unﬁlled ofﬂine vertices.
Lemma 1.
After the ﬁrst-stage fractional matching, the following statements hold for all i 2 D 1 :
If i has any unﬁlled neighbor (i
e. j 2 U for some j with ( i, j ) 2 E ), then ¯ x i = 1 .
For any unﬁlled neighbor j and any neighbor k with ¯ x ik > 0 , it must be that
[Equation]
We explain the intuition behind Lemma 1.
Property 1 holds
because if ¯ x i < 1 instead, then variable¯ x ij where j is any unﬁlled neighbor of i could have been increased to strictly improve the objectiveof ( P 1 ) .
Meanwhile, Property 2 holds because if ¯ x ik > 0 , i.e. i is being used to ﬁll k in the currentsolution, then the potential of k must be no less than the potential of any unﬁlled neighbor j thatcould have been ﬁlled instead.
We note that the structural decomposition in Feng et al.
[1] is richer,but our simpliﬁed properties sufﬁce for our purposes and are easier to establish when our penaltyfunctions f j (due to heterogeneity) do not necessarily satisfy their boundary conditions such asf j (0)
= 0 or f j (1)
= 1 .
For space reasons, the proof of Lemma 1 is in Appendix B
3.1 Illustration of how our Algorithm uses Advice
As an example, suppose R = 59 and C = 89 , where we note that p 1  R + p 1  C = 1 .
Let
D 1 consist of vertices i = 1 , 2 and S consist of vertices j = 1 , 2 , 3 , 4 with weights w j = 1 , 1 , 2 , 4respectively.
The edges in the graph are (1 , 1) , (1 , 2) , (1 , 3) and (2 , 3) , (2 , 4) .
We ﬁrst demonstrate the case where the advice suggests edges (1,3) and (2,4), which would matchweight w 3 + w 4 = 6 in the ﬁrst stage.
Intuitively, this advice is not so “extreme” in that it is greedilymatching the highest-weight vertices in S while it can, without assuming it can later match them inthe second stage.
In this case our algorithm would follow the advice exactly (see Figure 3b), andhave a consistency of 1.
Its robustness would be at least 67 , with the worst case being when the secondstage consists of a single edge (3,4), which cannot be matched by our algorithm but increases theoptimal ofﬂine matching from 6 to 7.
Nonetheless, this sufﬁces because 67 is well above the targetedrobustness of R = 59 .
We now demonstrate the case where the advice suggests edges (1,2) and (2,3) instead, perhapspredicting that an edge (3,4) will allow us to match ofﬂine vertex 4 later.
This advice is quite“extreme” in that it is skipping the highest-weight vertex in S in the ﬁrst stage, based on a secondstage prediction which may not come to fruition.
Following it exactly would give a weight ofw
2 + w 3 = 3 in the ﬁrst stage, which cannot be more than 37 -robust 4 , signiﬁcantly lower than thetarget of 59 .
Meanwhile, the maximally robust fractional matching based on linear penalty functions(Feng et al.
[1]; shown in Figure 3a), which judiciously balances between all the ofﬂine vertices, isnot 89 -consistent 5 .
Our algorithm returns the solution in Figure 3c, which follows the advice in thatit completely prioritizes vertex 2 over vertex 1, but deviates by signiﬁcantly ﬁlling ofﬂine vertex 4(which has the highest weight) as a failsafe (although not as much as the fully robust solution).
Thismakes it both 59 -robust and 89 -consistent, and our algorithm can be adjusted accordingly to be both
R -robust
and C -consistent for any values R, C satisfying p 1  R + p 1  C  1 .
Based on these examples, we highlight two desirable features of our algorithm.
First, it naturallyresponds to the “extremity” of the advice, by deviating more from the more extreme advice (in the2nd case) in order to maintain R -robustness.
Second, from the deﬁnition of f U and f L in Algorithm 1together with Lemma 1, it can be seen that if R  12 and the graph is unweighted, then our algorithmwill always follow the advice exactly.
This is because f L (1) =
R  1  R =
f U (0) , which impliesthe algorithm will prioritize ﬁlling a vertex suggested by the advice over one that is not, even if theformer is completely ﬁlled and the latter is empty.
Put another way, the algorithm automaticallyrecognizes that any maximal matching will be at least 12 -robust in an unweighted graph.
Analysis of Robustness
We begin by analyzing the robustness of Algorithm 1, which is its competitive ratio with respectto the optimal matching in hindsight.
The theorem below gives a characterization of the penaltyfunctions f
j that are sufﬁcient to guarantee R -robustness, which is what led to our plots in Figure 2.
Theorem 1.
Let R 2 [0 , 34 ] .
Suppose we run Algorithm 1 where the functions f j satisfy the followingproperties:
f j : [0 , 1] !
[0 , 1] is increasing,
2. 1  1  Rx  f j ( x )  1  R 1  x .
Then Algorithm 1 is R -robust.
The proof of Theorem 1 employs the online primal-dual technique.
Based on the algorithm’s decisions, we construct dual variables that are approximately feasible and lower bound the algorithm’sobjective value.
(This is also the proof approach used by [1], but we note that the way our dualvariables are set is necessarily different in order to derive our results.)
The simpliﬁed structuralproperty (Lemma 1) allows us to characterize the envelope of functions that guarantee R -robustnessin the primal-dual analysis.
Roughly speaking, the upper bound on f j guarantees approximate dualfeasibility for the ﬁrst stage edges, while the lower bound on f j guarantees it for the second stage edges.
For space reasons, we have deferred the proof to Appendix C
w 1 = w w
[Equation]
=1  x x
Analysis of Consistency
We now turn to analyzing the consistency of the algorithm.
In the previous section, we described anenvelope of functions (see Figure 2) that were sufﬁcient to guarantee R -robustness.
For a desiredrobustness level R , we now maximize consistency by setting the penalty functions f j to their lowerbound for vertices suggested by the advice, and to their upper bound for vertices not suggested bythe advice.
The theorem below shows that this choice of the penalty functions achieves the desiredrobustness-consistency tradeoff.
Later in Section 6 we show this tradeoff to be tight.
Theorem 2.
Let R 2 [0 , 34 ] , and let S 1 be the set of ofﬂine vertices that are matched by the suggestedmatching in the ﬁrst-stage graph.
Suppose we run Algorithm 1 with
• f j ( x ) =
min { 1  R 1  x , 1 } for all j 2 S \ S 1 , and• f j ( x ) = max { 1  1  Rx , 0 } for all j 2 S 1 .
Then Algorithm 1 is (2 p 1  R  (1  R )) -consistent.
Our high-level strategy for bounding consistency (which recall is
ALG ( G,A ) ADVICE ( G,A ) ) is to carefully splitthe value of ALG ( G, A ) , attributing a separate contribution to each ﬁrst-stage vertex i 2 D 1 .
We thensplit the value of ADVICE ( G, A ) in a similar way.
This decomposes the numerator and denominatoras sums over i 2 D 1 , which means it sufﬁces to lower-bound the ratio of the terms corresponding toeach individual i 2 D 1 .
For concreteness, consider some ﬁxed i 2 D 1 and let a 2 S be the ofﬂinevertex that the advice suggests matching i to.
The bad case for consistency is if ¯ x a is low, becausethis means the algorithm deviated from the advice.
However, because the potential functions arechosen to incentivize matching to a , the only way ¯ x a can be low is if i is substantially matchedto other vertices with higher weight than w a , implying the algorithm must have collected a lot ofvalue from the vertices that were not recommended by the advice.
The full proof, which makes thisintuition precise, is deferred to Appendix D for space reasons.
Tightness of the Robustness-Consistency Tradeoff
Theorems 1 and 2 together show that Algorithm 1 is able to be both R -robust and C -consistent, forany ( R, C ) with R 2 [0 , 34 ] and p 1  R + p 1  C = 1 .
We now show this tradeoff to be tight.
The hardness instance.
The hardness instance is illustrated in Figure 4.
It is a graph where D hastwo vertices i = 1 , 2 that arrive one in each stage.
S has two vertices j = 1 , 2 with weights w 1 =
w(for some w 2 [0 , 1] that we will set later) and w 2 = 1 .
The ﬁrst-stage graph consists of both edges(1 , 1) and (1 , 2) , and the advice suggests matching along the edge (1 , 1) , which is “extreme” advicein that ofﬂine vertex 1 has the lower weight one edge (which can be either (2 , 1) or (2 , 2) ).
Sincethe algorithm does not know which edge will arrive in the second stage, it must hedge against bothpossibilities when making its ﬁrst-stage decision.
Theorem 3.
Let w = 1 p 1  R  1 in the instance described above.
Then any algorithm that is
R -robust is at most C -consistent where
C = 2 p 1  R  (1  R ) .
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 tothem?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes](b) Did you include complete proofs of all theoretical results?
[Yes] All proofs, if not inthe main body, are in the supplementary materials. [Table]
If you ran experiments...
[Table]
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
[Table]
mental results (either in the supplemental material or as a URL)?
[N/A]
[Table]
(b) Did you specify all the training details (e.g., data splits, hyperparameters,
how they
[Table]
were chosen)?
[N/A]
[Table]
(c) Did you report error bars (e.g., with respect to the random seed after running experi-
[Table]
ments multiple times)?
[N/A]
[Table]
(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]
[Table]
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
[Table]
(a) If your work uses existing assets, did you cite the creators?
[N/A]
[Table]
(b) Did you mention the license of the assets?
[N/A]
[Table]
(c) Did you include any new assets either in the supplemental material or as a URL?
[N/A]
[Table]
(d) Did you discuss whether and how consent was obtained from people whose data
[Table]
you’re using/curating?
[N/A]
[Table]
(e) Did you discuss whether the data you are using/curating contains personally identiﬁ-
[Table]
able information or offensive content?
[N/A]
[Table]
If you used crowdsourcing or conducted research with human subjects...
[Table]
(a) Did you include the full text of instructions given to participants and screenshots, ifapplicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board ( approvals, if applicable
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amountspent on participant compensation?
[N/A]