online ad serving: theory and practicehajiagha/agt10/20-10-2010-vahabonlinead.pdf2010/10/20  ·...

161
Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration with Googlers) Google Research, New York October 20, 2010

Upload: others

Post on 14-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Ad Serving: Theory and Practice

Vahab Mirrokni(Three papers in collaboration with Googlers)

Google Research, New York

October 20, 2010

Page 2: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Contract-based Online Advertising

I Pageviews (impressions) instead of queries.

I Display/Banner Ads, Video Ads, Mobile Ads.

I Cost-Per-Impression (CPM).

I Not Auction-based: offline negotiations + Online allocations.

Display/Banner Ads:

I Q1, 2010: One Trillion Display Ads in US. $2.7 billion.

I Top Publishers: Facebook, Yahoo and Microsoft sites.

I Top Advertiser: AT&T, Verizon, Scottrade.

I Ad Serving Systems e.g. Facebook, Google Doubleclick,AdMob.

Page 3: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Contract-based Online Advertising

I Pageviews (impressions) instead of queries.

I Display/Banner Ads, Video Ads, Mobile Ads.

I Cost-Per-Impression (CPM).

I Not Auction-based: offline negotiations + Online allocations.

Display/Banner Ads:

I Q1, 2010: One Trillion Display Ads in US. $2.7 billion.

I Top Publishers: Facebook, Yahoo and Microsoft sites.

I Top Advertiser: AT&T, Verizon, Scottrade.

I Ad Serving Systems e.g. Facebook, Google Doubleclick,AdMob.

Page 4: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Contract-based Online Advertising

I Pageviews (impressions) instead of queries.

I Display/Banner Ads, Video Ads, Mobile Ads.

I Cost-Per-Impression (CPM).

I Not Auction-based: offline negotiations + Online allocations.

Display/Banner Ads:

I Q1, 2010: One Trillion Display Ads in US. $2.7 billion.

I Top Publishers: Facebook, Yahoo and Microsoft sites.

I Top Advertiser: AT&T, Verizon, Scottrade.

I Ad Serving Systems e.g. Facebook, Google Doubleclick,AdMob.

Page 5: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Contract-based Online Advertising

I Pageviews (impressions) instead of queries.

I Display/Banner Ads, Video Ads, Mobile Ads.

I Cost-Per-Impression (CPM).

I Not Auction-based: offline negotiations + Online allocations.

Display/Banner Ads:

I Q1, 2010: One Trillion Display Ads in US. $2.7 billion.

I Top Publishers: Facebook, Yahoo and Microsoft sites.

I Top Advertiser: AT&T, Verizon, Scottrade.

I Ad Serving Systems e.g. Facebook, Google Doubleclick,AdMob.

Page 6: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery: Overview

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

1. Planning: Contracts/Commitments with Advertisers.2. Ad Serving:

I Targeting: Predicting value of impressions.I Ad Allocation: Assigning Impressions to Ads Online.

I Objective Functions:I Efficiency: Users and Advertisers. Revenue of the Publisher.I Smoothness, Fairness, Delivery Penalty.

Page 7: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery: Overview

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Strategic, Stochastic

Online, Stochastic

Offline, Online

1. Planning: Contracts/Commitments with Advertisers.2. Ad Serving:

I Targeting: Predicting value of impressions.I Ad Allocation: Assigning Impressions to Ads Online.

I Objective Functions:I Efficiency: Users and Advertisers. Revenue of the Publisher.I Smoothness, Fairness, Delivery Penalty.

Page 8: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery: Overview

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Strategic, Stochastic

Online, Stochastic

Offline, Online Forecasting

Demand for ads

Supply of impressions

1. Planning: Contracts/Commitments with Advertisers.2. Ad Serving:

I Targeting: Predicting value of impressions.I Ad Allocation: Assigning Impressions to Ads Online.

I Objective Functions:I Efficiency: Users and Advertisers. Revenue of the Publisher.I Smoothness, Fairness, Delivery Penalty.

Page 9: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery: Overview

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Delivery Constraints, Budget

Strategic, Stochastic

Online, Stochastic

Offline, Online Forecasting

Demand for ads

Supply of impressions

1. Planning: Contracts/Commitments with Advertisers.2. Ad Serving:

I Targeting: Predicting value of impressions.I Ad Allocation: Assigning Impressions to Ads Online.

I Objective Functions:I Efficiency: Users and Advertisers. Revenue of the Publisher.I Smoothness, Fairness, Delivery Penalty.

Page 10: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery: Overview

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Delivery Constraints, Budget

CTR

Strategic, Stochastic

Online, Stochastic

Offline, Online Forecasting

Demand for ads

Supply of impressions

1. Planning: Contracts/Commitments with Advertisers.2. Ad Serving:

I Targeting: Predicting value of impressions.I Ad Allocation: Assigning Impressions to Ads Online.

I Objective Functions:I Efficiency: Users and Advertisers. Revenue of the Publisher.I Smoothness, Fairness, Delivery Penalty.

Page 11: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery: Overview

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Delivery Constraints, Budget

CTR

Strategic, Stochastic

Online, Stochastic

Offline, Online Forecasting

Demand for ads

Supply of impressions

I Objective Functions:I Efficiency: Users and Advertisers. Revenue of the Publisher.I Smoothness, Fairness, Delivery Penalty.

Page 12: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Targeting

Estimating Value of an impression.

I Behavioral TargetingI Interest-based Advertising.I Yan, Liu, Wang, Zhang, Jiang, Chen, 2009, How much can

Behavioral Targeting Help Online Advertising?

I Contextual TargetingI Information Retrieval (IR).I Broder, Fontoura, Josifovski, Riedel, A semantic approach to

contextual advertising

I Creative OptimizationI Experimentation

Page 13: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Targeting

Estimating Value of an impression.I Behavioral Targeting

I Interest-based Advertising.I Yan, Liu, Wang, Zhang, Jiang, Chen, 2009, How much can

Behavioral Targeting Help Online Advertising?

I Contextual TargetingI Information Retrieval (IR).I Broder, Fontoura, Josifovski, Riedel, A semantic approach to

contextual advertising

I Creative OptimizationI Experimentation

Page 14: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Targeting

Estimating Value of an impression.I Behavioral Targeting

I Interest-based Advertising.I Yan, Liu, Wang, Zhang, Jiang, Chen, 2009, How much can

Behavioral Targeting Help Online Advertising?

I Contextual TargetingI Information Retrieval (IR).I Broder, Fontoura, Josifovski, Riedel, A semantic approach to

contextual advertising

I Creative OptimizationI Experimentation

Page 15: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Targeting

Estimating Value of an impression.I Behavioral Targeting

I Interest-based Advertising.I Yan, Liu, Wang, Zhang, Jiang, Chen, 2009, How much can

Behavioral Targeting Help Online Advertising?

I Contextual TargetingI Information Retrieval (IR).I Broder, Fontoura, Josifovski, Riedel, A semantic approach to

contextual advertising

I Creative OptimizationI Experimentation

Page 16: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Predicting value of Impressions for Display Ads

I Estimating Click-Through-Rate (CTR).I Budgeted Multi-armed Bandit

I Probability of Conversion.

I Long-term vs. Short-term value of display ads?I Archak, Mirrokni, Muthukrishnan, 2010 Graph-based Models.

I Computing Adfactors based on AdGraphsI Markov Models for Advertiser-specific User Behavior

Page 17: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Predicting value of Impressions for Display Ads

I Estimating Click-Through-Rate (CTR).I Budgeted Multi-armed Bandit

I Probability of Conversion.I Long-term vs. Short-term value of display ads?

I Archak, Mirrokni, Muthukrishnan, 2010 Graph-based Models.I Computing Adfactors based on AdGraphsI Markov Models for Advertiser-specific User Behavior

Page 18: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Contract-based Ad Delivery: Outline

I Basic Information

I Ad Planning: ReservationI Ad Serving.

I Targeting.I Online Ad Allocation

Page 19: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Outline: Online Allocation

I Online Stochastic Assignment ProblemsI Online (Stochastic) MatchingI Online Generalized Assignment (with free disposal)I Online Stochastic PackingI Experimental Results

I Online Learning and Allocation

Page 20: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Ad Allocation

I When page arrives, assign an eligible ad.I value of assigning page i to ad a: via

I Display Ads (DA) problem:I Maximize value of ads served: max

∑i,a viaxia

I Capacity of ad a:∑

i∈A(a) xia ≤ Ca

Page 21: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Ad Allocation

I When page arrives, assign an eligible ad.I value of assigning page i to ad a: via

I Display Ads (DA) problem:I Maximize value of ads served: max

∑i,a viaxia

I Capacity of ad a:∑

i∈A(a) xia ≤ Ca

Page 22: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Ad Allocation

I When page arrives, assign an eligible ad.I revenue from assigning page i to ad a: bia

I “AdWords” (AW) problem:I Maximize revenue of ads served: max

∑i,a biaxia

I Budget of ad a:∑

i∈A(a) biaxia ≤ Ba

Page 23: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

General Form of LP

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

siaxia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst-Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable[MSVV,BJN]:1− 1

e -aprx

Page 24: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

General Form of LP

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

siaxia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst-Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable[MSVV,BJN]:1− 1

e -aprx

Page 25: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable?

[MSVV,BJN]:1− 1

e -aprx

Stochastic(i.i.d.)

[FMMM09]:0.67-aprxi.i.d with knowndistribution

?

[DH09]:1−ε-aprx,ifopt max via

Stochastic i.i.d model:

I i.i.d model with known distribution

I random order model (i.i.d model with unknown distribution)

Page 26: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable?

[MSVV,BJN]:1− 1

e -aprx

Stochastic(i.i.d.)

[FMMM09]:0.67-aprxi.i.d with knowndistribution

?

[DH09]:1−ε-aprx,ifopt max via

Stochastic i.i.d model:

I i.i.d model with known distribution

I random order model (i.i.d model with unknown distribution)

Page 27: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable?

[MSVV,BJN]:1− 1

e -aprx

Stochastic(i.i.d.)

[FMMM09]:0.67-aprxi.i.d with knowndistribution

?

[DH09]:1−ε-aprx,ifopt max via

Stochastic i.i.d model:

I i.i.d model with known distribution

I random order model (i.i.d model with unknown distribution)

Page 28: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Stochastic Matching: Motivation

I Pageview supply from the past should tell us something aboutthe future [Parkes, Sandholm, SSA 2005][Abrams,Mendelevitch, Tomlin, EC 07] [Boutilier, Parkes, Sandholm,Walsh AAAI 08].

I Primal Algorithm:I Construct an expected instance,I Compute an optimal solution to this expected instance,I Use this solution to guide the online allocation.

I Can we extend the theory of online algorithms to thisarchitecture?

Page 29: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Stochastic Matching: Motivation

I Pageview supply from the past should tell us something aboutthe future [Parkes, Sandholm, SSA 2005][Abrams,Mendelevitch, Tomlin, EC 07] [Boutilier, Parkes, Sandholm,Walsh AAAI 08].

I Primal Algorithm:I Construct an expected instance,I Compute an optimal solution to this expected instance,I Use this solution to guide the online allocation.

I Can we extend the theory of online algorithms to thisarchitecture?

Page 30: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Stochastic Matching: Motivation

I Pageview supply from the past should tell us something aboutthe future [Parkes, Sandholm, SSA 2005][Abrams,Mendelevitch, Tomlin, EC 07] [Boutilier, Parkes, Sandholm,Walsh AAAI 08].

I Primal Algorithm:I Construct an expected instance,I Compute an optimal solution to this expected instance,I Use this solution to guide the online allocation.

I Can we extend the theory of online algorithms to thisarchitecture?

Page 31: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Stochastic Matching: iid (known dist.)

Given (offline):- Bipartite graph G = (A, I ,E ),- Distribution D over I .Online:- n indep. draws from D.- Must assign nodes upon arrival.

Page 32: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Primal Algorithm: “Two-suggested-matchings”

“ALG is α-approximation?” if w.h.p.,ALG(H)OPT(H) ≥ α

Simple Primal Algorithm:

I Find one matching in expected graph G offline, and try toapply it online.

I Tight 1− 1e -approximation.

Better Algorithm: Two-Suggested-Matchings

I Offline: Find two disjoint matchings, blue(B) and red(R), onthe expected graph G .

I Online: try the blue matching first, then if that doesn’t work,try the red one.

I Thm: Tight 1−2/e24/3−2/3e ≥ 0.67

(Feldman, M., M., Muthukrishnan, 2009).

Page 33: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Primal Algorithm: “Two-suggested-matchings”

“ALG is α-approximation?” if w.h.p.,ALG(H)OPT(H) ≥ α

Simple Primal Algorithm:

I Find one matching in expected graph G offline, and try toapply it online.

I Tight 1− 1e -approximation.

Better Algorithm: Two-Suggested-Matchings

I Offline: Find two disjoint matchings, blue(B) and red(R), onthe expected graph G .

I Online: try the blue matching first, then if that doesn’t work,try the red one.

I Thm: Tight 1−2/e24/3−2/3e ≥ 0.67

(Feldman, M., M., Muthukrishnan, 2009).

Page 34: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Primal Algorithm: “Two-suggested-matchings”

“ALG is α-approximation?” if w.h.p.,ALG(H)OPT(H) ≥ α

Simple Primal Algorithm:

I Find one matching in expected graph G offline, and try toapply it online.

I Tight 1− 1e -approximation.

Better Algorithm: Two-Suggested-Matchings

I Offline: Find two disjoint matchings, blue(B) and red(R), onthe expected graph G .

I Online: try the blue matching first, then if that doesn’t work,try the red one.

I Thm: Tight 1−2/e24/3−2/3e ≥ 0.67

(Feldman, M., M., Muthukrishnan, 2009).

Page 35: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Background: Balls in bins

I Suppose n balls thrown into n bins, i.i.d. uniform.

I # non-empty bins concentrates:

I B = particular subset of bins.

I s = # bins in B with ≥ 1 ball.

I Then w.h.p., s ≈ |B|(1− 1e ).

Page 36: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Background: Balls in bins

I Suppose n balls thrown into n bins, i.i.d. uniform.

I # non-empty bins concentrates:

I B = particular subset of bins.

I s = # bins in B with ≥ 1 ball.

I Then w.h.p., s ≈ |B|(1− 1e ).

Page 37: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Background: Balls in bins

I Suppose n balls thrown into n bins, i.i.d. uniform.

I # non-empty bins concentrates:

I B = particular subset of bins.

I s = # bins in B with ≥ 1 ball.

I Then w.h.p., s ≈ |B|(1− 1e ).

Page 38: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Background: Balls in bins

I Suppose n balls thrown into n bins, i.i.d. uniform.

I # non-empty bins concentrates:

I B = particular subset of bins.

I s = # bins in B with ≥ 1 ball.

I Then w.h.p., s ≈ |B|(1− 1e ).

Page 39: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Background: Balls in bins

I Suppose n balls thrown into n bins, i.i.d. uniform.

I # non-empty bins concentrates:

I B = particular subset of bins.

I s = # bins in B with ≥ 1 ball.

I Then w.h.p., s ≈ |B|(1− 1e ).

Page 40: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Analysis: Two-suggested-matching Algorithm

I Proof Ideas: Balls-into-Bins concentration inequalities,structural properties of min-cuts, etc.

I Bounding ALG: Classify a ∈ A based on its neighbors in theblue and red matchings: ABR ,ABB ,AB ,AR

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

I Bounding opt: Find min-cut in augmented expected graph G ,and use it min-cut in G as a “guide” for cut in each scenario.

Page 41: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Analysis: Two-suggested-matching Algorithm

I Proof Ideas: Balls-into-Bins concentration inequalities,structural properties of min-cuts, etc.

I Bounding ALG: Classify a ∈ A based on its neighbors in theblue and red matchings: ABR ,ABB ,AB ,AR

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

I Bounding opt: Find min-cut in augmented expected graph G ,and use it min-cut in G as a “guide” for cut in each scenario.

Page 42: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Analysis: Two-suggested-matching Algorithm

I Proof Ideas: Balls-into-Bins concentration inequalities,structural properties of min-cuts, etc.

I Bounding ALG: Classify a ∈ A based on its neighbors in theblue and red matchings: ABR ,ABB ,AB ,AR

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

I Bounding opt: Find min-cut in augmented expected graph G ,and use it min-cut in G as a “guide” for cut in each scenario.

Page 43: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

First Attempt: “Suggested matching”

1. Find a maximum matching in G .

2. Use that matching as nodes arrive online.

I Does no better than 1− 1/e.

I Proof:

I Suppose G = complete graph.I Then OPT(H) = n.I But w.h.p. only 1− 1/e fraction of I will ever arrive.

=⇒ ALG ≈ (1− 1/e)n.

I In fact, this algorithm does achieve 1− 1/e (in paper).

Page 44: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

First Attempt: “Suggested matching”

1. Find a maximum matching in G .

2. Use that matching as nodes arrive online.

I Does no better than 1− 1/e.

I Proof:

I Suppose G = complete graph.I Then OPT(H) = n.I But w.h.p. only 1− 1/e fraction of I will ever arrive.

=⇒ ALG ≈ (1− 1/e)n.

I In fact, this algorithm does achieve 1− 1/e (in paper).

Page 45: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

First Attempt: “Suggested matching”

1. Find a maximum matching in G .

2. Use that matching as nodes arrive online.

I Does no better than 1− 1/e.

I Proof:I Suppose G = complete graph.

I Then OPT(H) = n.I But w.h.p. only 1− 1/e fraction of I will ever arrive.

=⇒ ALG ≈ (1− 1/e)n.

I In fact, this algorithm does achieve 1− 1/e (in paper).

Page 46: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

First Attempt: “Suggested matching”

1. Find a maximum matching in G .

2. Use that matching as nodes arrive online.

I Does no better than 1− 1/e.

I Proof:I Suppose G = complete graph.I Then OPT(H) = n.

I But w.h.p. only 1− 1/e fraction of I will ever arrive.=⇒ ALG ≈ (1− 1/e)n.

I In fact, this algorithm does achieve 1− 1/e (in paper).

Page 47: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

First Attempt: “Suggested matching”

1. Find a maximum matching in G .

2. Use that matching as nodes arrive online.

I Does no better than 1− 1/e.

I Proof:I Suppose G = complete graph.I Then OPT(H) = n.I But w.h.p. only 1− 1/e fraction of I will ever arrive.

=⇒ ALG ≈ (1− 1/e)n.

I In fact, this algorithm does achieve 1− 1/e (in paper).

Page 48: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

First Attempt: “Suggested matching”

1. Find a maximum matching in G .

2. Use that matching as nodes arrive online.

I Does no better than 1− 1/e.

I Proof:I Suppose G = complete graph.I Then OPT(H) = n.I But w.h.p. only 1− 1/e fraction of I will ever arrive.

=⇒ ALG ≈ (1− 1/e)n.

I In fact, this algorithm does achieve 1− 1/e (in paper).

Page 49: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

New ALG: “Two suggested matchings”

1. Offline: Find two disjoint matchings

2. Online: try the first one, then if that doesn’t work, try thesecond one.

Page 50: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

New ALG: “Two suggested matchings”

Warmup: complete graph

I Two disjoint perfect matchings: blue (1-ary), red (2-ary).

I Union of matchings = cycles with alt. blue and red edges

Page 51: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

New ALG: “Two suggested matchings”

Warmup: complete graph

I Two disjoint perfect matchings: blue (1-ary), red (2-ary).

I Union of matchings = cycles with alt. blue and red edges

Page 52: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

New ALG: “Two suggested matchings”

For particular node a ∈ A:

Pr[a is chosen ] ≥ Pr[i arrives once, or i ′ arrives twice]

= 1− Pr[i never arrives & i ′ arrives ≤ once]

= 1−((1− 2/n)n + n(1/n)(1− 2/n)n−1

)≈ 1− 2/e2

Thus, E[# nodes in A chosen] ≈ (1− 2/e2)n ≈ .729n(This also concentrates...)

Page 53: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Offline)

I How to find a matching with flow.

I Solve an “augmented flow” problem instead.

I Examine edges in flow.

I Color the edges as shown

Page 54: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Offline)

I How to find a matching with flow.

I Solve an “augmented flow” problem instead.I Examine edges in flow.I Color the edges as shown

Page 55: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Offline)

I How to find a matching with flow.

I Solve an “augmented flow” problem instead.I Examine edges in flow.I Color the edges as shown

Page 56: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Offline)

I How to find a matching with flow.

I Solve an “augmented flow” problem instead.

I Examine edges in flow.I Color the edges as shown

Page 57: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Offline)

I How to find a matching with flow.

I Solve an “augmented flow” problem instead.

I Examine edges in flow.I Color the edges as shown

Page 58: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Offline)

I How to find a matching with flow.

I Solve an “augmented flow” problem instead.

I Examine edges in flow.

I Color the edges as shown

Page 59: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Offline)

I How to find a matching with flow.

I Solve an “augmented flow” problem instead.

I Examine edges in flow.

I Color the edges as shown

Page 60: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Online)

I When node i ∈ I arrives:I Try the blue edge first, then the red edge.

I Consider a node a ∈ A:

I Pr[a is chosen ] ≥ Pr[i arrives once, or i ′ arrives twice]

Page 61: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Algorithm (Online)

I When node i ∈ I arrives:

I Try the blue edge first, then the red edge.

I Consider a node a ∈ A:I Pr[a is chosen ] ≥ Pr[i arrives once, or i ′ arrives twice]

Page 62: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Performance of the Algorithm

I Classify a ∈ A based on its neighbors in the flow.

|flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |

I Using Balls-in-bins concentration results (Azuma’s inequality):

I a ∈ AB . We get at least |AB |(1− 1/e).I a ∈ ABR . We get at least |ABR |(1− 2/e2).I a ∈ ABB . We get at least |ABB |(1− 1/e2).I a ∈ AR . We get at least |AR |(1− 2/e).

I Bound on ALG in terms of flow (using |B| ≥ |R|):

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

Page 63: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Performance of the Algorithm

I Classify a ∈ A based on its neighbors in the flow.

|flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |

I Using Balls-in-bins concentration results (Azuma’s inequality):

I a ∈ AB . We get at least |AB |(1− 1/e).I a ∈ ABR . We get at least |ABR |(1− 2/e2).I a ∈ ABB . We get at least |ABB |(1− 1/e2).I a ∈ AR . We get at least |AR |(1− 2/e).

I Bound on ALG in terms of flow (using |B| ≥ |R|):

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

Page 64: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Performance of the Algorithm

I Classify a ∈ A based on its neighbors in the flow.

|flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |

I Using Balls-in-bins concentration results (Azuma’s inequality):

I a ∈ AB . We get at least |AB |(1− 1/e).

I a ∈ ABR . We get at least |ABR |(1− 2/e2).I a ∈ ABB . We get at least |ABB |(1− 1/e2).I a ∈ AR . We get at least |AR |(1− 2/e).

I Bound on ALG in terms of flow (using |B| ≥ |R|):

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

Page 65: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Performance of the Algorithm

I Classify a ∈ A based on its neighbors in the flow.

|flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |

I Using Balls-in-bins concentration results (Azuma’s inequality):

I a ∈ AB . We get at least |AB |(1− 1/e).I a ∈ ABR . We get at least |ABR |(1− 2/e2).

I a ∈ ABB . We get at least |ABB |(1− 1/e2).I a ∈ AR . We get at least |AR |(1− 2/e).

I Bound on ALG in terms of flow (using |B| ≥ |R|):

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

Page 66: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Performance of the Algorithm

I Classify a ∈ A based on its neighbors in the flow.

|flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |

I Using Balls-in-bins concentration results (Azuma’s inequality):

I a ∈ AB . We get at least |AB |(1− 1/e).I a ∈ ABR . We get at least |ABR |(1− 2/e2).I a ∈ ABB . We get at least |ABB |(1− 1/e2).

I a ∈ AR . We get at least |AR |(1− 2/e).

I Bound on ALG in terms of flow (using |B| ≥ |R|):

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

Page 67: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Performance of the Algorithm

I Classify a ∈ A based on its neighbors in the flow.

|flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |

I Using Balls-in-bins concentration results (Azuma’s inequality):

I a ∈ AB . We get at least |AB |(1− 1/e).I a ∈ ABR . We get at least |ABR |(1− 2/e2).I a ∈ ABB . We get at least |ABB |(1− 1/e2).I a ∈ AR . We get at least |AR |(1− 2/e).

I Bound on ALG in terms of flow (using |B| ≥ |R|):

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

Page 68: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Performance of the Algorithm

I Classify a ∈ A based on its neighbors in the flow.

|flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |

I Using Balls-in-bins concentration results (Azuma’s inequality):

I a ∈ AB . We get at least |AB |(1− 1/e).I a ∈ ABR . We get at least |ABR |(1− 2/e2).I a ∈ ABB . We get at least |ABB |(1− 1/e2).I a ∈ AR . We get at least |AR |(1− 2/e).

I Bound on ALG in terms of flow (using |B| ≥ |R|):

ALG ≥(

1− 1

e2

)|ABB |+

(1− 2

e2

)|ABR |+

(1− 3

2e

)(|AB |+ |AR |)

Page 69: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Bounding OPT

I Find min-cut in augmented flow graph (from G ).I Eδ is a matching.I By max-flow min-cut,

|flow| = 2(|AT |+ |IS |) + |Eδ|.

I OPT ≤ cut(H). (Remember H = (A, I , E ).)I Use min-cut in G as “guide” for cut in H.I W.h.p., |IS | ≈ |IS |. Eδ?I For any node a ∈ S with an edge in the cut in E (H), move it

to T ⇒ # nonempty nodes in Eδ ⇒ (1− 1e )Eδ.

Page 70: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Bounding OPT

I Find min-cut in augmented flow graph (from G ).I Eδ is a matching.I By max-flow min-cut,

|flow| = 2(|AT |+ |IS |) + |Eδ|.

I OPT ≤ cut(H). (Remember H = (A, I , E ).)I Use min-cut in G as “guide” for cut in H.I W.h.p., |IS | ≈ |IS |. Eδ?I For any node a ∈ S with an edge in the cut in E (H), move it

to T ⇒ # nonempty nodes in Eδ ⇒ (1− 1e )Eδ.

Page 71: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Putting things together

I Eventually (after moving a few nodes around) you getI OPT . |IS |+ |AT |+ (1− 1/e)|Eδ|.

I A lemma relating the decomposition to the cut givesI |Eδ| ≤ 2

3 |ABR |+ 43 |ABB |+ |AB |+ 1

3 |AR |,I which, when combined with

I |flow| = 2(|AT |+ |IS |) + |Eδ|I |flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |,I ALG ≥ (1− 1

e2 )|ABB |+ (1− 2e2 )|ABR |+ (1− 3

2e )(|AB |+ |AR |),

I gives

I ALGOPT ≥ min 1−1/e2

5/3−4/3e ,1−2/e2

4/3−2/3e ,1−3/2e1−1/e

I ALGOPT ≥ .67

I The analysis is tight.

Page 72: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Putting things together

I Eventually (after moving a few nodes around) you getI OPT . |IS |+ |AT |+ (1− 1/e)|Eδ|.

I A lemma relating the decomposition to the cut givesI |Eδ| ≤ 2

3 |ABR |+ 43 |ABB |+ |AB |+ 1

3 |AR |,

I which, when combined withI |flow| = 2(|AT |+ |IS |) + |Eδ|I |flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |,I ALG ≥ (1− 1

e2 )|ABB |+ (1− 2e2 )|ABR |+ (1− 3

2e )(|AB |+ |AR |),

I gives

I ALGOPT ≥ min 1−1/e2

5/3−4/3e ,1−2/e2

4/3−2/3e ,1−3/2e1−1/e

I ALGOPT ≥ .67

I The analysis is tight.

Page 73: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Putting things together

I Eventually (after moving a few nodes around) you getI OPT . |IS |+ |AT |+ (1− 1/e)|Eδ|.

I A lemma relating the decomposition to the cut givesI |Eδ| ≤ 2

3 |ABR |+ 43 |ABB |+ |AB |+ 1

3 |AR |,I which, when combined with

I |flow| = 2(|AT |+ |IS |) + |Eδ|I |flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |,I ALG ≥ (1− 1

e2 )|ABB |+ (1− 2e2 )|ABR |+ (1− 3

2e )(|AB |+ |AR |),

I gives

I ALGOPT ≥ min 1−1/e2

5/3−4/3e ,1−2/e2

4/3−2/3e ,1−3/2e1−1/e

I ALGOPT ≥ .67

I The analysis is tight.

Page 74: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Putting things together

I Eventually (after moving a few nodes around) you getI OPT . |IS |+ |AT |+ (1− 1/e)|Eδ|.

I A lemma relating the decomposition to the cut givesI |Eδ| ≤ 2

3 |ABR |+ 43 |ABB |+ |AB |+ 1

3 |AR |,I which, when combined with

I |flow| = 2(|AT |+ |IS |) + |Eδ|I |flow| = 2|ABR |+ 2|ABB |+ |AB |+ |AR |,I ALG ≥ (1− 1

e2 )|ABB |+ (1− 2e2 )|ABR |+ (1− 3

2e )(|AB |+ |AR |),

I gives

I ALGOPT ≥ min 1−1/e2

5/3−4/3e ,1−2/e2

4/3−2/3e ,1−3/2e1−1/e

I ALGOPT ≥ .67

I The analysis is tight.

Page 75: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable?

[MSVV,BJN]:1− 1

e -aprx

Stochastic(i.i.d.)

[FMMM09]:0.67-aprxi.i.d with knowndistribution

?

[DH09]:1−ε-aprx,ifopt max via

Page 76: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable?

[MSVV,BJN]:1− 1

e -aprx

Stochastic(i.i.d.)

[FMMM09]:0.67-aprxi.i.d with knowndistribution

[FHKMS10,AWY]:1−ε-aprx,if opt max viaand n m

[DH09]:1−ε-aprx,ifopt max via

random order = i.i.d. model with unknown distribution

Page 77: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Stochastic DA: Dual Algorithm

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

xia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

min∑a

Caβa +∑i

zi

zi ≥ via − βa (∀i , a)

βa, zi ≥ 0 (∀i , a)

Algorithm:I Observe the first ε fraction sample of impressions.I Learn a dual variable for each ad βa, by solving the dual

program on the sample.I Assign each impression i to ad a that maximizes via − βa.

Feldman, Henzinger, Korula, M., Stein 2010Thm[FHKMS10,AWY]: W.h.p, this algorithm is a (1−O(ε))-aprx,as long as each item has low value (via ≤ εopt

m log n ), and large

capacity (Ca ≤ m log nε3

)

Fact: If optimum β∗a are known, this alg. finds optI Proof: Comp. slackness. Given β∗a , compute x∗ as follows:

x∗ia = 1 if a = argmax(via − β∗a).

Page 78: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Stochastic DA: Dual Algorithm

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

xia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

min∑a

Caβa +∑i

zi

zi ≥ via − βa (∀i , a)

βa, zi ≥ 0 (∀i , a)

Algorithm:I Observe the first ε fraction sample of impressions.I Learn a dual variable for each ad βa, by solving the dual

program on the sample.I Assign each impression i to ad a that maximizes via − βa.

Feldman, Henzinger, Korula, M., Stein 2010Thm[FHKMS10,AWY]: W.h.p, this algorithm is a (1−O(ε))-aprx,as long as each item has low value (via ≤ εopt

m log n ), and large

capacity (Ca ≤ m log nε3

)

Fact: If optimum β∗a are known, this alg. finds optI Proof: Comp. slackness. Given β∗a , compute x∗ as follows:

x∗ia = 1 if a = argmax(via − β∗a).

Page 79: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Stochastic DA: Dual AlgorithmFeldman, Henzinger, Korula, M., Stein 2010Thm[FHKMS10,AWY]: W.h.p, this algorithm is a (1−O(ε))-aprx,as long as each item has low value (via ≤ εopt

m log n ), and large

capacity (Ca ≤ m log nε3

)

Fact: If optimum β∗a are known, this alg. finds optI Proof: Comp. slackness. Given β∗a , compute x∗ as follows:

x∗ia = 1 if a = argmax(via − β∗a).

Page 80: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Stochastic DA: Dual AlgorithmFeldman, Henzinger, Korula, M., Stein 2010Thm[FHKMS10,AWY]: W.h.p, this algorithm is a (1−O(ε))-aprx,as long as each item has low value (via ≤ εopt

m log n ), and large

capacity (Ca ≤ m log nε3

)

Fact: If optimum β∗a are known, this alg. finds optI Proof: Comp. slackness. Given β∗a , compute x∗ as follows:

x∗ia = 1 if a = argmax(via − β∗a).

Page 81: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Stochastic DA: Dual AlgorithmFeldman, Henzinger, Korula, M., Stein 2010Thm[FHKMS10,AWY]: W.h.p, this algorithm is a (1−O(ε))-aprx,as long as each item has low value (via ≤ εopt

m log n ), and large

capacity (Ca ≤ m log nε3

)

Fact: If optimum β∗a are known, this alg. finds optI Proof: Comp. slackness. Given β∗a , compute x∗ as follows:

x∗ia = 1 if a = argmax(via − β∗a).

Lemma: In the random order model, W.h.p., the sample β′a areclose to β∗a .

I Extending DH09.

Page 82: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

General Stochastic Packing LPs

I m fixed resources with capacity Ca

I Items i arrive online with options Oi , values vio , rsrc. use sioa.I Choose o ∈ Oi , using up capacity sioa in all a.

Thm[FHKMS10,AWY]: W.h.p, the PD algorithm is a(1−O(ε))-aprx, as long as items have low value (vio ≤ εopt

log n ) and

small size (sioa ≤ ε3Calog n ).

Other Results and Extensions (random order model):

I Agrawal, Wang, Ye: Updating dual variables by periodicsolution of the dual program: Ca ≤ m log n

ε2or sioa ≤ ε2Ca

M

I Vee, Vassilvitskii , Shanmugasundaram 2010: extension toconvex objective functions: Using KKT conditions.

Page 83: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

General Stochastic Packing LPs

I m fixed resources with capacity Ca

I Items i arrive online with options Oi , values vio , rsrc. use sioa.I Choose o ∈ Oi , using up capacity sioa in all a.

Thm[FHKMS10,AWY]: W.h.p, the PD algorithm is a(1−O(ε))-aprx, as long as items have low value (vio ≤ εopt

log n ) and

small size (sioa ≤ ε3Calog n ).

Other Results and Extensions (random order model):

I Agrawal, Wang, Ye: Updating dual variables by periodicsolution of the dual program: Ca ≤ m log n

ε2or sioa ≤ ε2Ca

M

I Vee, Vassilvitskii , Shanmugasundaram 2010: extension toconvex objective functions: Using KKT conditions.

Page 84: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

General Stochastic Packing LPs

I m fixed resources with capacity Ca

I Items i arrive online with options Oi , values vio , rsrc. use sioa.I Choose o ∈ Oi , using up capacity sioa in all a.

Thm[FHKMS10,AWY]: W.h.p, the PD algorithm is a(1−O(ε))-aprx, as long as items have low value (vio ≤ εopt

log n ) and

small size (sioa ≤ ε3Calog n ).

Other Results and Extensions (random order model):

I Agrawal, Wang, Ye: Updating dual variables by periodicsolution of the dual program: Ca ≤ m log n

ε2or sioa ≤ ε2Ca

M

I Vee, Vassilvitskii , Shanmugasundaram 2010: extension toconvex objective functions: Using KKT conditions.

Page 85: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable?

[MSVV,BJN]:1− 1

e -aprx

Stochastic(i.i.d.)

[FMMM09]:0.67-aprxi.i.d with knowndistribution

[FHKMS10,AWY]:1−ε-aprx,if opt max viaand n m

[DH09]:1−ε-aprx,ifopt max via

Page 86: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable

Free Disposal[FKMMP09]:1− 1

e -aprx

[MSVV,BJN]:1− 1

e -aprx

Stochastic(i.i.d.)

[FMMM09]:0.67-aprxi.i.d with knowndistribution

[FHKMS10,AWY]:1−ε-aprx,if opt max viaand n m

[DH09]:1−ε-aprx,ifopt max via

Page 87: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

DA: Free Disposal Model

0.07Ad 1: C1 = 1

0.07Ad 1: C1 = 1

0.7

I Advertisers may not complain about extra impressions, but nobonus points for extra impressions, either.

Page 88: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

DA: Free Disposal Model

0.07Ad 1: C1 = 1

0.07Ad 1: C1 = 1

0.7

I Advertisers may not complain about extra impressions, but nobonus points for extra impressions, either.

Page 89: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

DA: Free Disposal Model

0.07Ad 1: C1 = 1

0.7

0.07Ad 1: C1 = 1

0.7

I Advertisers may not complain about extra impressions, but nobonus points for extra impressions, either.

Page 90: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

DA: Free Disposal Model

0.07Ad 1: C1 = 1

0.7

I Advertisers may not complain about extra impressions, but nobonus points for extra impressions, either.

Page 91: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

DA: Free Disposal Model

0.07Ad 1: C1 = 1

0.7

I Advertisers may not complain about extra impressions, but nobonus points for extra impressions, either.

I Value of advertiser = sum of values of top Ca items she gets.

Page 92: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Greedy Algorithm

Assign impression to an advertisermaximizing Marginal Gain = (imp. value - min. impression value).

I Competitive Ratio: 1/2. [NWF78]I Follows from submodularity of the value function.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

Evenly Split?

Page 93: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Greedy Algorithm

Assign impression to an advertisermaximizing Marginal Gain = (imp. value - min. impression value).

I Competitive Ratio: 1/2. [NWF78]I Follows from submodularity of the value function.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

Evenly Split?

Page 94: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Greedy Algorithm

Assign impression to an advertisermaximizing Marginal Gain = (imp. value - min. impression value).

I Competitive Ratio: 1/2. [NWF78]I Follows from submodularity of the value function.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n

n copiesn copies

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

Evenly Split?

Page 95: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Greedy Algorithm

Assign impression to an advertisermaximizing Marginal Gain = (imp. value - min. impression value).

I Competitive Ratio: 1/2. [NWF78]I Follows from submodularity of the value function.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

Evenly Split?

Page 96: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Greedy Algorithm

Assign impression to an advertisermaximizing Marginal Gain = (imp. value - min. impression value).

I Competitive Ratio: 1/2. [NWF78]I Follows from submodularity of the value function.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

Evenly Split?

Page 97: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

A better algorithm?

Assign impression to an advertiser amaximizing (imp. value - βa),

where βa = average value of top Ca impressions assigned to a.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

I Competitive Ratio: 12 if Ca >> 1. [FKMMP09]

I Primal-Dual Approach.

Page 98: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

A better algorithm?

Assign impression to an advertiser amaximizing (imp. value - βa),

where βa = average value of top Ca impressions assigned to a.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

I Competitive Ratio: 12 if Ca >> 1. [FKMMP09]

I Primal-Dual Approach.

Page 99: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

A better algorithm?

Assign impression to an advertiser amaximizing (imp. value - βa),

where βa = average value of top Ca impressions assigned to a.

1

1 + ε

Ad 1: C1 = n

Ad 2: C2 = n1

n copiesn copies

n copies

I Competitive Ratio: 12 if Ca >> 1. [FKMMP09]

I Primal-Dual Approach.

Page 100: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

An Optimal Algorithm

Assign impression to an advertiser a:maximizing (imp. value - βa),

I Greedy: βa = min. impression assigned to a.

I Better (pd-avg): βa = average value of top Ca impressionsassigned to a.

I Optimal (pd-exp): order value of edges assigned to a:v(1) ≥ v(2) . . . ≥ v(Ca):

βa =1

Ca(e − 1)

Ca∑j=1

v(j)(1 +1

Ca)j−1.

I Thm: pd-exp achieves optimal competitive Ratio: 1− 1e − ε if

Ca > O(1ε ). [Feldman, Korula, M., Muthukrishnan, Pal 2009]

Page 101: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

An Optimal Algorithm

Assign impression to an advertiser a:maximizing (imp. value - βa),

I Greedy: βa = min. impression assigned to a.

I Better (pd-avg): βa = average value of top Ca impressionsassigned to a.

I Optimal (pd-exp): order value of edges assigned to a:v(1) ≥ v(2) . . . ≥ v(Ca):

βa =1

Ca(e − 1)

Ca∑j=1

v(j)(1 +1

Ca)j−1.

I Thm: pd-exp achieves optimal competitive Ratio: 1− 1e − ε if

Ca > O(1ε ). [Feldman, Korula, M., Muthukrishnan, Pal 2009]

Page 102: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

An Optimal Algorithm

Assign impression to an advertiser a:maximizing (imp. value - βa),

I Greedy: βa = min. impression assigned to a.

I Better (pd-avg): βa = average value of top Ca impressionsassigned to a.

I Optimal (pd-exp): order value of edges assigned to a:v(1) ≥ v(2) . . . ≥ v(Ca):

βa =1

Ca(e − 1)

Ca∑j=1

v(j)(1 +1

Ca)j−1.

I Thm: pd-exp achieves optimal competitive Ratio: 1− 1e − ε if

Ca > O(1ε ). [Feldman, Korula, M., Muthukrishnan, Pal 2009]

Page 103: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Generalized Assignment (with free disposal)

I Multiple Knapsack: Item i may have different value (via) anddifferent size sia for different ads a.

I DA: sia = 1, AW: via = sia.

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

siaxia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

min∑a

Caβa +∑i

zi

siaβa + zi ≥ via (∀i , a)

βa, zi ≥ 0 (∀i , a)

I Offline Optimization: 1− 1e − δ-aprx[FGMS07,FV08].

I Thm[FKMMP09]: There exists a 1− 1e − ε-approximation

algorithm if Camax sia

≥ 1ε .

Page 104: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Generalized Assignment (with free disposal)

I Multiple Knapsack: Item i may have different value (via) anddifferent size sia for different ads a.

I DA: sia = 1, AW: via = sia.

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

siaxia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

min∑a

Caβa +∑i

zi

siaβa + zi ≥ via (∀i , a)

βa, zi ≥ 0 (∀i , a)

I Offline Optimization: 1− 1e − δ-aprx[FGMS07,FV08].

I Thm[FKMMP09]: There exists a 1− 1e − ε-approximation

algorithm if Camax sia

≥ 1ε .

Page 105: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Proof Idea: Primal-Dual Analysis [BJN]

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

siaxia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

min∑a

Caβa +∑i

zi

siaβa + zi ≥ via (∀i , a)

βa, zi ≥ 0 (∀i , a)

I Proof:

1. Start from feasible primal and dual (xia = 0, βa = 0, andzi = 0, i.e., Primal=Dual=0).

2. After each assignment, update x , β, z variables and keepprimal and dual solutions.

3. Show ∆(Dual) ≤ (1− 1e )∆(Primal).

Page 106: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Proof Idea: Primal-Dual Analysis [BJN]

max∑i ,a

viaxia∑a

xia ≤ 1 (∀ i)∑i

siaxia ≤ Ca (∀ a)

xia ≥ 0 (∀ i , a)

min∑a

Caβa +∑i

zi

siaβa + zi ≥ via (∀i , a)

βa, zi ≥ 0 (∀i , a)

I Proof:

1. Start from feasible primal and dual (xia = 0, βa = 0, andzi = 0, i.e., Primal=Dual=0).

2. After each assignment, update x , β, z variables and keepprimal and dual solutions.

3. Show ∆(Dual) ≤ (1− 1e )∆(Primal).

Page 107: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Ad Allocation: Problems and Models

Online Matching:via = sia = 1

Disp. Ads (DA):sia = 1

AdWords (AW):sia = via

Worst Case Greedy: 12 ,

[KVV]: 1− 1e -aprx

Inapproximable

Free Disposal[FKMMP09]:1− 1

e -aprx

[MSVV,BJN]:1− 1

e -aprx

Stochastic(randomarrivalorder)

[FMMM09]:0.67-aprx

[FHKMS10,AWY]:1−ε-aprx,if opt max viaand n m

[DH09]:1−ε-aprx,ifopt max via

Page 108: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Outline: Online Allocation

I Online Stochastic Assignment ProblemsI Online (Stochastic) MatchingI Online Generalized Assignment (with free disposal)I Online Stochastic PackingI Experimental Evaluation

I Online Learning and Allocation

Page 109: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Dual-based Algorithms in Practice

I Algorithm:I Assign each item i to ad a that maximizes via − βa.

I More practical compared to Primal Algorithms:I Just keep one number βa per advertiser.I Suitable for Distributed Ad Serving Schemes.

I Training-based AlgorithmsI Compute βa based on historical/sample data.

I Hybrid approach (see also [MNS07]):I Start with trained βa (past history), blend in online algorithm.

Page 110: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Dual-based Algorithms in Practice

I Algorithm:I Assign each item i to ad a that maximizes via − βa.

I More practical compared to Primal Algorithms:I Just keep one number βa per advertiser.I Suitable for Distributed Ad Serving Schemes.

I Training-based AlgorithmsI Compute βa based on historical/sample data.

I Hybrid approach (see also [MNS07]):I Start with trained βa (past history), blend in online algorithm.

Page 111: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Dual-based Algorithms in Practice

I Algorithm:I Assign each item i to ad a that maximizes via − βa.

I More practical compared to Primal Algorithms:I Just keep one number βa per advertiser.I Suitable for Distributed Ad Serving Schemes.

I Training-based AlgorithmsI Compute βa based on historical/sample data.

I Hybrid approach (see also [MNS07]):I Start with trained βa (past history), blend in online algorithm.

Page 112: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Dual-based Algorithms in Practice

I Algorithm:I Assign each item i to ad a that maximizes via − βa.

I More practical compared to Primal Algorithms:I Just keep one number βa per advertiser.I Suitable for Distributed Ad Serving Schemes.

I Training-based AlgorithmsI Compute βa based on historical/sample data.

I Hybrid approach (see also [MNS07]):I Start with trained βa (past history), blend in online algorithm.

Page 113: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Experiments: setup

I Real ad impression data from several large publishers

I 200k - 1.5M impressions in simulation period

I 100 - 2600 advertisers

I Edge weights = predicted click probability

I Efficiency: free disposal modelI Algorithms:

I greedy: maximum marginal valueI pd-avg, pd-exp: pure online primal-dual from [FKMMP09].I dualbase: training-based primal-dual [FHKMS10]I hybrid: convex combo of training based, pure online.I lp-weight: optimum efficiency

Page 114: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Experimental Evaluation: Summary

Algorithm Avg Efficiency%opt 100

greedy 69pd-avg 77pd-exp 82

dualbase 87hybrid 89

I pd-exp & pd-avg outperform greedy by 9% and 14% (withmore improvements in tight competition.)

I dualbase outperforms pure online algorithms by 6% to 12%.

I Hybrid has a mild improvement of 2% (up to 10%).

I pd-avg performs much better than the theoretical analysis.

Page 115: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Other Metrics: Fairness

I Qualititative definition: advertisers are “treated equally.”

I Quantitative definition that achieves this:I varied and often subjective.

I One suggestion[FHKMS10]: Compute ”fair” solution x∗,measure `1 distance to x∗.

I Fair solution:I Each a chooses best Ca impressions (highest via)I Repeat:

I Impressions shared among those who chose them.I If some a not receiving Ca imps, a chooses an additional imp.

I Sharing policies:I Equal: all interested advertisers share equallyI Proportional: share ∼ via.I Stable matching: highest via gets all. [Thm: eff ≥ opt/2]

Page 116: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Other Metrics: Fairness

I Qualititative definition: advertisers are “treated equally.”I Quantitative definition that achieves this:

I varied and often subjective.

I One suggestion[FHKMS10]: Compute ”fair” solution x∗,measure `1 distance to x∗.

I Fair solution:I Each a chooses best Ca impressions (highest via)I Repeat:

I Impressions shared among those who chose them.I If some a not receiving Ca imps, a chooses an additional imp.

I Sharing policies:I Equal: all interested advertisers share equallyI Proportional: share ∼ via.I Stable matching: highest via gets all. [Thm: eff ≥ opt/2]

Page 117: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Other Metrics: Fairness

I Qualititative definition: advertisers are “treated equally.”I Quantitative definition that achieves this:

I varied and often subjective.

I One suggestion[FHKMS10]: Compute ”fair” solution x∗,measure `1 distance to x∗.

I Fair solution:I Each a chooses best Ca impressions (highest via)I Repeat:

I Impressions shared among those who chose them.I If some a not receiving Ca imps, a chooses an additional imp.

I Sharing policies:I Equal: all interested advertisers share equallyI Proportional: share ∼ via.I Stable matching: highest via gets all. [Thm: eff ≥ opt/2]

Page 118: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Other Metrics: Fairness

I Qualititative definition: advertisers are “treated equally.”I Quantitative definition that achieves this:

I varied and often subjective.

I One suggestion[FHKMS10]: Compute ”fair” solution x∗,measure `1 distance to x∗.

I Fair solution:I Each a chooses best Ca impressions (highest via)I Repeat:

I Impressions shared among those who chose them.I If some a not receiving Ca imps, a chooses an additional imp.

I Sharing policies:I Equal: all interested advertisers share equallyI Proportional: share ∼ via.I Stable matching: highest via gets all. [Thm: eff ≥ opt/2]

Page 119: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Other Metrics: Fairness

I Qualititative definition: advertisers are “treated equally.”I Quantitative definition that achieves this:

I varied and often subjective.

I One suggestion[FHKMS10]: Compute ”fair” solution x∗,measure `1 distance to x∗.

I Fair solution:I Each a chooses best Ca impressions (highest via)I Repeat:

I Impressions shared among those who chose them.I If some a not receiving Ca imps, a chooses an additional imp.

I Sharing policies:I Equal: all interested advertisers share equallyI Proportional: share ∼ via.I Stable matching: highest via gets all. [Thm: eff ≥ opt/2]

Page 120: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Experiments: highlights

40 50 60 70 80 90 100

010

2030

4050

Efficiency

Fai

rnes

s

dualbasegreedy

hybrid

lp_weight

pd−avg

pd−exp

fair

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Advertiser

Effi

cien

cy (

rela

tive)

0.0

0.2

0.4

0.6

0.8

1.0

lp−weightfairdualbasepd−avg

Page 121: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Experiments: highlights

70 75 80 85 90 95 100

05

1015

20

Efficiency

Fai

rnes

s

dualbasegreedy hybrid

lp_weight

pd−avg

pd−exp

fair1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Advertiser

Effi

cien

cy (

rela

tive)

0.0

0.2

0.4

0.6

0.8

1.0

lp−weightfairdualbasepd−avg

Page 122: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Ad Allocation: Interesting Problems

I Online Stochastic DA:I Simultaneous online worst-case & stochastic optimization.I Bicriteria fairness, efficiency analysisI Tradeoff between delivery penalty and efficiencyI More complex stochastic modeling (drift, seasonality, etc.)I Practical utility of primal algorithms?

I Online matching:I Power of 3 choices?I Gap between lower and upper bound (0.67 < 0.98).I Apply ”power of 2 choices” in stochastic optimization.

Page 123: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Ad Allocation: Interesting Problems

I Online Stochastic DA:I Simultaneous online worst-case & stochastic optimization.I Bicriteria fairness, efficiency analysisI Tradeoff between delivery penalty and efficiencyI More complex stochastic modeling (drift, seasonality, etc.)I Practical utility of primal algorithms?

I Online matching:I Power of 3 choices?I Gap between lower and upper bound (0.67 < 0.98).I Apply ”power of 2 choices” in stochastic optimization.

Page 124: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Results: Three Recent Papers

I Online Stochastic Matching: Beating 1− 1e , FOCS 2009.

I online stochastic matching in iid model with known dist.I 0.67-approximation (idea: power of two choices)I Feldman, Mehta, M., Muthukrishnan

I Online Stochastic Packing applied to Display Ad Allocation,ESA 2010.

I Online stoch. packing in random order model: online routing.I 1− ε-approximation under assumptions (idea: learn dual

variables.)I Feldman, Henzinger, Korula, M., Stein

I Online Ad Assignment with Free Disposal, WINE 2009.I online generalized assignment problems with free disposal.I 1− 1

e -competitive algorithm (idea: primal-dual analysis.)I Feldman, Korula, M., Muthukrishnan, Pal

Page 125: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Results: Three Recent Papers

I Online Stochastic Matching: Beating 1− 1e , FOCS 2009.

I online stochastic matching in iid model with known dist.I 0.67-approximation (idea: power of two choices)I Feldman, Mehta, M., Muthukrishnan

I Online Stochastic Packing applied to Display Ad Allocation,ESA 2010.

I Online stoch. packing in random order model: online routing.I 1− ε-approximation under assumptions (idea: learn dual

variables.)I Feldman, Henzinger, Korula, M., Stein

I Online Ad Assignment with Free Disposal, WINE 2009.I online generalized assignment problems with free disposal.I 1− 1

e -competitive algorithm (idea: primal-dual analysis.)I Feldman, Korula, M., Muthukrishnan, Pal

Page 126: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Results: Three Recent Papers

I Online Stochastic Matching: Beating 1− 1e , FOCS 2009.

I online stochastic matching in iid model with known dist.I 0.67-approximation (idea: power of two choices)I Feldman, Mehta, M., Muthukrishnan

I Online Stochastic Packing applied to Display Ad Allocation,ESA 2010.

I Online stoch. packing in random order model: online routing.I 1− ε-approximation under assumptions (idea: learn dual

variables.)I Feldman, Henzinger, Korula, M., Stein

I Online Ad Assignment with Free Disposal, WINE 2009.I online generalized assignment problems with free disposal.I 1− 1

e -competitive algorithm (idea: primal-dual analysis.)I Feldman, Korula, M., Muthukrishnan, Pal

Page 127: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Outline: Online Allocation

I Online Stochastic Assignment ProblemsI Online (Stochastic) MatchingI Online Generalized Assignment (with free disposal)I Online Stochastic PackingI Experimental Results

I Online Learning and Allocation

Page 128: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Delivery Constraints, Budget

CTR

Strategic, Stochastic

Online, Stochastic

Offline, Online Forecasting

Demand for ads

Supply of impressions

Page 129: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Delivery Constraints, Budget

CTR

Strategic, Stochastic

Online, Stochastic

Offline, Online

Feedback

Forecasting

Demand for ads

Supply of impressions

Page 130: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).

I Combined online capacity planning & learning?I Budgeted Active Learning

I Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 131: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).I Combined online capacity planning & learning?

I Budgeted Active LearningI Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 132: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).I Combined online capacity planning & learning?

I Budgeted Active LearningI Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 133: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).I Combined online capacity planning & learning?

I Budgeted Active LearningI Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 134: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online CTR Learning: Mixed Explore/Exploit

I Pandey, Olston 2007, Handling Advertisement of UnknownQuality.

I Algorithm: Revised GreedyI Upon arrival of query of type i , assign it to an ad a maximizing

Pia = (cia +√

2 ln ninia

)bia

where cia is the current estimate of CTR, nia is the number oftimes i has been assigned to a, ni is the number of queries oftype i so far.

I Thm[PO07]: ALG ≥ opt2 − O(ln n) where n is the number of

arrivals.

Page 135: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online CTR Learning: Mixed Explore/Exploit

I Pandey, Olston 2007, Handling Advertisement of UnknownQuality.

I Algorithm: Revised GreedyI Upon arrival of query of type i , assign it to an ad a maximizing

Pia = (cia +√

2 ln ninia

)bia

where cia is the current estimate of CTR, nia is the number oftimes i has been assigned to a, ni is the number of queries oftype i so far.

I Thm[PO07]: ALG ≥ opt2 − O(ln n) where n is the number of

arrivals.

Page 136: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online CTR Learning: Mixed Explore/Exploit

I Pandey, Olston 2007, Handling Advertisement of UnknownQuality.

I Algorithm: Revised GreedyI Upon arrival of query of type i , assign it to an ad a maximizing

Pia = (cia +√

2 ln ninia

)bia

where cia is the current estimate of CTR, nia is the number oftimes i has been assigned to a, ni is the number of queries oftype i so far.

I Thm[PO07]: ALG ≥ opt2 − O(ln n) where n is the number of

arrivals.

Page 137: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Outline of this talk

I Ad serving in repeated auction settingsI General architecture.I Allocation for budget constrained advertisers.

I Ad delivery for contract based settingsI PlanningI Ad Serving

I Other interactionsI Learning + allocationI Learning + auctionI Auction + contracts

Page 138: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Three main theory/practice problems

Page 139: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Outline

Learning + Alloc

Hybrid ad serving

Page 140: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).

I Combined online capacity planning & learning?I Budgeted Active Learning

I Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 141: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).I Combined online capacity planning & learning?

I Budgeted Active LearningI Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 142: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).I Combined online capacity planning & learning?

I Budgeted Active LearningI Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 143: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Allocation

I Value: Estimated Click-Through-Rate (CTR).I Combined online capacity planning & learning?

I Budgeted Active LearningI Madani, Lizotte, Greiner 2004, Active Model Selection.

I Bayesian Budgeted Multi-armed Bandits:I Guha, Munagala, Multi-armed Bandits with Metric Switching

Costs.I Goel, Khanna, Null, The Ratio Index for Budgeted Learning,

with Applications.I Guha, Munagala, Pal, Multi-armed Bandit with Delayed

Feedback.

I Budgeted Unknown-CTR Multi-armed BanditI Pandey, Olston 2007, Handling Advertisement of Unknown

Quality.

Page 144: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online CTR Learning: Mixed Explore/Exploit

I Pandey, Olston 2007, Handling Advertisement of UnknownQuality.

I Algorithm: Revised GreedyI Upon arrival of query of type i , assign it to an ad a maximizing

Pia = (cia +√

2 ln ninia

)bia

where cia is the current estimate of CTR, nia is the number oftimes i has been assigned to a, ni is the number of queries oftype i so far.

I Thm[PO07]: ALG ≥ opt2 − O(ln n) where n is the number of

arrivals.

Page 145: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online CTR Learning: Mixed Explore/Exploit

I Pandey, Olston 2007, Handling Advertisement of UnknownQuality.

I Algorithm: Revised GreedyI Upon arrival of query of type i , assign it to an ad a maximizing

Pia = (cia +√

2 ln ninia

)bia

where cia is the current estimate of CTR, nia is the number oftimes i has been assigned to a, ni is the number of queries oftype i so far.

I Thm[PO07]: ALG ≥ opt2 − O(ln n) where n is the number of

arrivals.

Page 146: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online CTR Learning: Mixed Explore/Exploit

I Pandey, Olston 2007, Handling Advertisement of UnknownQuality.

I Algorithm: Revised GreedyI Upon arrival of query of type i , assign it to an ad a maximizing

Pia = (cia +√

2 ln ninia

)bia

where cia is the current estimate of CTR, nia is the number oftimes i has been assigned to a, ni is the number of queries oftype i so far.

I Thm[PO07]: ALG ≥ opt2 − O(ln n) where n is the number of

arrivals.

Page 147: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Auction Incentives

[Devanur,Kakade’09, Babaioff,Sharma,Slivkins’09]

I Multi-Armed Bandit algorithms achieve an “implicit”exploration-exploitation tradeoff to get a regret of O(

√T )

(e.g., UCB).

I Can these be run in tandem with truthful auctions? (e.g., 2ndprice for a single slot).

I A naive explore-exploit method gets O(T 2/3) regret:I Explore ads for the first phase, giving them out for free.I Fix the CTRs thus learned in the first phase.I Run 2nd price auction for the 2nd phase.

I Can you do better that this simpe decoupling?

I No!

Theorem[DK09,BSS09] For every truthful auction (under certainassumptions), there exist bids, ctrs, s.t. regret = Ω(T 2/3).

Page 148: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Auction Incentives

[Devanur,Kakade’09, Babaioff,Sharma,Slivkins’09]

I Multi-Armed Bandit algorithms achieve an “implicit”exploration-exploitation tradeoff to get a regret of O(

√T )

(e.g., UCB).

I Can these be run in tandem with truthful auctions? (e.g., 2ndprice for a single slot).

I A naive explore-exploit method gets O(T 2/3) regret:I Explore ads for the first phase, giving them out for free.I Fix the CTRs thus learned in the first phase.I Run 2nd price auction for the 2nd phase.

I Can you do better that this simpe decoupling?

I No!

Theorem[DK09,BSS09] For every truthful auction (under certainassumptions), there exist bids, ctrs, s.t. regret = Ω(T 2/3).

Page 149: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Online Learning & Auction Incentives

[Devanur,Kakade’09, Babaioff,Sharma,Slivkins’09]

I Multi-Armed Bandit algorithms achieve an “implicit”exploration-exploitation tradeoff to get a regret of O(

√T )

(e.g., UCB).

I Can these be run in tandem with truthful auctions? (e.g., 2ndprice for a single slot).

I A naive explore-exploit method gets O(T 2/3) regret:I Explore ads for the first phase, giving them out for free.I Fix the CTRs thus learned in the first phase.I Run 2nd price auction for the 2nd phase.

I Can you do better that this simpe decoupling?

I No!

Theorem[DK09,BSS09] For every truthful auction (under certainassumptions), there exist bids, ctrs, s.t. regret = Ω(T 2/3).

Page 150: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Outline

Learning + Alloc

Hybrid ad serving

Page 151: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Hybrid ad serving: Contracts + Spot Auctions

Given a page view, and two types of advertisers:

I Contract-based.

I Auction-based.

I Decide who wins and how much do they pay.I Requirements:

I For each contract-advertiser, meet its demand.I Implement the scheme using proxy-bidding for

contract-advertisers in the spot auction.

Page 152: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Hybrid ad serving: Contracts + Spot Auctions

Given a page view, and two types of advertisers:

I Contract-based.

I Auction-based.

I Decide who wins and how much do they pay.I Requirements:

I For each contract-advertiser, meet its demand.I Implement the scheme using proxy-bidding for

contract-advertisers in the spot auction.

Page 153: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Hybrid ad serving: Contracts + Spot Auctions

I Naive solution: If a contract-adv is eligible and has notfinished demand, then let it win the spot. Bid infinity for allauctions.

I Optimize for revenue: If the auction pressure (price) is lowthen let the contract-adv win. Bid a low bid for all auctions.

I Unfair to contract-adv, since low auction-price ⇒ it is a lowervalue impression.

I Ideally:I Provide contract-adv with a representative allocation, an equal

slice of impressions from each price-point.I A price-oblivious scheme, i.e., bid without seeing the auction

bids.I Revenue per auction: average auction-price of impressions

given away to contract-advertisers is at most some target t.

Page 154: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Hybrid ad serving: Contracts + Spot Auctions

I Naive solution: If a contract-adv is eligible and has notfinished demand, then let it win the spot. Bid infinity for allauctions.

I Optimize for revenue: If the auction pressure (price) is lowthen let the contract-adv win. Bid a low bid for all auctions.

I Unfair to contract-adv, since low auction-price ⇒ it is a lowervalue impression.

I Ideally:I Provide contract-adv with a representative allocation, an equal

slice of impressions from each price-point.I A price-oblivious scheme, i.e., bid without seeing the auction

bids.I Revenue per auction: average auction-price of impressions

given away to contract-advertisers is at most some target t.

Page 155: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Hybrid ad serving: Contracts + Spot Auctions

I Naive solution: If a contract-adv is eligible and has notfinished demand, then let it win the spot. Bid infinity for allauctions.

I Optimize for revenue: If the auction pressure (price) is lowthen let the contract-adv win. Bid a low bid for all auctions.

I Unfair to contract-adv, since low auction-price ⇒ it is a lowervalue impression.

I Ideally:I Provide contract-adv with a representative allocation, an equal

slice of impressions from each price-point.I A price-oblivious scheme, i.e., bid without seeing the auction

bids.I Revenue per auction: average auction-price of impressions

given away to contract-advertisers is at most some target t.

Page 156: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Hybrid ad serving: Contracts + Spot Auctions

I Naive solution: If a contract-adv is eligible and has notfinished demand, then let it win the spot. Bid infinity for allauctions.

I Optimize for revenue: If the auction pressure (price) is lowthen let the contract-adv win. Bid a low bid for all auctions.

I Unfair to contract-adv, since low auction-price ⇒ it is a lowervalue impression.

I Ideally:I Provide contract-adv with a representative allocation, an equal

slice of impressions from each price-point.I A price-oblivious scheme, i.e., bid without seeing the auction

bids.I Revenue per auction: average auction-price of impressions

given away to contract-advertisers is at most some target t.

Page 157: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Obtaining representative allocationsTwo main ideas:

1. Can implement any decreasing function a(p) for fraction ofimpressions of auction-price p.

2. Solve the system for well chosen distance functions:

Minimize dist(U, a)

s.t.:

∫pa(p)f (p)dp = d∫

ppa(p)f (p)dp ≤ td

Page 158: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Obtaining representative allocationsTwo main ideas:

1. Can implement any decreasing function a(p) for fraction ofimpressions of auction-price p.

2. Solve the system for well chosen distance functions:

Minimize dist(U, a)

s.t.:

∫pa(p)f (p)dp = d∫

ppa(p)f (p)dp ≤ td

Page 159: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Delivery Constraints, Budget

CTR

Strategic, Stochastic

Online, Stochastic

Offline, Online

Feedback

Forecasting

Demand for ads

Supply of impressions

Open Problems:I Optimal combined online allocation & learning.I Feature selection and correlation in learning CTR.

I Optimal combined stochastic planning and serving?

Page 160: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Display Ad Delivery

Planning:

Display Ad Delivery

Ad Serving: Targeting: Allocation:

Delivery Constraints, Budget

CTR

Strategic, Stochastic

Online, Stochastic

Offline, Online

Feedback

Feedback

Forecasting

Demand for ads

Supply of impressions

Open Problems:I Optimal combined online allocation & learning.I Feature selection and correlation in learning CTR.I Optimal combined stochastic planning and serving?

Page 161: Online Ad Serving: Theory and Practicehajiagha/AGT10/20-10-2010-VahabOnlineAd.pdf2010/10/20  · Online Ad Serving: Theory and Practice Vahab Mirrokni (Three papers in collaboration

Thank You