balancing relevance and diversity in online bipartite matching via...

15
Balancing Relevance and Diversity in Online Bipartite Matching via Submodularity John P. Dickerson, Karthik Abinav Sankararaman, Aravind Srinivasan, Pan Xu {john, kabinav, srin, panxu}@cs.umd.edu University of Maryland, College Park, MD, USA “Different roads sometimes lead to the same castle.” – George R.R. Martin Abstract In bipartite matching problems, vertices on one side of a bi- partite graph are paired with those on the other. In its online variant, one side of the graph is available offline, while the vertices on the other side arrive online. When a vertex ar- rives, an irrevocable and immediate decision should be made by the algorithm; either match it to an available vertex or drop it. Examples of such problems include matching work- ers to firms, advertisers to keywords, organs to patients, and so on. Much of the literature focuses on maximizing the to- tal relevance—modeled via total weight—of the matching. However, in many real-world problems, it is also important to consider contributions of diversity: hiring a diverse pool of candidates, displaying a relevant but diverse set of ads, and so on. In this paper, we propose the Online Submodular Bipar- tite Matching (OSBM) problem, where the goal is to maxi- mize a submodular function f over the set of matched edges. This objective is general enough to capture the notion of both diversity (e.g., a weighted coverage function) and relevance (e.g., the traditional linear function)—as well as many other natural objective functions occurring in practice (e.g., limited total budget in advertising settings). We propose novel algo- rithms that have provable guarantees and are essentially op- timal when restricted to various special cases. We also run experiments on real-world and synthetic datasets to validate our algorithms. Introduction Online Bipartite Matching (OBM) problems are primarily motivated by Internet advertising. In the basic version of this problem, we are given a bipartite graph G =(U,V,E), where U and V represent the offline vertices (advertisers) and online vertices (keywords or impressions) respectively. An edge e =(u, v) represents a bid by advertiser u for a keyword v. When a keyword v arrives, a central agency must make an instant and irrevocable decision to either re- ject v or assign v to one of its “neighbors” (i.e., a vertex that is connected to v by an edge in G) u and obtain a profit w e for the match e =(u, v). A matched advertiser u is no longer available for future matches. The goal is to design an efficient online algorithm that maximizes the expected total weight (profit) of the matching. Following the seminal work of Karp, Vazirani, and Vazirani (1990), there has been a large Copyright c 2019, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. body of research on related variants (Mehta 2012). During the last decade, OBM and its variants have seen wider ap- plications in various matching markets: crowdsourcing In- ternet marketplaces (e.g., (Assadi, Hsu, and Jabbari 2015; Ho and Vaughan 2012)), online spatial crowdsourcing plat- forms (e.g., (Tong et al. 2017; Tong et al. 2016b; Tong et al. 2016a)), ride-sharing platforms (e.g., (Dickerson et al. 2018)). In each of these applications we have the follow- ing features (1) agents from at least one side appear online (i.e., one-by-one) (2) an online agent on arrival has to either be matched immediately to an offline agent—or be rejected. Most prior research on online matching focuses on maxi- mizing the total weight of the final matching (Mehta 2012), which captures the quality/relevance of all the matches. In many matching markets, we also care about the diversity of the final matching along with relevance. Ahmed, Dickerson, and Fuge (2017) considered a motivating example of match- ing academic papers to potential reviewers: just maximiz- ing the relevance (the quality of each match) could poten- tially assign a paper to multiple scholars in a single lab due to shared expertise, which is undesirable. Instead, we want to assign each paper to relevant experts with diverse back- grounds to obtain comprehensive feedback. Maximizing di- versity 1 is of particular importance in various recommenda- tion systems, ranging from recommendations of new books and movies on eBay (Chen et al. 2016) to returning search- engine queries (Agrawal et al. 2009). A common strategy to address diversity is to first formulate a specific objective (typically maximization over a submodular function 2 ) cap- turing the balance of diversity and relevance and then design an efficient algorithm—typically a greedy one—to solve it (e.g., (Ahmed, Dickerson, and Fuge 2017) and references within). Inspired by the broad applications of OBM and sub- modular maximization, we propose a variant of the online matching model which we call Online Submodular Bipar- tite Matching (OSBM). In particular, we answer the main Question 1, defined formally below. Main model. Suppose we have a bipartite graph G = (U,V,E) where U and V represent the offline and on- 1 Both individual and aggregate diversity (Adomavicius and Kwon 2012). 2 See Section for a formal definition and canonical examples.

Upload: others

Post on 21-Jan-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

Balancing Relevance and Diversity in Online Bipartite Matching viaSubmodularity

John P. Dickerson, Karthik Abinav Sankararaman, Aravind Srinivasan, Pan Xu{john, kabinav, srin, panxu}@cs.umd.edu

University of Maryland, College Park, MD, USA

“Different roads sometimes lead to the same castle.” – George R.R. Martin

AbstractIn bipartite matching problems, vertices on one side of a bi-partite graph are paired with those on the other. In its onlinevariant, one side of the graph is available offline, while thevertices on the other side arrive online. When a vertex ar-rives, an irrevocable and immediate decision should be madeby the algorithm; either match it to an available vertex ordrop it. Examples of such problems include matching work-ers to firms, advertisers to keywords, organs to patients, andso on. Much of the literature focuses on maximizing the to-tal relevance—modeled via total weight—of the matching.However, in many real-world problems, it is also importantto consider contributions of diversity: hiring a diverse pool ofcandidates, displaying a relevant but diverse set of ads, and soon. In this paper, we propose the Online Submodular Bipar-tite Matching (OSBM) problem, where the goal is to maxi-mize a submodular function f over the set of matched edges.This objective is general enough to capture the notion of bothdiversity (e.g., a weighted coverage function) and relevance(e.g., the traditional linear function)—as well as many othernatural objective functions occurring in practice (e.g., limitedtotal budget in advertising settings). We propose novel algo-rithms that have provable guarantees and are essentially op-timal when restricted to various special cases. We also runexperiments on real-world and synthetic datasets to validateour algorithms.

IntroductionOnline Bipartite Matching (OBM) problems are primarilymotivated by Internet advertising. In the basic version ofthis problem, we are given a bipartite graph G = (U, V,E),where U and V represent the offline vertices (advertisers)and online vertices (keywords or impressions) respectively.An edge e = (u, v) represents a bid by advertiser u fora keyword v. When a keyword v arrives, a central agencymust make an instant and irrevocable decision to either re-ject v or assign v to one of its “neighbors” (i.e., a vertexthat is connected to v by an edge in G) u and obtain a profitwe for the match e = (u, v). A matched advertiser u is nolonger available for future matches. The goal is to design anefficient online algorithm that maximizes the expected totalweight (profit) of the matching. Following the seminal workof Karp, Vazirani, and Vazirani (1990), there has been a large

Copyright c© 2019, Association for the Advancement of ArtificialIntelligence (www.aaai.org). All rights reserved.

body of research on related variants (Mehta 2012). Duringthe last decade, OBM and its variants have seen wider ap-plications in various matching markets: crowdsourcing In-ternet marketplaces (e.g., (Assadi, Hsu, and Jabbari 2015;Ho and Vaughan 2012)), online spatial crowdsourcing plat-forms (e.g., (Tong et al. 2017; Tong et al. 2016b; Tong etal. 2016a)), ride-sharing platforms (e.g., (Dickerson et al.2018)). In each of these applications we have the follow-ing features (1) agents from at least one side appear online(i.e., one-by-one) (2) an online agent on arrival has to eitherbe matched immediately to an offline agent—or be rejected.

Most prior research on online matching focuses on maxi-mizing the total weight of the final matching (Mehta 2012),which captures the quality/relevance of all the matches. Inmany matching markets, we also care about the diversity ofthe final matching along with relevance. Ahmed, Dickerson,and Fuge (2017) considered a motivating example of match-ing academic papers to potential reviewers: just maximiz-ing the relevance (the quality of each match) could poten-tially assign a paper to multiple scholars in a single lab dueto shared expertise, which is undesirable. Instead, we wantto assign each paper to relevant experts with diverse back-grounds to obtain comprehensive feedback. Maximizing di-versity1 is of particular importance in various recommenda-tion systems, ranging from recommendations of new booksand movies on eBay (Chen et al. 2016) to returning search-engine queries (Agrawal et al. 2009). A common strategyto address diversity is to first formulate a specific objective(typically maximization over a submodular function2) cap-turing the balance of diversity and relevance and then designan efficient algorithm—typically a greedy one—to solve it(e.g., (Ahmed, Dickerson, and Fuge 2017) and referenceswithin).

Inspired by the broad applications of OBM and sub-modular maximization, we propose a variant of the onlinematching model which we call Online Submodular Bipar-tite Matching (OSBM). In particular, we answer the mainQuestion 1, defined formally below.

Main model. Suppose we have a bipartite graph G =(U, V,E) where U and V represent the offline and on-

1Both individual and aggregate diversity (Adomavicius andKwon 2012).

2See Section for a formal definition and canonical examples.

Page 2: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

line agents respectively. We have a finite time horizon T(known beforehand) and for each time (or round) t ∈ [T ]

.=

{1, 2, . . . , T}, at most one vertex v is sampled—in whichcase we say v arrives—from a given known probability dis-tribution {pv}. That is,

∑v∈V pv ≤ 1; thus, with probability

1 −∑v∈V pv , none of the vertices from V will arrive at t.

The sampling process is independent across different times.Let rv

.= T · pv denote the expected number of arrivals of

v in the T online rounds (we interchangeably refer to thisas the arrival rate of v). We assume that the value rv lies in[0, 1]. Once a vertex v arrives, we need to make an imme-diate and irrevocable decision: either to reject v or assign vto one of its neighbors in U . Each u has a unit capacity: itwill be unavailable in the future upon being matched.3 Weare given a non-negative monotone submodular function fover E as an input. Our goal is to design an online matchingalgorithm such that E[f(M)] is maximized, whereM is thefinal (random) matching obtained.

There are two sources contributing to the randomness ofM: the stochasticity from the online arrivals of V and the in-ternal randomness used by the algorithm. Note thatM canbe a semi-matching, where each u has degree at most 1 whilesome v may have degree more than 1 (due to multiple onlinearrivals of v). Following prior work (Mehta 2012), we as-sume |V | � |U | and T � 1. Throughout this paper, we useedge e = (u, v) and assignment of v to u interchangeably.

Question 1. Is there a constant-factor competitive ratio4

for online algorithm for the Online Submodular BipartiteMatching problem?

Related model. One important direction in addressing di-versity in online algorithms has been via online convex pro-gramming. In particular, Agrawal and Devanur (2014) con-sidered the model of maximizing a concave function un-der convex constraints. At each time-step a random vectoris drawn from an unknown distribution and the goal is tosatisfy a convex constraint in expectation. Our work dif-fers from theirs in multiple aspects. First, the offline prob-lem of Agrawal and Devanur (2014) is poly-time solvable,while our problem even in the offline version has unknownhardness (status unknown for both NP- and APX-hardness).Equivalence between discrete and continuous functions ex-ists for submodular minimization via the Lovasz extension.However, a similar continuous relaxation for submodularmaximization is NP-hard to evaluate.5 Hence it is unclearhow one would use their model to address our problem.Secondly, they consider the large budget regime while allmatching type problems differ from allocation problems inthat this assumption is not true (in fact, the main challengeis small budgets). The other difference is that our “knowni.i.d.” gives algorithm design more power as compared tounknown distributions and therefore helps obtain improvedratios rigorously. For example, the online matching problem

3The general case where each u has a given capacity Cu can bereduced to this by creating Cu copies of u.

4See Definition 3. Constant refers to value being reasonablybounded away from zero even for large graphs.

5e.g., Slide 26 in https://goo.gl/HAhqaZ

with linear objectives has been studied both in unknown dis-tribution and known i.i.d. models separately since it presentsa natural trade-off—knowing more information about thedistribution and the competitive ratio. Based on applications,one would make assumption one-way or the other.

Special cases. Our model generalizes some well-knownproblems in this literature. Note that if the submodularfunction is just a linear function of the weights this re-duces to online weighted matching. Our model can also cap-ture the Submodular Welfare Maximization (SWM) prob-lem (Kapralov, Post, and Vondrak 2013); this problem andits variants have been widely studied in machine learningand economics (e.g., see (Esfandiari, Korula, and Mirrokni2016) and references within). Given an instance of SWM wecan add polynomially many extra vertices and reduce it to aninstance of our problem. Due to space constraints we deferthe proof of this reduction and all other theorems/lemmas inthis paper to the supplementary materials.

Applications. We briefly describe some motivating exam-ples for our problem. The first important application is inrecommender systems. Consider the problem of recommen-dation in platforms like Netflix, Amazon, etc. We have a setof users who come online and the system needs to choose asubset of movies, items to recommend to the user which hasthe most relevance. At the same time, the recommendationsto any user needs to be diverse both from an engagement per-spective (e.g.,, a user doesn’t want to see only action moviesrecommended or just a single brand of items while shop-ping) and from a fairness perspective (e.g., not showing onlystereotypical recommendations based on race, gender, etc.).See Fig. 1 for an example on the MovieLens dataset. Thisnaturally fits our model, where we can capture this trade-off between relevance and diversity via a weighted coveragefunction (which is monotone and submodular). Another ap-plication is in online advertising and auction design. Retar-geting in personalized advertisements is a major innovationin the past decade where potential advertisers collect back-ground information to provide a better ad experience to theirusers. One of the major optimization problems for the adver-tiser is to create various ads to be shown based on the userprofile without knowing a-priori the demand for various ver-sions. Hence the advertiser instead specifies a single budgetB for a bundle of ads. The goal of the ad-matching agencyis to run a matching algorithm with the objective that therevenue they will get for this bundle is min{B,

∑e∈M we},

which is a submodular function. Another application is inmatching candidates to jobs in a dynamic job market. Ahiring agency announces openings for various positions andhires the best candidates as and when they come. The mostbasic version of this problem is called the secretary prob-lem (Vanderbei 1980). The goal is usually to hire the bestcandidates for the open positions. Recently, with increasingawareness of various systemic biases, companies also lookto hire diverse candidates (based on various metrics of diver-sity such as gender, race, and political leanings), which theclassical secretary problem and its variants do not consider.6

6These have been explored practically in some recruiting sys-tems (Hong et al. 2013).

Page 3: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

Figure 1: Recommended Movies for User 574. Left - weighted matching (top 3 highest predictions). Right - submodularmatching with coverage function (balancing diversity of genres).

However, using our model with a submodular function suchas a weighted coverage function over the various metrics asan objective, we can essentially capture hiring the best can-didates while maximizing diversity.

Arrival assumption. The literature on Online Matchingconsiders three broad classes of arrival assumptions: Adver-sarial Order (AO) (e.g., (Assadi, Hsu, and Jabbari 2015)),Random Arrival Order (RAO) (e.g., (Zhao, Li, and Ma 2014;Subramanian et al. 2015)), and Known Independent andIdentical Distribution (KIID). In KIID, an online agent’s ar-rival is modeled as a sample (identically with replacement)from a known distribution (e.g., (Singer and Mittal 2013;Singla and Krause 2013)). In this paper, we consider theKIID assumption which captures the fact that the distribu-tion over types can be learnt from historical data; thus canget improved ratios over other models (see (Dickerson et al.2018) for a discussion).

Our contributions. Our contributions can be summarizedas follows. First, we propose the Online Submodular Bipar-tite Matching (OSBM) model, which abstractly captures thebalance between relevance and diversity in the context ofmatching markets. Next, we provide two provably good al-gorithms for this model 7. The first algorithm is based onContention Resolution schemes used in the offline submod-ular maximization literature. This algorithm works for thecase when the arrival rates are integral. Our second algo-rithm is based on using a feasible solution to an appropriatemathematical program, where this feasible solution approx-imates the offline optimal by a factor 1 − 1/e, to guide theonline actions. This algorithm works for the general case ofarbitrary arrival rates. The ratio achieved by this algorithmis tight even when restricted to the special case of linear ob-jectives, however the proof only works when the number ofrounds T → ∞. Nonetheless it can be seen as a naturalgeneralization to submodular functions of the LP-based al-gorithm proposed by Haeupler, Mirrokni, and Zadimoghad-dam (2011). Finally, we run experiments on both real-worldas well as synthetic datasets on some common submodularfunctions to validate our algorithms and compare them tonatural heuristics.

7One of them works under a mild assumption of |U | = o(√T )

Related work. The offline version of our problem is thewell-studied “maximizing a monotone submodular func-tion subject to a bipartite matching polytope constraint”problem. More generally, the constraint set can be viewedas an intersection of two partition matroids. The generalarea of submodular maximization is well studied; here,we only survey algorithmic advances related to maximiza-tion of a monotone submodular function subject to vari-ous constraints. The classical work of Nemhauser, Wolsey,and Fisher (1978) showed that the natural greedy algorithmachieves an (1 − 1/e)-approximation under a cardinalityconstraint, which is optimal in the value oracle model as-suming P 6= NP (Nemhauser and Wolsey 1978). Undera general matroid constraint, Calinescu et al. (2011) gavean algorithm achieving the optimal ratio of 1 − 1/e (in thevalue oracle model defined in Section ) using the pipagerounding technique. Lee, Sviridenko, and Vondrak (2010)considered the constraint case of k matroids with k ≥ 2and presented a local-search based algorithm. Sarpatwar,Schieber, and Shachnai (2017) studied the case of intersec-tion of k matroids and a single knapsack constraint. Re-cently a series of works has considered submodular max-imization in the online setting. In particular, Buchbinder,Feldman, and Schwartz (2015) and Chan et al. (2017) stud-ied online submodular maximization in the adversarial ar-rival order with preemption: on arrival of an item, we shoulddecide whether to accept it or not and possibly rejectinga previously accepted item. In this paper, we do not al-low preemption but consider a more flexible arrival assump-tion (i.e., KIID). This makes the problem tractable and ad-mits algorithms with non-trivial competitive ratios. Apartfrom the offline and online models, submodular maximiza-tion has received much attention in other models due to itsapplications in summarization (Tschiatschek et al. 2014),data subset selection and active learning (Wei, Iyer, andBilmes 2015), and diverse summarization (Mirzasoleiman,Badanidiyuru, and Karbasi 2016), to name a few. It has beenstudied in the streaming (Badanidiyuru et al. 2014; Mirza-soleiman, Jegelka, and Krause 2018), distributed (Mirza-soleiman, Badanidiyuru, and Karbasi 2016; Mirzasoleimanet al. 2016) and stochastic (Karimi et al. 2017; Stan et al.2017) settings. Online Bipartite matching has been stud-

Page 4: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

ied with a long line of work, overviewed comprehensivelyby Mehta (2012). In the KIID arrival model, Feldman etal. (2009) introduced the idea of two suggested matchingsand used that to guide the online phase, which was the firstto beat 1−1/e for the unweighted online bipartite matching.A similar idea was used by Haeupler, Mirrokni, and Zadi-moghaddam (2011) for edge-weighted case. Manshadi, Gha-ran, and Saberi (2012), Jaillet and Lu (2013), and Brubachet al. (2016) designed LP-based online algorithms for theunweighted, vertex-weighted and edge-weighted versions ofonline matching problems to achieve the best known ratios.

PreliminariesWe first describe the notation used throughout this paper.For two vectors a and b, a ≤ b denotes the coordinate-wise“≤” operation. For a binary vector a = (ae) ∈ {0, 1}m, letSupp(a) = {e : ae = 1} be the support of a; we writef(a) as a short-hand for f(Supp(a)) for any set functionover E. In this paper, we use vectors to denote sets (i.e., us-ing the indicator binary vector for a set). e is used both as anedge index as well as Euler’s constant; usage will be appar-ent from the context. We now give a formal definition of thesubmodular function and describe some canonical examples.Definition 1 (Submodular function). A function f :2[n] → R+ on a ground-set of elements [n] := {1, 2, . . . , n}is called submodular if for every A,B ⊆ [n], we have thatf(A∪B)+f(A∩B) ≤ f(A)+f(B) and f(φ) = 0. Addi-tionally, f is said to be monotone if for every A ⊆ B ⊆ [n],we have that f(A) ≤ f(B).

For our algorithms, we assume a value-oracle access toa submodular function. This means that, there is an oraclewhich on querying a subset T ⊆ [n], returns the value f(T ).The algorithm does not have access to f explicitly.

Examples. Some common examples of submodular func-tions include the coverage function, piece-wise linear func-tions, budget-additive functions among others. In our exper-iments section, we use the following two examples.

1. Coverage function. Given a universe U and g subsetsA1, A2, . . . , Ag ⊆ U , the function f(S) = | ∪i∈S Ai|is called the coverage function for any S ⊆ [g]. This cannaturally be extended to the weighted case. Given a non-negative weight function w : U → R+, then the weightedcoverage function is defined as f(S) = w(∪i∈SAi).

2. Budget-additive function. For a given total budget B anda set of weights wi ≥ 0 on the elements [g] of universeU , for any subset S ⊆ U the budget-additive function isdefined as f(S) = min{

∑i∈S wi, B}.

Definition 2 (Multilinear extension). The multilinear ex-tension of a submodular function f is the continuousfunction F : [0, 1]n → R+ defined as F (x) :=∑T⊆[n](

∏k∈T xk

∏k 6∈T (1− xk))f(T ).

Note that F (x) = f(x) for every x ∈ {0, 1}n. The mul-tilinear extension is a useful tool in maximization of sub-modular objectives. In particular, the above has the follow-ing probabilistic interpretation. Let Rx ⊆ [n] be a ran-dom subset of items where each item i ∈ [n] is added

into Rx independently with probability xi. We then haveF (x) = E[f(Rx)].

Offline optimal. Throughout this paper we use the termsoffline optimal (or interchangeably offline optimal value)which refers to the following. Given a specific sequence Sof (random) arrivals, the “offline problem” is to find the besthindsight matching that maximizes the objective on this se-quence, denoted by OPT(S). Note that OPT(S) is a ran-dom variable since S is random. The offline optimal value,denoted by E[OPT], is the expectation of OPT(S), wherethe expectation is taken over all possible random sequencesS.Definition 3 (Competitive ratio). Let E[ALG(I,D)] de-note the expected value obtained by an algorithm ALG onan instance I and arrival distribution D. Let E[OPT(I)]denote the expected offline optimal. Then the competitive ra-tio is defined as minI,D E[ALG(I,D)]/E[OPT(I)].

Challenges and Main TechniquesOur algorithm, like prior work on Online Matching, followsa two-phase approach divided into an Offline phase and anOnline phase.

Offline phase. The first key challenge is to obtain agood handle on the optimal offline solution. For the edge-weighted OBM, the offline version reduces to a maximumweighted matching problem on a bipartite graph, which canbe solved efficiently. For OSBM, the offline version which isto maximize a general non-negative monotone submodularfunction within a bipartite polytope, is non-trivial. Neitherpolynomial time- nor APX-hardness of this problem is well-understood. We tackle this challenge by first proposing a(offline) Multilinear Maximization Program (MMP) wherewe maximize the multilinear extension F of the given sub-modular function f subject to bipartite matching constraints,and then use the continuous greedy algorithm (Calinescu etal. 2011) to solve it. This gives us a marginal distributionx∗ = {x∗e} for each edge being added in the offline optimalsatisfying F (x∗) ≥ (1− 1/e)E[OPT].

Online phase. The next challenge is to use the approximateoffline marginal distribution x∗ to guide the online phase.We propose two online algorithms which take x∗ as inputand make the online decisions by using a modified versionof this. The first is inspired by Theorem 4.3 due to Bansalet al. (2012) and its extension. We call this the CR-based al-gorithm which works for the special case of integral arrivalrates. If f is a linear function, then showing each edge e isadded by an online algorithm ALG with probability at leastαx∗e implies that ALG achieves a final ratio of α(1 − 1/e)(the second factor 1 − 1/e accounts for the loss in the of-fline phase). This is because E[ALG] ≥ αF (x∗) by linear-ity of expectation. However, this approach fails when F isa multilinear extension of the submodular function f . Weovercome this by using Theorem 4.3 of Bansal et al. (2012)(see supplementary materials for the theorem statement),which gives a sufficient condition to ensure that E[ALG] ≥αF (x∗) for any multilinear extension F , provided that eachedge e is added in ALG with a marginal distribution at least

Page 5: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

αx∗e . This framework is generalized to Contention Resolu-tion (CR) schemes (Vondrak, Chekuri, and Zenklusen 2011),which is used as a tool for the following general problem.Consider a fractional x ∈ PI where PI is a convex relax-ation of an integral polytope I and let X = (Xe) (not nec-essarily within I) be a random indicator vector where everyXe is a Bernoulli random variable with mean xe. Our goal isto round X to another integral vector Y such that (1) Y ∈ Iand (2) E[f(Y)] ≥ αE[f(X)] = αF (x) with as large α aspossible.

Our second proposed algorithm, which works forarbitrary arrival rates, is an MMP-based algorithm(MMP-ALG) described as follows. When a vertex v arrives,sample a neighboring edge e = (u, v) with probability x∗eand include it iff u is still available. When f is linear, Hae-upler, Mirrokni, and Zadimoghaddam (2011) gave a simpleand tight analysis8 showing that MMP-ALG loses a factorof 1 − 1/e in the online phase. The tight example is as fol-lows.

Example 1. Consider an unweighted bipartite graph G =(U, V,E) consisting of a perfect matching with |U | = |V | =T with x∗e = 1 for each e and f(x∗) =

∑e x∗e . Notice

that each e = (u, v) is added by MMP-ALG iff v comesat least once during the T rounds, which occurs with prob-ability equal to 1− 1/e. Thus in this example, we have thatE[MMP-ALG] = (1− 1/e)f(x∗).

In this paper, we give a tight analysis showing thatMMP-ALG losses a factor at most 1 − 1/e in the onlinephase even for an arbitrary non-negative monotone submod-ular function f . The downside is that the bounds hold onlyin the limit when T → ∞. We believe a careful modifi-cation of our proof will lead to a finite time analysis, butdo not do so in this paper. In particular when T → ∞,we prove that E[MMP-ALG] ≥ (1 − 1/e)F (x∗) and thusthis yields a final ratio of (1 − 1/e)2 (after incorporatinganother factor of 1 − 1/e in the offline phase). The mainproof idea is through a virtual algorithm ALG which has thesame performance as MMP-ALG and by applying pipagerounding (Ageev and Sviridenko 2004) to ALG we showthat E[ALG] ≥ F ((1− 1/e)x∗) ≥ (1− 1/e)F (x∗).

Offline PhaseFor an edge e, let xe be the probability that e is chosen in anyfixed offline optimal algorithm. For each u (likewise for v),letE(u) (E(v)) be the set of neighboring edges incident to u(v) in G. Let F : [0, 1]m → R+ be the multilinear extensionof f . Consider the following mathematical program.

maximize F (x) (1)subject to

∑e∈E(v) xe ≤ rv ∀v ∈ V (2)∑e∈E(u) xe ≤ 1 ∀u ∈ U (3)

0 ≤ xe ≤ 1 ∀e ∈ E (4)

The constraints can be interpreted informally as follows.Constraint (2) states that the expected number of matches

8Here, “tight” refers to the analysis and not the problem formu-lation itself.

for any v is no more than the expected number of arrivals ofv (i.e., rv). Constraint (3) states that the expected number ofmatches for every u is no more than 1, since u has an unit ca-pacity. Constraint (4) is valid since every xe is a probabilityvalue.

Lemma 1. There is an efficient algorithm (running in poly-nomial time) which returns a feasible solution x∗ to theprogram (1) such that F (x∗) ≥ (1 − 1/e)E[OPT], whereE[OPT] is the offline optimal value.

Online AlgorithmsIn this section, we present several online algorithms that takex∗ as an input, which is a feasible solution to the program(1) with F (x∗) ≥ (1− 1/e)E[OPT], where E[OPT] refersto the offline optimal.

A CR-based online algorithm. In this section, we presenta CR-based online algorithm (CR-ALG) for OSBM withintegral arrival rates. In this case, we assume that pv = 1/Tand rv = 1 for all v.

The main idea is as follows. We start with Rx∗ , which isobtained by independently sampling each edge e with prob-ability x∗e . Let X ∈ {0, 1}m be the integral vector cor-responding to Rx∗ such that Xe = 1 iff e ∈ Rx∗ . LetEX(v) = {e : e ∈ E(v), Xe = 1} and EX(u) = {e :e ∈ E(u), Xe = 1} be the set of sampled edges incident tou and v respectively. Now we obtain another random vec-tor Y ∈ {0, 1}m from X by uniformly sampling an edgefrom EX(u) for each u (the sampling process is indepen-dent across different u). We then use both X and Y to guidethe online phase. Algorithm 2 describes this algorithm for-mally.

Algorithm 1 A CR-based algorithm (CR-ALG)

Offline Phase:Solve Program (1) using continuous greedy and let x∗ =(x∗e) be an approximate solution with F (x∗) ≥ (1 −1/e)E[OPT].Independently sample each edge with probability x∗e . LetX = (Xe) ∈ {0, 1}m be the resultant indicator vectorsuch that Xe = 1 iff e is sampled.For each w ∈ U ∪ V , let EX(w) = {e : e ∈ E(w), Xe =1} be the set of sampled edges incident to w. Sampleone edge uniformly at random from EX(u) for each uif EX(u) 6= ∅. Let Y ≤ X be the indicator vector of thefinal edges sampled.Online Phase:When v arrives at time t, sample an edge e uniformly fromEX(v). Match it if Ye = 1 and e = (u, v) is safe at t (i.e.,u is available); skip it otherwise.

Theorem 1. There exists an online algorithm CR-ALG,which achieves an online competitive ratio of at least 1

2 (1−e−1/2)(1− 1/e) for OSBM with integral arrival rates.

An MMP-based online algorithm. In this section, wepresent a MMP-based online algorithm (MMP-ALG) for

Page 6: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

OSBM. Compared to CR-ALG, it also extends to theregime of arbitrary arrival rates rv ∈ [0, 1] for each v ∈ V .Algorithm 2 describes it formally.

Algorithm 2 An MMP-based online algorithm(MMP-ALG)

Offline Phase:Solve Program (1) using continuous greedy and let x∗ =(x∗e) be an approximate solution with F (x∗) ≥ (1 −1/e)E[OPT].Online Phase:When v arrives at time t, sample an edge e from E(v)

with probability x∗erv

(at most one such edge gets sampled).Match it if e = (u, v) is safe at t (i.e., u is available) andskip it otherwise.

Theorem 2. There exists a MMP-based online algorithmMMP-ALG which achieves a competitive ratio of at least(1− 1/e)2 for OSBM when |U | = o(

√T ) and T →∞.

ExperimentsIn this section, we describe the experimental results for themovie recommendation application. Additional experimentsusing synthetic data on other submodular functions are rel-egated to the supplemental material. We use the MovieLensdataset (Harper and Konstan 2016) for our purposes9.

Application. We have a list of movies each associated withsome genres and we have a set of users who come into thesystem at various times (e.g., a user logging into the web-site for a session). We have information about the ratings ofevery user for some (different) movies. Our goal is to rec-ommend a small set of movies which the user hasn’t ratedthus far such that the list is relevant as well as diverse. Wequantify the diversity by using a weighted coverage func-tion over the set of genres for each user. Hence the goal isto maximize the sum of these weighted coverage functionsfor all users.10 This naturally fits within the framework pro-posed in this paper, where the set of movies form the side Uand the set of users form the side V .11

Dataset and pre-processing. In this dataset, we have 3952movies, 6040 users and a total of 100209 ratings of themovies by the users. We choose 200 users who have giventhe most ratings and sub-sample 100 movies at random; thisreduced dataset is used for experiments. Similar to Ahmed,Dickerson, and Fuge (2017), we use a standard collaborativefiltering approach (Bradley 2016) to complete the matrix ofratings. To create the graph we do the following. For a givenpair of user u and movie m, if u hasn’t rated m we add anedge between u and m. For a given user u, we compute the

9Full code can be found at https://bitbucket.org/karthikabinav/submodularmatching/src/master/

10The sum of submodular functions is also submodular.11See supplementary materials for details on a Linear Program-

ming formulation of the offline problem.

average predicted rating for every genre and use this aver-age as the “weight” in the weighted coverage function. Thisgives a bias towards genres which the user has highly ratedover ones they haven’t. For every user we choose a randomarrival probability (ensuring that the sum of arrival probabil-ities equals 1).

Algorithms. We test both our CR-based (Algorithm 1) andthe MMP-based (Algorithm 2) experimentally. Additionallywe consider the following two heuristics for our study. (1)Greedy: At time step t, let St be the set of edges chosen sofar. When a vertex v arrives, choose an available neighboru that maximizes f(St ∪ {(u, v)}) − f(St). If no neighboris available, we drop v. (2) Negative CR-based algorithm(NEG-CR): We tweak CR-ALG by replacing the initial in-dependent sampling with the following procedure. At everyu, we use the dependent rounding routine due to Gandhi etal. (2006) to obtain a semi-matchingM1. In the online phasewhen a v arrives, we sample one of its available neighborsinM1 uniformly and match it. If not, we drop v.

Results and discussion. We run two kinds of experimentsfor our purposes. First, we compare our algorithms againstthe baselines by varying two parameters B and η. B repre-sents the number of times we can match a movie to an userand η represents the number of movies matched to any useron arrival (in the theory B = 1, η = 1, but we experimentwith different values). Second, we want to measure diver-sity of recommendations of the various algorithms. To thisend, we compare the various algorithms on the number ofusers who have various levels of coverage (i.e., how manyusers are shown recommendations greater than x % of thetotal weight). The plots in Figure 2 and the leftmost plot ofFigure 3 show the results for the first kind of experiments,while the right two plots in Figure 3 show the results for thesecond kind.

In almost all cases, these plots show that MMP-ALG isthe clear winner and has the best performance. At timesthe Greedy algorithm does well, but as B increases the per-formance drops quickly. Additionally, Greedy makes manycalls to the submodular oracle at each online step, as com-pared to the other algorithms, which can be limiting in if theoracle evaluation is time-consuming. The surprising aspecton these experiments is that the other proposed algorithmCR-ALG does not perform even as well as Greedy. The ex-planation is that we assign non-integral arrival rates to eachuser. We show in the supplementary materials that when theyare assigned integral rates, CR-ALG’s performance is com-parable to MMP-ALG and much better than Greedy. As wefurther show in the supplementary materials, for the budget-additive submodular function, however, even for fractionalrates, CR-ALG performs as well as MMP-ALG (and muchhigher than the theoretical bounds). The diversity histogramsshow that MMP-ALG is performs well and a good fractionof the users have a coverage greater than 50 % and all theway up to 90% (in the pragmatic case of b = 15, η = 5).However, the other algorithms have a coverage of at most20 - 30% for all users (even for the Greedy algorithm whenB = 1, η = 1 where the competitive ratio is higher thanMMP-ALG).

Page 7: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

Figure 2: Results when the genre weights are the average of predicted ratings for users. The x-axis varies B and the y-axisrepresents the ratio. (Left): η = 1, (Center): η = 3, (Right): η = 5.

Figure 3: (Left): Same as the left plot in Figure 2 with genre weight chosen U [0, 1]. (Center and Right): x-axis percentage ofcoverage of genres and y-axis number of users who fall in that range.

ConclusionIn this paper, we proposed a new model, Online Submodularbipartite matching (OSBM), which effectively captures no-tions such as relevance and diversity in matching markets.Many applications such as advertising, hiring diverse can-didates, recommending movies or songs naturally fit withinthis framework. We propose two algorithms, one based oncontention-resolution schemes and the other based on us-ing the solution of the mathematical program directly; wegive theoretical guarantees on their performance. The algo-rithm based on using the mathematical program directly isessentially tight even for the special case of linear objec-tives. Finally, via experiments we show that our algorithmsdo well in practice. We also proposed heuristics, some ofwhich perform well on specialized submodular functions,and showed that our general algorithm is competitive withsuch algorithms as well.

AcknowledgementsAravind Srinivasan’s research was supported in part by NSFAwards CNS-1010789, CCF-1422569 and CCF-1749864,and by research awards from Adobe, Inc. The research ofKarthik Sankararaman and Pan Xu was supported in part byNSF Awards CNS 1010789 and CCF 1422569.

The authors would like to thank the anonymous reviewersfor their helpful feedback.

References[2016] Adamczyk, M.; Sviridenko, M.; and Ward, J. 2016.Submodular stochastic probing on matroids. Mathematicsof Operations Research (MoR).

[2012] Adomavicius, G., and Kwon, Y. 2012. Improving ag-gregate recommendation diversity using ranking-based tech-niques. IEEE TKDE.

[2004] Ageev, A. A., and Sviridenko, M. I. 2004. Pipagerounding: A new method of constructing algorithms withproven performance guarantee. Journal of CombinatorialOptimization.

[2014] Agrawal, S., and Devanur, N. R. 2014. Fast algo-rithms for online stochastic convex programming. In SODA.

[2009] Agrawal, R.; Gollapudi, S.; Halverson, A.; and Ieong,S. 2009. Diversifying search results. In WSDM.

[2017] Ahmed, F.; Dickerson, J. P.; and Fuge, M. 2017. Di-verse weighted bipartite b-matching. In IJCAI.

[2015] Assadi, S.; Hsu, J.; and Jabbari, S. 2015. Online as-signment of heterogeneous tasks in crowdsourcing markets.In AAAI-HComp.

[2014] Badanidiyuru, A.; Mirzasoleiman, B.; Karbasi, A.;and Krause, A. 2014. Streaming submodular maximization:Massive data summarization on the fly. In KDD.

[2012] Bansal, N.; Korula, N.; Nagarajan, V.; and Srinivasan,A. 2012. Solving packing integer programs via randomizedrounding with alterations. Theory of Computing.

[2016] Bradley, A. P. 2016. Movielens collaborative filter-ing. In https://github.com/bradleypallen/ keras-movielens-cf, 2016.

[2016] Brubach, B.; Sankararaman, K. A.; Srinivasan, A.;and Xu, P. 2016. New algorithms, better bounds, and anovel model for online stochastic matching. ESA.

[2015] Buchbinder, N.; Feldman, M.; and Schwartz, R. 2015.

Page 8: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

Online submodular maximization with preemption. InSODA.

[2011] Calinescu, G.; Chekuri, C.; Pal, M.; and Vondrak, J.2011. Maximizing a monotone submodular function subjectto a matroid constraint. SIAM Journal on Computing.

[2017] Chan, T.; Huang, Z.; Jiang, S. H.-C.; Kang, N.; andTang, Z. G. 2017. Online submodular maximization withfree disposal: Randomization beats 1/4 for partition ma-troids. In SODA.

[2016] Chen, C.; Zheng, L.; Srinivasan, V.; Thomo, A.; Wu,K.; and Sukow, A. 2016. Conflict-aware weighted bipartiteb-matching and its application to e-commerce. IEEE TKDE.

[2018] Dickerson, J. P.; Sankararaman, K. A.; Srinivasan,A.; and Xu, P. 2018. Allocation problems in ride-sharingplatforms: Online matching with offline reusable resources.AAAI.

[2016] Esfandiari, H.; Korula, N.; and Mirrokni, V. 2016. Bi-objective online matching and submodular allocations. InNIPS.

[2009] Feldman, J.; Mehta, A.; Mirrokni, V.; and Muthukr-ishnan, S. 2009. Online stochastic matching: Beating 1-1/e.In FOCS.

[2006] Gandhi, R.; Khuller, S.; Parthasarathy, S.; and Srini-vasan, A. 2006. Dependent rounding and its applications toapproximation algorithms. Journal of the ACM (JACM).

[2011] Haeupler, B.; Mirrokni, V. S.; and Zadimoghaddam,M. 2011. Online stochastic weighted matching: Improvedapproximation algorithms. In WINE.

[2016] Harper, F. M., and Konstan, J. A. 2016. The movie-lens datasets: History and context. ACM Transactions onInteractive Intelligent Systems (TiiS) 5(4):19.

[2012] Ho, C.-J., and Vaughan, J. W. 2012. Online task as-signment in crowdsourcing markets. In AAAI.

[2013] Hong, W.; Li, L.; Li, T.; and Pan, W. 2013. iHR: anonline recruiting system for Xiamen Talent Service Center.In KDD.

[2013] Jaillet, P., and Lu, X. 2013. Online stochastic match-ing: New algorithms with better bounds. Mathematics ofOperations Research (MoR).

[2013] Kapralov, M.; Post, I.; and Vondrak, J. 2013. Onlinesubmodular welfare maximization: Greedy is optimal. InSODA.

[2017] Karimi, M.; Lucic, M.; Hassani, H.; and Krause, A.2017. Stochastic submodular maximization: The case ofcoverage functions. In NIPS.

[1990] Karp, R. M.; Vazirani, U. V.; and Vazirani, V. V. 1990.An optimal algorithm for on-line bipartite matching. InSTOC.

[2010] Lee, J.; Sviridenko, M.; and Vondrak, J. 2010. Sub-modular maximization over multiple matroids via general-ized exchange properties. Mathematics of Operations Re-search (MoR).

[2012] Manshadi, V. H.; Gharan, S. O.; and Saberi, A. 2012.Online stochastic matching: Online actions based on offlinestatistics. Mathematics of Operations Research (MoR).

[2012] Mehta, A. 2012. Online matching and ad allocation.Theoretical Computer Science.

[2016] Mirzasoleiman, B.; Badanidiyuru, A.; and Karbasi,A. 2016. Fast constrained submodular maximization: Per-sonalized data summarization. In ICML.

[2016] Mirzasoleiman, B.; Karbasi, A.; Sarkar, R.; andKrause, A. 2016. Distributed submodular maximization.JMLR.

[2018] Mirzasoleiman, B.; Jegelka, S.; and Krause, A. 2018.Streaming non-monotone submodular maximization: Per-sonalized video summarization on the fly. AAAI.

[1978] Nemhauser, G. L., and Wolsey, L. A. 1978. Bestalgorithms for approximating the maximum of a submodularset function. Mathematics of Operations Research (MOR).

[1978] Nemhauser, G. L.; Wolsey, L. A.; and Fisher, M. L.1978. An analysis of approximations for maximizing sub-modular set functions?i. Mathematical Programming.

[2017] Sarpatwar, K. K.; Schieber, B.; and Shachnai, H.2017. Interleaved algorithms for constrained submodularfunction maximization. arXiv preprint arXiv:1705.06319.

[2013] Singer, Y., and Mittal, M. 2013. Pricing mechanismsfor crowdsourcing markets. In WWW.

[2013] Singla, A., and Krause, A. 2013. Truthful incentivesin crowdsourcing tasks using regret minimization mecha-nisms. In WWW.

[2017] Stan, S.; Zadimoghaddam, M.; Krause, A.; and Kar-basi, A. 2017. Probabilistic submodular maximization insub-linear time. In ICML.

[2015] Subramanian, A.; Kanth, G. S.; Moharir, S.; and Vaze,R. 2015. Online incentive mechanism design for smartphonecrowd-sourcing. In WiOPT.

[2016a] Tong, Y.; She, J.; Ding, B.; Chen, L.; Wo, T.; and Xu,K. 2016a. Online minimum matching in real-time spatialdata: experiments and analysis. Proceedings of the VLDBEndowment.

[2016b] Tong, Y.; She, J.; Ding, B.; Wang, L.; and Chen,L. 2016b. Online mobile micro-task allocation in spatialcrowdsourcing. In ICDE.

[2017] Tong, Y.; Wang, L.; Zhou, Z.; Ding, B.; Chen, L.; Ye,J.; and Xu, K. 2017. Flexible online task assignment inreal-time spatial data. Proc. VLDB Endow.

[2014] Tschiatschek, S.; Iyer, R. K.; Wei, H.; and Bilmes,J. A. 2014. Learning mixtures of submodular functions forimage collection summarization. In NIPS.

[1980] Vanderbei, R. J. 1980. The optimal choice of a sub-set of a population. Mathematics of Operations Research(MoR).

[2011] Vondrak, J.; Chekuri, C.; and Zenklusen, R. 2011.Submodular function maximization via the multilinear re-laxation and contention resolution schemes. In STOC.

[2015] Wei, K.; Iyer, R.; and Bilmes, J. 2015. Submodularityin data subset selection and active learning. In ICML.

[2014] Zhao, D.; Li, X.-Y.; and Ma, H. 2014. How to crowd-source tasks truthfully without sacrificing utility: Online in-centive mechanisms with budget constraint. In INFOCOM.

Page 9: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

Supplementary MaterialsDetails on prior work on submodularityAs discussed in the preliminaries of the main section, we incorporate ideas from prior work on submodularity. In particular weuse the following theorem from (Bansal et al. 2012) and its extension called contention-resolution schemes ((Vondrak, Chekuri,and Zenklusen 2011)).Theorem 3. ((Bansal et al. 2012)) Let f be a non-negative monotone submodular function over E with |E| = m. Given afractional vector x ∈ [0, 1]m, let X = (Xe)e∈E be a random binary vector such that each Xe is a Bernoulli random variablewith mean xe. Suppose Z ≤ X is another random binary vector satisfying the following properties (1) & (2) for some α. Thenwe have that E[f(Z)] ≥ αE[f(X)].

1. Marginal Property: Pr[Ze = 1|Xe = 1] ≥ α.

2. Monotonicity Property: Pr[Ze = 1|X = a] ≥ Pr[Ze = 1|X = b], ∀a ≤ b ∈ {0, 1}m,∀e ∈ Supp(a) = {e′ : ae′ = 1}.By definition of the multilinear extension we have that E[f(X)] = F (x). Thus the theorem can be viewed as conditions when“linearity of expectation” can be applied to F .

Submodular Welfare Maximization (SWM) as a special case of our problemWe will now show how we can reduce the SWM problem to our model. Recall that the SWM problem is defined as follows.We have n vertices in U which are available offline. With each vertex u ∈ U we have a monotone submodular functiongu : 2V → R associated with it. When a vertex v arrives we need to match v to one of its neighbors in U . At the end of theonline phase, let S1, S2, . . . , Sn be the set of vertices assigned to vertices 1, 2, . . . , n respectively. The goal is to maximize thesum

∑ni=1 wi(Si).

Note that sum of submodular functions is a submodular function. Hence to make the objective function of SWM fit ourframework, we do the following. Let Eu denote the set of edges incident to u. Define a function gu : Eu → R. For any subsetS ⊂ Eu, we let g(S) := g(Sv) where Sv is the set of endpoints of S in V . The non-trivial part to handle is that in SWM anyvertex in U can be matched multiple times, while in our setting we allow any U to be matched exactly once. We can overcomethis by creating additional vertices as follows. For any u ∈ U , create |δ(u)| ∗T copies. A copy, indexed by v ∈ δ(u) and t ∈ [T ]has an edge only to v. Additionally, wlog we can enforce that at time t, an algorithm can be matched to vertices whose copyis indexed by t (this doesn’t change the optimal value). Therefore, we now have an instance with a submodular objective andmatching constraints.

Consider an arrival sequence τ . Let the optimal allocation in SWM under this arrival be Sτ,1, Sτ,2, . . . , Sτ,n at timesT1, T2, . . . , Tn. Then note that by considering the edges (uSτ,i,Tτ,i , Sτ,i) yields the same value to the objective in the OSBMmodel. Additionally, note that the above argument also holds in the other direction since there is a one-to-one mapping betweenthe two optimal solutions.

Proof of Lemma 1Proof. Observe that the polytopeP defined by Constraints (2)-(4) is downward closed. By Lemma 4 in (Adamczyk, Sviridenko,and Ward 2016), we can apply continuous greedy algorithm to get an approximation solution x∗ such that x∗ is feasible to Pand F (x∗) ≥ (1− 1/e)maxy∈P f

+(y), where f+ is the concave closure of f . For each given y ∈ P , by definition f+(y) isthe maximum value of E[f(R)] over all possible random sets R satisfying the marginal distribution that Pr[e ∈ R] ≤ ye foreach e. Thus we conclude that maxy∈P f

+(y) is an upper bound of the offline optimal and hence proving our claim.

Proof of Theorem 1Proof. Let Z = (Ze) be the indicator vector for e being matched in the CR-ALG and let X be as defined in Theorem 3with x = x∗ where x∗ is the optimal solution to the offline program. We show that Z satisfies the two properties stated inTheorem 3 with α = 1

2 (1 − e−1/2). Hence we have that E[f(Z)] ≥ αE[f(X)]. Moreover observe that E[f(X)] = F (x∗) ≥

(1− 1/e)E[OPT]. Combining these two facts proves Theorem 1.Consider an edge e = (u, v) with Xe = 1. Let |EX(u)| = k1 and |EX(v)| = k2, where k1 and k2 are the number of edges

incident to u and v in X12 including e, respectively. A sufficient condition for Ze = 1 given Xe = 1, |EX(u)| = k1, |EX(v)| =k2 is that Ye = 1 in this conditional space and that Ze = 1 given that Ye = 1. Thus we have,

Pr[Ze = 1∣∣∣Xe = 1, |EX(u)| = k1, |EX(v)| = k2]

≥ Pr[Ye = 1∣∣∣Xe = 1, |EX(u)| = k1] ∗ Pr[Ze = 1

∣∣∣ Ye = 1, |EX(v)| = k2, |EX(u)| = k1]

= 1k1

∑Tt=1

1T

1k2

(1− 1

T ·k2

)t−1

= 1k1

(1− exp

(− 1

k2

)).

12More precisely, we consider the sub-graph induced by the edges e with Xe = 1.

Page 10: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

In the second-last equality we used the fact that Ye = 1 is set uniformly for every edge e ∈ E(u) and thus Pr[Ye =

1∣∣∣ Xe = 1, |EX(u)| = k1] = 1

k1. Moreover we claimed that Pr[Ze = 1

∣∣∣ Ye = 1, |EX(v)| = k2, |EX(u)| = k1] =∑Tt=1

1T

1k2

(1− 1

T ·k2

)t−1. The argument is as follows. Consider a given e = (u, v) with Ye = 1. Note that from the algorithm,

the only vertex u can be matched to is a previous arrival of v. At a given time-step t ∈ [T ], this happens with probability 1k2|V | .

Moreover from the integral arrival rates assumption wlog we have that |V | = T . Thus the probability at u is safe at t ∈ [T ]

is(1 − 1

T ·k2

)t−1. The probability that v arrives at t ∈ [T ] and is assigned to u is 1

k2|V | . The event that (u, v) is matched

is mutually exclusive across the T time-steps. Putting these arguments together we get that Pr[Ze = 1∣∣∣ Ye = 1, |EX(v)| =

k2, |EX(u)| = k1] =∑Tt=1

1T

1k2

(1− 1

T ·k2

)t−1.

Given the above derivation, we are now ready to prove the two properties. First we show that the Marginal Property holdswith α = (1 − e−1/2). Notice that E[k1] = 1 +

∑e′∈E(u),e′ 6=e x

∗e′ ≤ 2 and E[k2] = 1 +

∑e′∈E(v),e′ 6=e x

∗e′ ≤ rv = 2, since

x∗ = (x∗e) is feasible to MMP (1). Also the two functions, 1k1

and(1 − exp

(− 1

k2

)), are convex in k1 and k2 respectively.

Thus by Jensen’s inequality, we have the following.

Pr[Ze = 1|Xe = 1] ≥ Ek1,k2

[Pr[Ze = 1

∣∣∣Xe = 1, |EX(u)| = k1, |EX(v)| = k2]]≥ 1

2

(1− e−1/2

).= α

The Monotonicity Property can be derived from the fact that 1k1

and(1−exp

(− 1k2

))are decreasing in k1 and k2 respectively.

Thus we are done.

Full Proof of Theorem 2The bounds in Theorem 2 comes from two parts. The first (1 − 1/e) factor is obtained from approximately solving MMP(1) offline while the second (1 − 1/e) factor is the ratio obtained because of the online nature of the problem. Note that ouronline analysis is tight: MMP-ALG losses at least one factor of (1 − 1/e) during the online stage even when f is linear. Wefirst provide a sketch here and then prove it in detail. Recall that X denotes the indicator for whether an edge is matched. Thenotations for this proof are overloaded and hence different from that in Theorem 1.

Proof sketch. For each u, let Iu indicate if u is finally matched (Iu = 1) after the T online rounds. Set x∗u =∑e∈E(u) x

∗e . We

then prove the following.

Lemma 2. {Iu : u ∈ U} are asymptotically independent with each Pr[Iu = 1] = 1− e−x∗u when T →∞ and |U | = o(√T ).

Let X ∈ {0, 1}m be the indicator vector for e being matched in MMP-ALG. Let Xu ∈ {0, 1}m be the restriction of X ontothe block E(u) with remaining entries all zeros such that X =

∑u∈U Xu. W.l.o.g. assume that the edges are grouped by blocks

of E(u) for all u ∈ U : the first few entries of X corresponds to some E(u) followed by another E(u′) and so on. Let 1e be anm-dimensional unit vector with a 1 only at coordinate e. Lemma 3 characterizes the distribution of Xu.

Lemma 3. Pr[Xu = 0] = e−x∗u , Pr[Xu = 1e] = (1− e−x∗u) x

∗e

x∗u, ∀e ∈ E(u)

Combining Lemmas 2 and 3, we can view X alternatively as follows. First, start with an arbitrary vector A of dimensionm. Then update the first block of A corresponding to some E(u) by setting Au = 0 with probability e−x

∗u and Au = 1e

with probability(1 − e−x∗u

)x∗ex∗u

, for every e ∈ E(u) (denote this procedure as (*)). Now apply (*) to the remaining blocksone-by-one independently. Set X = A at the end of this process.

In order to get the desired lower bound on E[f(X)] we consider the following random vector Y. Set Ye = 1 with probability(1 − 1/e)x∗e and with the remaining probability set it to be 0. From Lemma 4.2 in (Bansal et al. 2012), this implies thatE[f(Y)] = F (Y) ≥ (1− 1/e)F (x∗). The main idea of the proof is to show that after every update of (*) the invariant that thevalue of E[f(X)] is at least as large as F (Y) continues to hold. Thus the final random vector X satisfies that E[f(X)] ≥ F (Y).Thus we get E[f(X)] ≥ F (Y) ≥ (1− 1/e)F (x∗). This proves Theorem 2 since F (x∗) ≥ (1− 1/e)E[OPT].

Proof of Lemma 2Proof. Consider a given u. Notice that in each round t, u is assigned to a neighboring edge inE(u) with probability x∗u/T . Thus

after T online rounds it gets assigned at least once with probability 1−(1−x∗u/T

)T∼ 1−e−x∗u . Now we prove the statement

about the independence for different u. Consider two given disjoint subsets U1 and U2 and a given vertex u /∈ U1 ∪ U2, we

Page 11: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

show that

Pr[Iu = x

∣∣∣ ∧w∈U1

(Iw = 1

) ∧w∈U2

(Iw = 0

)]= Pr[Iu = x],∀x ∈ {0, 1}

For event∧w∈U2

(Iw = 0

)to occur, a sufficient condition is that in each round, no edge from

⋃w∈U2

E(w) arrives. This

occurs with probability 1 −∑w∈U2

x∗u/T . For event∧w∈U1

(Iw = 1

)to occur a sufficient condition is that in some rounds

only the vertices in U1 are assigned. For each w ∈ U1, let Nw be the number of assignments received by w during the T onlinerounds, i.e., the number of times w gets assigned an edge by MMP-ALG (irrespective of whether it is eventually matched ornot). Observe that Nw ∼ Pois(x∗w) when T is large. We can verify that 13 Pr[Nw > lnT ] = O(T−2).

Thus with probability 1−O(|U | ∗ T−2) = 1− o(T−1), Nw is no larger than lnT for all w ∈ U1. Hence with a probabilityof at least 1 − o(T−1), the total number of rounds reserved for the shots of vertices in U1 is at most |U | ∗ lnT . Thus, withprobability a probability at least 1− o(T−1), we have the following.

(1− x∗u/T

1−∑w∈U1∪U2

x∗w/T

)T≤ Pr

[Iu = 0

∣∣∣ ∧w∈U1

(Iw = 1

) ∧w∈U2

(Iw = 0

)]

(1− x∗u/T

1−∑w∈U1∪U2

x∗w/T

)T−|U |∗lnT

Note that both sides of the inequality approaches e−x∗u when |U | = o(

√T ) and T →∞. Thus we are done.

Proof of Lemma 3

Proof. The first part of the Lemma follows directly from Lemma 2 with Iu = 0. We will now prove the second part. Let Iu,tindicate that u is matched (for the first time) at time t. Consider a given e ∈ E(u).

Pr[Xu = 1e|Iu = 1] =

T∑t=1

Pr[Xu = 1e|Iu,t = 1] · Pr[Iu,t = 1|Iu = 1]

=

T∑t=1

x∗e/T∑e′∈E(u) x

∗e′/T

· Pr[Iu,t = 1|Iu = 1]

=x∗ex∗u

The second equality follows from the following argument. In each time t, u will be assigned an edge e′ ∈ E(u) with probabilityx∗e′/T . Thus conditioning on the event that u gets matched at t, the conditional probability that u gets matched by edge e isexactly x∗e/T∑

e′∈E(u) x∗e′/T

. Therefore we have

Pr[Xu = 1e] = Pr[Xu = 1e|Iu = 1] · Pr[Iu = 1] =(1− e−x

∗u

)x∗ex∗u.

Theorem 4. E[f(X)] ≥ (1− 1/e)F (x∗)

Proof. Let Y,A be as defined in the proof sketch above. Let Z be the random vector obtained after updating the first block ofA, say E(u). We show that E[f(Z)] ≥ F (A). Let R = (1− 1/e)x∗.

Let R−u ∈ [0, 1]m be the restriction of R onto all blocks other thanE(u) (hence the entries in the blockE(u) are all zeroes).Note that both R and R−u have the same length m. Let R−u be the random indicator vector to denote whether an edge wassampled (independently with probability according to R−u).

13https://eventuallyalmosteverywhere.wordpress.com/2013/02/26/poisson-tails/

Page 12: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

From the above analysis, we have the following.

E[f(Z)] (5)

=∑e∈E(u)

(1− e−x∗u

)x∗ex∗uF (R−u + 1e) + e−x

∗uF (R−u) (6)

≥∑e∈E(u)(1− 1/e)x∗eF (R−u + 1e) +

(1− (1− 1/e)x∗u

)F (R−u) (7)

=∑e∈E(u)(1− 1/e)x∗e

(∑a Pr[R−u = a]F (a+ 1e)

)+(1− (1− 1/e)x∗u

)(∑a

Pr[R−u = a]F (a))

(8)

=∑

a Pr[R−u = a](∑

e∈E(u)(1− 1/e)x∗eF (a+ 1e) +(1− (1− 1/e)x∗u

)F (a)

)(9)

Inequality (7) is due to the monotonicity of f : we have that F is non-decreasing over each entry and thus F (R−u + 1e) ≥F (R−u) for all e; note that the probability mass distributed over each F (R−u + 1e) is

(1 − e−x∗u

)x∗ex∗u≥ (1 − 1/e)x∗e and

thus by squeezing the surplus mass from each lower bound to the last item F (R−u), we get our claim. Inequality (8) followsdirectly from the definition of the multilinear extension F .

For a given realization a of R−u, define a set function ga over E(u) as follows. Consider a given binary vector b′ ∈{0, 1}|E(u)|. For notational convenience, we extend b′ to a vector of length of m by filling the remaining entries as 0; let b bethe resultant vector. Define ga(b′) = f(a + b) for each b′ ∈ {0, 1}|E(u)|. From Lemma 4, we have that each given a, ga is amonotone submodular set function over E(u). Let Ru ∈ [0, 1]m be the restriction of R onto the block E(u) with the remainingentires being 0 and R′u ∈ [0, 1]|E(u)| be the truncated version of Ru onto E(u). Let Ga be the multilinear extension of ga.Focus on the second part of the expression in (9).

Λ.=

∑e∈E(u)

(1− 1/e)x∗eF (a + 1e) +(1− (1− 1/e)x∗u

)F (a) (10)

=∑

e∈E(u)

(1− 1/e)x∗ega(1′e) +(1− (1− 1/e)x∗u

)ga(0) (11)

≥ Ga(Y′u) (12)

=∑b′

Pr[R′u = b′]ga(b′) (13)

=∑b

Pr[Ru = b]f(a + b) (14)

In (11), both 1′e (elementary vector of e) and 0 have the same length |E(u)|. Recall that R = (1 − 1/e)x∗ and thusR′u =

((1− /e)x∗e : u ∈ E(u)

). Inequality (12) follows from applying Lemma 5,as shown later, to the function ga and R′u. In

equalities (13) and (14), R′u ∈ {0, 1}|E(u)| and Ru ∈ {0, 1}m are the respective random indicator vectors denoting if an edgewas sampled (independently according to R′u and Ru). The two equalities (13) and (14) follow directly from the definitions ofga and Ga.

Substituting the result in (14) back to (9), we have that

E[f(Z)] ≥∑a

Pr[R−u = a]∑b

Pr[Ru = b]f(a+ b) = E[f(Y)] = F (Y).

By applying the above analysis repeatedly to each block E(u), we have that the final random integral vector Z is same as Xand that it satisfies E[f(X)] ≥ F (Y) ≥ (1− 1/e)F (x∗).

Technical LemmasThroughout this section, we assume f is a general non-negative monotone submodular function over the ground set [m] ={1, 2, · · · ,m}. Consider a given subset S ⊆ [m] and define gS as a set function over [m]−S as follows: for each S′ ⊆ [m]−S,gS(S

′) = f(S ∪ S′).Lemma 4. For each given S ⊆ [m], gS is a monotone submodular function over [m]− S.

Page 13: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

Proof. Consider any two subsets S′1, S′2 ⊆ [m]− S. Observe that

gS(S′1) + gS(S

′2) = f(S ∪ S′1) + f(S ∪ S′2)

≥ f(S⋃(

S′1 ∪ S′2))

+ f(S⋃(

S′1 ∩ S′2))

= gS(S′1 ∪ S′2) + gS(S

′1 ∩ S′2)

Thus by definition, we have that gS is submodular. The monotonicity of gS follows directly from that of f .Let F be the the multilinear extension of f . Consider a given vector x ∈ [0, 1]m such that

∑i∈[m] xi ≤ 1. Let 1i ∈ {0, 1}m

be the standard unit vector such that only the entry at position i is 1 and all rest are 0.

Lemma 5. F (x) ≤∑mi=1 xif(1i) + (1−

∑mi=1 xi)f(0)

Proof. We prove by induction on m. For the base case m = 1, we can verify that the inequality becomes tight from thedefinition of F . Now assume our claim is valid for all m ≤ k − 1. Consider the case m = k.

Let x−k ∈ [0, 1]k be the restriction of x onto the first k− 1 coordinates with the last entry being 0. Similarly let xk ∈ [0, 1]k

be the restriction of x onto the last coordinate. Note that both x−k and xk have the same length x such that x = x−k + xk. Wethen have the following, which completes the proof.

F (x) = F (x−k + xk) (15)= xkF (x−k + 1k) + (1− xk)F (x−k) (16)

≤ xk(F (x−k) + f(1k)− f(0)

)+ (1− xk)F (x−k) (17)

= F (x−k) + xk

(f(1k)− f(0)

)(18)

≤k−1∑i=1

xif(1i) + (1−k−1∑i=1

xi)f(0) + xk

(f(1k)− f(0)

)(19)

=

k∑i=1

xif(1i) + (1−k∑i=1

xi)f(0) (20)

Equality (16) follows from the definition of F ; Inequality(17) can be proved as follows. Let X−k be the random indicatevector to denote if an element was sampled (independently according to x−k). For every realization X−k = a ∈ {0, 1}k, wehave that f(a+ 1k) ≤ f(a) + f(1k)− f(0), since a and 1k represents two disjoint sets over [k]. Thus by taking expectationover X−k, we get the Inequality (17). Inequality (19) follows from the inductive hypothesis.

Supplementary section for experimentsMathematical Program for the experiments in main sectionRecall that with every vertex v, there was a weighted coverage function fv : 2E → R associated. The objective was

∑v∈V fv .

Our offline program can be reformulated using the epigraph form of the mathematical program and reduces to the followingLinear Program. Let [g] denote the set of genres and we use z to index into each genre.

maximize∑v∈V

∑z∈[g] wz,vγz,v (21)

subject to∑e∈E(v) xe ≤ η ∗ rv ∀v ∈ V (22)∑e∈E(u) xe ≤ B ∀u ∈ U (23)

0 ≤ xe ≤ 1 ∀e ∈ E (24)

γz,v ≤∑

e∈δ(v):qe[z]=1

xe ∀z ∈ [g], v ∈ V (25)

γz,v ≤ 1 ∀z ∈ [g], v ∈ V (26)Since (21) is a linear program, we can use standard tools to solve this linear program exactly.

Additional experiment for MovieLens dataset with integral arrival ratesHere we describe an additional experiment on the MovieLens dataset. We consider the case of η = 1 and compare the perfor-mance of various algorithms. The experimental setting is the same as that described in the main section. The key difference isthat here we let every user come with probability 1/T at each time-step. Hence T = |V | = 200 in these experiments. Figure 4plots the performance for varying b. As seen in the plot, both MMP-ALG and CR-ALG comprehensively beats the baselinesunder this setting.

Page 14: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

Figure 4: Comparing algorithms with η = 1 on MovieLens dataset with integral arrival rates (i.e., rv = 1)

Experiments on Synthetic DataWe now describe our experimental results on synthetic data. The landscape of this problem is vast and we do not aim to beexhaustive. Instead, we focus on two important submodular functions, namely the budget-additive function and the coveragefunction (both defined in the preliminaries). We consider the same setting as the experiments in the main section. For both thesespecial cases, the offline program can be reduced to a linear program (LP) which can be solved efficiently.

Offline programs. We will now describe the offline programs for these two objectives. In our experiments, we use the optimalsolution of these respective programs for both benchmark of the offline as well as a guide to our online algorithms.

1. Budget-additive function. We want to solve the following mathematical program as our offline benchmark.

maximize min{B,∑e∈E wexe} (27)

subject to∑e∈E(v) xe ≤ rv ∀v ∈ V (28)∑e∈E(u) xe ≤ 1 ∀u ∈ U (29)

0 ≤ xe ≤ 1 ∀e ∈ E (30)

This can be converted to a LP using a standard transformation (similar to the epigraph form of convex programs) as follows.

maximize γ (31)subject to

∑e∈E(v) xe ≤ rv ∀v ∈ V (32)∑e∈E(u) xe ≤ 1 ∀u ∈ U (33)

0 ≤ xe ≤ 1 ∀e ∈ E (34)γ ≤

∑e∈E wexe (35)

γ ≤ B (36)

2. Coverage function. Similar to above we can convert it to a standard LP form and here we directly describe the final form.Every edge is associated with a binary feature-vector qe of dimension g. Weight of the zth dimension is represented as wz .

maximize∑z∈[g] wzγz (37)

subject to∑e∈E(v) xe ≤ rv ∀v ∈ V (38)∑e∈E(u) xe ≤ 1 ∀u ∈ U (39)

0 ≤ xe ≤ 1 ∀e ∈ E (40)

γz ≤∑

e∈E:qe[z]=1

xe ∀z ∈ [g] (41)

γz ≤ 1 ∀z ∈ [g] (42)

Dataset. We use a simulated dataset for our experimental purposes as follows. First simulate an instance of the graph and thensimulate the arrival sequence. For both objectives, we associate the online type with an arrival rate chosen uniformly at random

Page 15: Balancing Relevance and Diversity in Online Bipartite Matching via Submodularitysrin/PDF/2019/2019-AAAI-online-sub.pdf · 2018. 12. 5. · In bipartite matching problems, vertices

(a) Comparing algorithms on the budget-additive function. xand y-axes represent the b value in b-matching and competitiveratio respectively.

(b) Comparing algorithms on the coverage function.

in the range [0, 1]. Then simulate the arrival process based on these rates. The edges are chosen as follows. For every onlinetype, we set a random set of at most 10 vertices in the offline side as its neighbor and edges between this online type andthose offline vertices. We consider the b-matching scenario and vary b in the set {1, 2, 3, 5, 10, 15}. The cardinalities of offlinevertices and online vertices vary based on the experiment which we will describe below.

1. Coverage function. For this experiment, the number of offline vertices to be 40 and the number of online types to be 200.The time-horizon is set to 1000 (hence a lot of time-steps has no arrival of a online vertex). Each offline and online type isassociated with a random subset, of size at most 10, of {1, 2, . . . , 1000} as the set of features. For every edge e = (u, v), thefeature vector qe associated with it is given by the union of the features of its end-points u and v. Every feature in [1000] isassociated with a weight chosen uniformly at random in the interval [0, 1].

2. Budget-additive function. In this experiment, the number of offline vertices to be 100 and the number of online types to be200. The time-horizon is 200. For every edge e we choose a random number uniformly in [0, 1] and set the weight we as thisrandom number. We set the budget B = 50.

Results. Figures 5a and 5b plot the results of the experiments on the budget-additive function and coverage function, re-spectively. In budget-additive case, our algorithms MMP-ALG and CR-ALG significantly outperform the heuristic baselines,namely, greedy and NEG-CR. Additionally the competitive ratios of our algorithm are much higher than the theoretical bench-mark (0.63 and 0.20 respectively). Note that as b increases for our experimental parameters the competitive ratios only slightlyincrease. In the coverage function scenario, we see that greedy out-performs both our algorithms when b is small. But as soon asb is slightly increased, our algorithm matches the performance of Greedy. This suggests that for very special coverage functionsone might be able to construct algorithms that do better. However, even on such cases our general algorithm is very competitive.In this scenario, increasing the value of b has a larger effect than before, on the competitive ratio, yet not drastically larger. Theseexperiments are a further evidence to support that analysis on b = 1 gives a good proxy for understanding the performance onlarger b.