Online Bipartite Matching with Advice: Tight Robustness-Consistency Tradeoffs for the Two-Stage Model
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 evaluate an algorithm by its robustness R , which is its performance relative to that of the optimal ofﬂine matching, and its consistency C , which is its performance when the 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 the literature on advice-augmented algorithms, yet necessary for quantifying such an algorithm to be optimal.
Speciﬁcally, we propose an algorithm that is R -robust and 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 been studied in either the adversarial setting, where nothing is assumed about the future; or the stochastic setting, where future arrivals are assumed to follow a distributional model.
However, algorithms for the former tend to be overly conservative in their decisions; whereas algorithms for the latter can perform terribly when the assumed model is wrong.
Therefore, a recently budding literature has studied advice-augmented online algorithms, which use a machine-learned prediction to reﬁne their decisions 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’s performance when the prediction is correct, called its consistency and the algorithm’s performance under the worst-case future, called its robustness .
This is because a high consistency can only be achieved by optimizing as if the predicted future was correct, resulting in a decision that can be terrible 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 (but many online vertices can arrive simultaneously).
That is, we derive a continuum of algorithms for two-stage online bipartite matching that deﬁne the Pareto-efﬁcient frontier of the tradeoff between performance 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 when it 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, our algorithm, and the Pareto-efﬁcient frontier it achieves between robustness and consistency.
36th Conference on Neural Information Processing Systems (
[Table]
1.1 Model and Results
We study the two-stage version of the maximum vertex-weighted 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 weighted and ofﬂine (i.e. known in advance), while the vertices in D arrive online in two batches D 1 and D 2 .
After the vertices in each batch arrive, all their incident edges to S are revealed, and the algorithm chooses a matching in the resulting subgraph.
(In particular, note that the ﬁrst time the algorithm needs to make a decision is after the entire batch D 1 has arrived.)
The algorithm’s choices are irrevocable, and the goal of the problem is to maximize the total weight of the matched ofﬂine vertices after both batches have arrived.
Observe that the optimal second-stage decision is clearly to select the max-weight matching subject to the matching already chosen in the ﬁrst stage; therefore the complexity of the problem boils down to ﬁnding a good ﬁrst-stage matching.
In the advice-augmented model we introduce, the algorithm receives a suggested matching A to make after the edges incident to the ﬁrst-stage vertices D 1 have been revealed.
Our model allows for 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 both stages have arrived.
(There is a different line of work (see [2]) that assumes access to an oracle that gives perfect advice and studies the minimum number of queries needed to obtain a given guarantee.)
We deﬁne consistency based on this suggested matching, and explain later how it reduces to the standard notion of consistency based on prediction error (see Subsection 1.2).
That is, we deﬁne an algorithm’s consistency as how well it performs relative to the best matching that could have been obtained by exactly following the advice in the ﬁrst stage.
Meanwhile, we deﬁne an algorithm’s robustness using the standard notion of competitive ratio , which is the algorithm’s performance relative 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 R for 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 when given advice A and the graph ends up being G , ADVICE ( G, A ) is the performance from following advice A exactly on graph G , and OPT ( G ) is the maximum-weight matching in graph G .
Note that 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 when the 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 the problem, which allows vertices to be ﬁlled partially.
In Section 2 we formally deﬁne the fractional problem and show how to losslessly round any fractional solution to a randomized matching, so that we 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 algorithms for online matching can be described as using a penalty function to “balance” how much to ﬁll the ofﬂine vertices; the optimal competitive ratio is usually achieved by carefully choosing the right penalty function.
Using a linear penalty function, Feng et al.
[1] give an algorithm for two-stage bipartite matching that is 34 -robust, which they prove is optimal.
However, since this algorithm makes no use of the advice, it is only 34 -consistent.
On the other hand, note that the naive algorithm which always follows the advice exactly is 1-consistent but 0-robust.
At this point, a natural idea for obtaining 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-ﬂip probability p ranges from 0 to 1, the robustness/consistency of this coin-ﬂip algorithm ranges along the 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 insight is that for any given robustness level R 2 [0 , 34 ] , there is actually a family of penalty functions that guarantees R -robustness.
While a traditional algorithm for online matching would choose the same 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 suggested by 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 the straight-line interpolation.
This elementary, symmetric curve also happens to be tight.
Organization of paper.
Notation and the reduction from integer to fractional matching is presented in Section 2.
Our algorithm is formally deﬁned in Section 3.
Proofs of robustness and consistency are sketched in Section 4 and Section 5 respectively, highlighting our new techniques.
The hardness instance certifying our tradeoff curve of p 1  R + p 1  C = 1 to be tight is presented in Section 6.
For the full, most up-to-date version of the paper which includes all proofs, please refer to https://arxiv.org/abs/2206.11397.
1.2 Discussion of Other Variants and Deﬁnitions
Multi-stage variant.
Classical models of online matching and budgeted allocation [3, 4] allow more than two stages of online arrivals, and algorithms that hybridize between a ﬁxed “advice” algorithm and traditional algorithms that “balance” against the adversary were introduced in Mahdian et al.
However, under this framework it is difﬁcult to deﬁne how the advice algorithm should react if the observed arrivals start to diverge from its predictions, making any tightness results between robustness and consistency elusive.
Instead, we 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 past predictions.
We note that the guarantees in Mahdian et al.
[5] do not apply to our setting, since they do not handle the 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ﬁcantly worse than ours (see Figure 1, which plots in green the tradeoff curve described in Theorem 4.1 in their paper).
In fact, as observed in the upper-left part of Figure 1, the guarantees of Mahdian et al. [5] can be worse than the simplistic coin-ﬂip algorithm that either runs the “advice” algorithm, or runs the “balance” algorithm from the multi-stage setting 1 .
This demonstrates the need for a simpler advice-augmented online matching framework as we propose, in which the Pareto-efﬁcient tradeoff between robustness and consistency can be exactly understood.
Unweighted variant.
In the special case where all ofﬂine vertices have weight 1, a better robustnessconsistency tradeoff is possible—in fact, 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.
However, in the vertex-weighted variant the straight-line guarantees are suboptimal, justifying the need for our approach in Subsection 1.1.
Edge-weighted variant.
In this variant, the edges of the bipartite graph are weighted, and the aim is to maximize the total weight of the edges in the matching.
For 2-stage edge-weighted bipartite matching, the naive coin-ﬂip algorithm also turns out to be best-possible: The optimal tradeoff curve is the line segment between ( R, C ) =
(0 , 1) and ( 12 , 12 ) .
To see this, ﬁrst note that the best possible robustness is 12 .
This is achieved by an algorithm that 1) with probability 12 , ﬁnds the maximum matching M 1 in the ﬁrst stage and does nothing in the second stage, and 2) with probability 12 , does nothing in the ﬁrst stage and ﬁnds the maximum matching M 2 in the second stage. Thus, the coin-ﬂip algorithm which naively interpolates between the 12 -robust algorithm and the 1-consistent algorithm (that always follows the advice) attains the tradeoff. To show the tradeoff is tight, consider a ﬁrst-stage graph consisting of a single edge with weight 1, and suppose the advice suggests matching the edge. Let x be the probability the algorithm matches the edge.
Any R -robust algorithm must have x  1  R , because if x > 1  R then we cannot maintain R -robustness if in the second stage, a single edge to the ofﬂine vertex arrives with very high weight.
Since x  1  R , this means the maximum consistency on this instance is 1  R (which is the case if the second-stage graph is empty).
Thus, just as in the unweighted case, a straight-line tradeoff is also optimal in the edge-weighted variant.
Consistency deﬁned based on prediction error.
Many papers on 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, they 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.
The prediction error captures how much the prediction deviates from the truth, and its precise deﬁnition depends 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 ) .
When we do so, our robustness/consistency guarantee immediately implies the parameterized guarantee ALG ( G,A )
OPT ( G )  max { R, (1  ⌘ ) (2 p 1  R  (1  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 associated error, 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 (see the recent surveys Huang and Tr¨obst [7] and Mitzenmacher and Vassilvitskii [8] respectively), literature on online matching with advice has been relatively scant.
We mention some papers in this intersection below, as well as other related work.
Online matching with advice.
Since Mahdian et al.
[5], more recently Antoniadis et al.
[9] have introduced 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.
Lavastida et al.
[6] 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.
Broadly speaking, our work contrasts these three papers in that we are able to understand tight tradeoffs in whether 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, another approach 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.
[10] and the partially predictable model of Hwang et al.
We that random-order arrivals can also be viewed as a form of partial predictability which allows learning [12], and moreover it is possible to derive simultaneous guarantees under adversarial and random-order arrivals [13] which have the same ﬂavor as robustness-consistency guarantees.
Finally, we mention that the single sample model in Kaplan et al.
[14] can be viewed as a form of online matching with advice that is highly erroneous.
Optimality results in prediction-augmented online algorithms.
Tight robustness-consistency tradeoffs have become recently understood in prediction-augmented ski rental [15–17] and singlecommodity accept/reject problems [18, 19].
Our online matching problem contrasts these by having a multi-dimensional state space, for which to our knowledge tightness results are rare.
We should mention that in multi-dimensional problems such as prediction-augmented caching [20] and online welfare maximization [21], “optimality” results in which consistency can be achieved with no loss of robustness (i.e. there is no “tradeoff”) have been derived.
Two-stage models.
Two-stage models capture the essence of optimization under uncertainty, where the ﬁrst-stage decision must anticipate the uncertainty, and the second-stage decision is usually a trivial recourse after the uncertainty (in our case the second-stage graph) has been realized.
We refer to Birge and Louveaux [22] and Bertsimas et al.
[23] for broad overviews of two-stage stochastic and robust optimization.
In this paper we focus on the two-stage online matching model of Feng et al.
[1], introducing advice to this model and fully characterizing the tradeoff between obeying vs. disobeying the advice.
We note that a multi-stage online matching model motivated by batching has also been recently considered in Feng and Niazadeh [24], and two-stage matching has been formulated 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 arrive in two batches D 1 , D 2 .
We index the vertices in D (resp.
S ) with i (resp.
j ).
When the vertices in D k ( k = 1 , 2 ) arrive, all their incident edges to S are revealed, and the algorithm irrevocably chooses a matching M k between D k and S .
Each ofﬂine vertex j 2 S has a weight w j , and the goal is to maximize
P [Equation]
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 a matching.
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 can only decrease the value of the matching found by the algorithm.
Therefore we may assume that the second stage graph consists exactly of the matching selected by OPT ( G ) in the second stage.
The same argument shows that when bounding consistency, we may assume that the second-stage graph consists exactly of the matching selected by ADVICE ( G, A ) in the second stage.
Therefore from now on we assume the second-stage graph is a matching.
Reduction to fractional matching.
The preceding observation about worst-case instances allows us to focus on the fractional version of the problem, which is easier to analyze and deﬁned as follows.
In each stage, the algorithm chooses a fractional matching instead of an integral one.
Let x = ( x ij : i 2 D 1 , j 2 S, ( i, j ) 2 E ) be the fractional matching chosen in the ﬁrst stage, so that x 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, let y =
( y ij : i 2 D 2 , j 2 S, ( i, j ) 2 E ) be the fractional matching in the second stage, which satisﬁes y 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 problem is to maximize
[Equation] y j ) .
As mentioned earlier, the ﬁrst stage decisions x j are the critical ones; therefore we will use the terminology that each ofﬂine vertex j 2 S is ﬁlled to water level x j at the end of the ﬁrst stage.
Although the fractional problem seems at ﬁrst to be easier than the integral problem, it turns out to 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, consider any fractional algorithm and let x be its ﬁrst-stage output.
To convert this to a randomized integral algorithm, we sample an integral matching M 1 with marginals equal to x (i.e. P (( i, j ) 2 M ) = x ij optimization 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 max j s 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 for all edges ( i, j ) in the ﬁrst-stage graph).
5 We then take M 2 to be the maximum-weight matching in 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 the expected weight of M 1 is equal to that of x by construction.
Now consider the second stage.
As we have argued, we may assume the second-stage graph consists of a matching; let ( i, j ) be one 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, the integral algorithm will match ( i, j ) in M 2 if
and only if j is unmatched in M 1 , which happens with probability (1  x j ) .
So the contribution of ( i, j ) to the expected increase of the integral algorithm is also w j (1  x j ) .
Since the integral version of the problem can be reduced to the fractional version, we focus on the latter in the remainder of the paper.
Algorithm
As argued in Section 2, we can losslessly round a fractional matching to an integral one.
Therefore we focus on the fractional two-stage bipartite matching problem from now on.
Our algorithm is described in Algorithm 1.
The main challenge is to commit to a matching x when the ﬁrst-stage graph is revealed, that incorporates some advice but maintains a worst-case competitive ratio.
Intuitively, the amount x j that each vertex j 2 S is ﬁlled to after the ﬁrst stage is governed by three factors.
First, it should depend on the weight w j ; the larger w j is, the larger x j should be.
[-ij 8 i 
-]
Second, it should depend on the advice; x j should be larger if j is recommended by the advice, and smaller if not.
Third, it should depend on how much the other ofﬂine vertices are ﬁlled; the larger x j is compared to the other vertices competing to be ﬁlled, the more hesitant we should be of ﬁlling it even further, because this can be exploited by a second-stage graph whose edges are incident to the vertices which have already been ﬁlled the most.
Typically, the third point is achieved by deﬁning a penalty f ( x j ) 2 [0 , 1] on the marginal beneﬁt of ﬁlling j , with f ( x j ) increasing in x j , which encourages the balancing of the water levels across j 2 S .
This is combined with the ﬁrst point by associating a potential w j (1  f ( x j )) with each j 2 S .
The algorithm then decreases these potentials 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 penalty rate f L ( x j ) to incentivize the ﬁlling of ofﬂine vertices j 2 S 1 that are matched by the advice, and a higher penalty rate f U ( x j ) for j / 2 S 1 .
More speciﬁcally, for any desired “robustness” R , our analysis characterizes the envelope of penalty functions f : [0 , 1] !
[0 , 1] (see Theorem 1) that guarantees a worst-case competitive ratio of R , and deﬁnes f L , f U according to the lower, upper boundaries 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 ,respectively, from which it can be seen that Algorithm 1 will fully match all the vertices suggested by the advice.
Intuitively, setting R = 0 is desirable when we trust that the advice will perform well.
On the other extreme, setting R = 34 guarantees the maximum possible robustness, which is not reliant on the advice.
Surprisingly, even in this case there is a bit of separation between f L and f 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 how to 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 one to 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, and importantly, 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 . 2.
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 objective of ( P 1 ) .
Meanwhile, Property 2 holds because if ¯ x ik > 0 , i.e. i is being used to ﬁll k in the current solution, then the potential of k must be no less than the potential of any unﬁlled neighbor j that could 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 penalty functions f j (due to heterogeneity) do not necessarily satisfy their boundary conditions such as f j (0)
= 0 or f j (1)
= 1 .
For space reasons, the proof of Lemma 1 is in the full version of the paper. [Figure] [Figure] [Figure]
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 ,respectively.
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 match weight w 3 + w 4 = 6 in the ﬁrst stage.
Intuitively, this advice is not so “extreme” in that it is greedily matching the highest-weight vertices in S while it can, without assuming it can later match them in the second stage.
In this case our algorithm would follow the advice exactly (see Figure 3b), and have a consistency of 1.
Its robustness would be at least 67 , with the worst case being when the second stage consists of a single edge (3,4), which cannot be matched by our algorithm but increases the optimal ofﬂine matching from 6 to 7.
Nonetheless, this sufﬁces because 67 is well above the targeted robustness of R = 59 .
We now demonstrate the case where the advice suggests edges (1,2) and (2,3) instead, perhaps predicting 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 of w 2 + w 3 = 3 in the ﬁrst stage, which cannot be more than 37 -robust 6 , signiﬁcantly lower than the target 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, is not 89 -consistent 7 .
Our algorithm returns the solution in Figure 3c, which follows the advice in that it completely prioritizes vertex 2 over vertex 1, but deviates by signiﬁcantly ﬁlling ofﬂine vertex(which has the highest weight) as a failsafe (although not as much as the fully robust solution).
This makes 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 naturally responds to the “extremity” of the advice, by deviating more from the more extreme advice (in the 2nd case) in order to maintain R -robustness.
Second, from the deﬁnition of f U and f L in Algorithmtogether with Lemma 1, it can be seen that if R  12 and the graph is unweighted, then our algorithm will always follow the advice exactly.
This is because f L (1) =
R  1  R =
f U (0) , which implies the algorithm will prioritize ﬁlling a vertex suggested by the advice over one that is not, even if the former is completely ﬁlled and the latter is empty.
Put another way, the algorithm automatically recognizes that any maximal matching will be at least 12 -robust in an unweighted graph.
stage graph consists of a single edge (3 , 2) , in which case ALG ( G, A ) =and OPT ( G ) = 7 .
If the second-stage graph consists of edges (3 , 1) and (4 , 4) , then the fully robust solution gets a value of 1 + 311 +· 711 + 4 = 7211 whereas ADVICE ( G, A ) = 8 .
Their ratio is 911 , which is less than 89 .
Analysis of Robustness
We begin by analyzing the robustness of Algorithm 1, which is its competitive ratio with respect to the optimal matching in hindsight.
The theorem below gives a characterization of the penalty functions 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 following properties:
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’s objective value.
(This is also the proof approach used by [1], but we note that the way our dual variables are set is necessarily different in order to derive our results. )
The simpliﬁed structural property (Lemma 1) allows us to characterize the envelope of functions that guarantee R -robustness in the primal-dual analysis.
Roughly speaking, the upper bound on f j guarantees approximate dual feasibility 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 the full version of the paper.
Analysis of Consistency
We now turn to analyzing the consistency of the algorithm.
In the previous section, we described an envelope of functions (see Figure 2) that were sufﬁcient to guarantee R -robustness.
For a desired robustness level R , we now maximize consistency by setting the penalty functions f j to their lower bound for vertices suggested by the advice, and to their upper bound for vertices not suggested by the advice.
The theorem below shows that this choice of the penalty functions achieves the desired robustness-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 suggested matching 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 split the value of ALG ( G, A ) , attributing a separate contribution to each ﬁrst-stage vertex i 2 D 1 .
We then split the value of ADVICE ( G, A ) in a similar way.
This decomposes the numerator and denominator as sums over i 2 D 1 , which means it sufﬁces to lower-bound the ratio of the terms corresponding to each individual i 2 D 1 .
For concreteness, consider some ﬁxed i 2 D 1 and let a 2 S be the ofﬂine vertex that the advice suggests matching i to.
The bad case for consistency is if ¯ x a is low, because this means the algorithm deviated from the advice.
However, because the potential functions are chosen to incentivize matching to a , the only way ¯ x a can be low is if i is substantially matched to other vertices with higher weight than w a , implying the algorithm must have collected a lot of value from the vertices that were not recommended by the advice.
The full proof, which makes this intuition precise, is deferred to the full version of the paper 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, for any ( R, C ) with R 2 [0 , 34 ] and p 1  R + p 1  C = 1 .
We now show this tradeoff to be tight.
[Equation]
[Equation]
[Figure]
The hardness instance.
The hardness instance is illustrated in Figure 4.
It is a graph where D has two 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” advice in that ofﬂine vertex 1 has the lower weight one edge (which can be either (2 , 1) or (2 , 2) ).
Since the algorithm does not know which edge will arrive in the second stage, it must hedge against both possibilities 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 ) .
Proof of Theorem 3.
Let x := x 11 and 1  x := x 12 , so that the algorithm’s ﬁrst-stage decision is entirely characterized by the value of x .
There are two cases.
Edge (2 , 1) arrives in the second stage.
Then ALG = w + 1  x and ADVICE = w .
Edge (2 , 2) arrives in the second stage.
Then ALG = wx + 1 and ADVICE = 1 + w .
(Note that regardless of which edge arrives in the second stage, OPT is always equal to 1 + w .)
For the algorithm to be R -robust in Case 1, we must have
[Equation]
On the other hand, for the algorithm to be C -consistent in Case 2, we must have
[Equation]
Since the algorithm does not know which of the two cases will happen in the second stage, it must choose an x that satisﬁes both of the inequalities above.
For a desired robustness R and consistency
C , this is only possible if
[Equation]
which when rearranged becomes
[Equation]
Substituting w = 1 p 1  R  1 above gives C  2 p 1
[Equation]
[Equation]
, as desired.