Top Banner
Online Stochastic Matching with Unequal Probabilities Aranyak Mehta Bo Waggoner Morteza Zadimoghaddam SODA 2015 1 Harvard
43

Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Jul 29, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching with Unequal Probabilities

Aranyak MehtaBo WaggonerMorteza Zadimoghaddam

SODA 20151

Harvard

Page 2: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Outline

● Problem and motivation

● Prior work, our main result

● Key idea: Adaptivity● Ideas behind algorithm/analysis

2

Page 3: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Motivation: Search ads

3

advertisers

Time

search queries

Page 4: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Motivation: Search ads

4

advertisers

Time

search queries

Simplified problem:- display one ad per query- have estimate of click probabilities- advertisers pay $1 if click, $0 if no click- advertisers have budget for one click per day

How to assign ads?

Page 5: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching

5

fixed,offline vertices

Time

onlinearrivals

[Mehta and Panigrahi, 2012]

Page 6: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching

6

fixed,offline vertices

Time

onlinearrivalsp11

p31

p41

[Mehta and Panigrahi, 2012]

Page 7: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching

7

fixed,offline vertices

Time

onlinearrivalsp11

p31

p41

[Mehta and Panigrahi, 2012]

Pr[ searcher clicks if we show this ad ]

Page 8: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching

8

Time

Alg

p31

Assign to vertex 3!

fixed,offline vertices

onlinearrivals

[Mehta and Panigrahi, 2012]

Page 9: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching

9

Time

Alg

p31

fixed,offline vertices

onlinearrivals

[Mehta and Panigrahi, 2012]

With prob p31: match succeeds

With prob 1 - p31: match fails

Page 10: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching

10

Time

Alg

fixed,offline vertices

onlinearrivals

[Mehta and Panigrahi, 2012]

match succeeded

cannot be matched again

Page 11: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Online Stochastic Matching

11

Time

Alg

fixed,offline vertices

onlinearrivals

[Mehta and Panigrahi, 2012]

match failed

may be matched again later

disappears (cannot re-try)

Page 12: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Alg’s performance =# successes

Measuring algorithm performance

12

Alg

fixed,offline vertices

onlinearrivals

Page 13: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Alg’s performance =E[ # successes ]

1313

Alg

Measuring algorithm performance

fixed,offline vertices

onlinearrivals

Page 14: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

1414

Alg’s performance =E[ # successes ]

Opt’s performance =size of max weighted assignment, budget 1

Opt Alg

Measuring algorithm performance

fixed,offline vertices

onlinearrivals

Page 15: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

1515

Alg’s performance =E[ size of matching ]

Opt’s performance =size of max weighted assignment, budget 1

Opt Alg

Measuring algorithm performance

fixed,offline vertices

onlinearrivalsCompetitive ratio =

min Alg Opt

over all input instances.

(Note: Opt is a bit funky … not achievable even with foreknowledge of instance.)

Page 16: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Prior Work

● Online Matching with Stochastic RewardsMehta, Panigrahi, FOCS 2012.○ Greedy = 0.5.

Opt

○ For case where all p are equal and vanishing:Alg ≥ 0.567.

Opt

Open: anything better than Greedy for unequal p

16

Page 17: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

This work

17

Opt

Alg

≥ 0.534

For unequal, vanishing edge probabilities:

Page 18: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

This work

18

Opt

Alg

≥ 0.534

For unequal, vanishing edge probabilities:

So what?

algorithmic ideas to beat Greedy

Page 19: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Outline

● Problem and motivation

● Prior work, our main result

● Key idea: Adaptivity● Ideas behind algorithm/analysis

19

Page 20: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Adaptive: sees whether or not assignment succeeds

20

fixed,offline vertices

onlinearrivals

Page 21: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Our Approach

1. Start with an optimal non-adaptive alg that is straightforward to analyze

2. Add a small amount of adaptivity(second choices)

3. Analysis remains tractable by limiting amount of adaptivity

21

Page 22: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

An optimal non-adaptive algorithm

22

● MP-2012: nonadaptive algs have upper bound of 0.5

● How to achieve 0.5? (Previously unknown.) Seems nonobvious.

Page 23: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Maximize marginal expected gain

23

onlinearrivals

offlinevertices

0.3

0.4

0.2

Assign first arrival to vertex with largest pi1

Page 24: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Maximize marginal expected gain

24

onlinearrivals

offlinevertices Assign next arrival to

max Pr[ i available ] pi2

0.1

0.2

0.3

Page 25: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Maximize marginal expected gain

25

onlinearrivals

offlinevertices Assign next arrival to

max Pr[ i available ] pi2

0.1

0.2

0.3

= (1 - 0.4) * 0.3= 0.18

= (1) * 0.2= 0.2

Page 26: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

NonAdaptive

26

Theorem: NonAdaptive has a competitive ratio of 0.5 for the general online stochastic matching problem.

Does not require vanishing probabilities.

Page 27: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Why do we like NonAdaptive?

● On a given instance, an arrival has the same “first choice” every time(regardless of previous realizations)

● Algorithm tracks/uses competitive ratio (probabilities of success)

27

Page 28: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Add Adaptivity (but not too much)

Proposed SemiAdaptive: Assign next arrival to max Pr[ i available ] pij unless already taken, in which case assign to second-highest.

28

Page 29: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Why do we like SemiAdaptive?

● On a given instance, an arrival has the same first and second choices every time(regardless of previous realizations)

● Algorithm tracks/uses competitive ratio (probabilities of success)

These allow us to analyzeSemiAdaptive -- almost...

29

Page 30: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

(Analysis?) Roadblock

● Want: when first-choice is not available, get measurable benefit by assigning to second choice→ giving improvement over NonAdaptive’s 0.5

30

Page 31: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

(Analysis?) Roadblock

● Want: when first-choice is not available, get measurable benefit by assigning to second choice→ giving improvement over NonAdaptive’s 0.5

● Problem: correlation between availability of first and second choice. Perhaps when first choice is not available, most likely second choice is not available either.→ cannot guarantee improvement over NonAdaptive

31

Page 32: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

(Analysis?) Roadblock

● Want: when first-choice is not available, get measurable benefit by assigning to second choice→ giving improvement over NonAdaptive’s 0.5

● Problem: correlation between availability of first and second choice. Perhaps when first choice is not available, most likely second choice is not available either.→ cannot guarantee improvement over NonAdaptive

● Fix: introduce independence / even less adaptivity.(no time to say more! sorry!)

32

Page 33: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

RECAP

Online stochastic matching problem:- edges succeed probabilistically- maximize expected number of successes- input instance chosen adversarially

New here:- edge probabilities

may be unequal

33

p11

p31

Page 34: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

RECAP

Results:- optimal 0.5-competitive NonAdaptive- 0.534-competitive SemiAdaptive

(with tweak) for vanishing probabilities

Key idea:- control adaptivity to

control analysis

34

p11

p31

Page 35: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Future Work

Everything about Online Stochastic Matching:● Vanishing probabilities:

○ Equal: 0.567 … ? … 0.62○ Unequal: 0.534 … ? … 0.62

● Large probabilities:○ Equal: 0.53 … ? … 0.62○ Unequal: 0.5 … ? … 0.62

35

Page 36: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Future Work

Everything about Online Stochastic Matching:● Vanishing probabilities:

○ Equal: 0.567 … ? … 0.62○ Unequal: 0.534 … ? … 0.62

● Large probabilities:○ Equal: 0.53 … ? … 0.62○ Unequal: 0.5 … ? … 0.62

Thanks!36

Page 37: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Additional slides

37

Page 38: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Final Algorithm “SemiAdaptive”

38

Assign next arrival to max Pr[ i available ] pijunless already taken, in which case assign to second-highest.

* “it would have already been taken by a previous first-choice”

(key point: even less adaptive, more independence)

*

Page 39: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Ideas behind analysis

39

p12

p42

Pr[ available ]

q2

p22

q1

q3

q4

q5

Either first choice is the same as Opt’s...

Page 40: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Ideas behind analysis

40

...or both first and second choice would give at least as much “gain” as Opt’s.

Either first choice is the same as Opt’s...

p42

Pr[ available ]

q2

p22

q1

q3

q4

q5

p12

Page 41: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Ideas behind analysis

41

...or both first and second choice would give at least as much “gain” as Opt’s.

Either first choice is the same as Opt’s...

p42

Pr[ available ]

q2

p22

q1

q3

q4

q5

p12

Very good because gains “compound”.

Good because we get “second-choice gains”.

Page 42: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

Note: Can only get 1 - 1/e ≈ 0.632even with knowledge of instance

42

onlinearrivals

42

Opt Alg

1/n

1/n

1/n

1/n

1/n

1/n

Weighted matching: 1

E[ # of matches ]= 1 - Pr[ all fail ]= 1 - (1 - 1/n)n

→ 1 - 1/e

Page 43: Online Stochastic Matching with Unequal Probabilities€¦ · SODA 2015 1 Harvard. Outline Problem and motivation Prior work, our main result Key idea: Adaptivity Ideas behind algorithm/analysis

4343

Alg’s performance =E[ size of matching ]

Opt’s performance =size of max weighted assignment, budget 1

Opt Alg

Example of defining Opt

fixed,offline vertices

onlinearrivals

1/2

2/3

1/4

1/4

Opt gets 1

Opt gets 1/2