int'l conference on predictive apis: rtb optimizer presentation

25
RTB Optimizer: Behind the scenes with a Predictive API Nicolas Kruchten PAPIs.io November 18, 2014 REAL TIME MACHINE LEARNING DECISIONS AS A SERVICE

Upload: datacratic

Post on 03-Jul-2015

1.499 views

Category:

Technology


3 download

DESCRIPTION

Real-time bidding, in the context of digital marketing, refers to the purchase of advertising impressions one at a time, responding to tens of thousands of messages per second, paying a different price for each via an auction mechanism. This talk will cover in detail how Datacratic’s RTB Optimizer Prediction API predicts the outcome of buying a given impression, then computes the economic value of that outcome to produce optimal bidding behaviour.

TRANSCRIPT

Page 1: Int'l Conference on Predictive APIs: RTB Optimizer presentation

RTB Optimizer:

Behind the scenes with

a Predictive API

Nicolas Kruchten

PAPIs.io – November 18, 2014

REAL TIME MACHINE LEARNING DECISIONS AS A SERVICE

Page 2: Int'l Conference on Predictive APIs: RTB Optimizer presentation

About Datacratic

• Software company specializing in

high performance systems and

machine learning

• 30 employees, founded in 2009,

based in Montréal, Québec, Canada with an office in New York

• 3 Predictive APIs in market today

• Building a Machine Learning Database to help others

build Predictive APIs and Apps

Page 3: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Real-Time Bidding for online advertising

Real-TimeExchange

Bidder

Bidder

Bidder

Bidder

WebBrowser

GET ad

bid requests

Page 4: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Real-Time Bidding for online advertising

Real-TimeExchange

Bidder

Bidder

Bidder

Bidder

WebBrowser

ad

bids

auction

Page 5: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Real-Time Bidding for online advertising

Real-TimeExchange

Bidder

Bidder

Bidder

Bidder

WebBrowser

This happens millions of times per second

Bidders must respond within 100 milliseconds

ad

bids

auction

Page 6: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Real-Time Bidding for online advertising

Real-TimeExchange

Bidder

Bidder

Bidder

Bidder

WebBrowser

RTB Optimizer enables bidders to achieve campaign goals

ad

bids

auction

Page 7: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Campaign goals

• Advertising campaigns are typically outcome-oriented

– Clicks

– Video views

– Conversions: app installs, purchases, sign-ups

• e.g. Ad network has sold someone 1,000 outcomes for $1,000

• e.g. Advertiser has $1,000 to get as many outcomes as

possible

• Essentially maximize profit or minimize cost-per-outcome

Page 8: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Datacratic’s RTB Optimizer

• Client bidder relays bid-requests to API, API tells it how to bid

• Handles 100,000 queries per second, for 100s of campaign

• API says which campaign should bid and how much

• API also needs outcomes in real-time and campaign goals

Page 9: Int'l Conference on Predictive APIs: RTB Optimizer presentation

RTB Optimizer

Bids APIOutcomes

API

Page 10: Int'l Conference on Predictive APIs: RTB Optimizer presentation

A Predictive API that learns

• Datacratic has no proprietary data set

• API can learn from scratch from the bid-request stream

what works for each campaign:

– Contextual features: website, time of day, banner size and placement

– User features: geo-location, browser, language, # of impressions shown

– Customer-provided data: about the user, about the website

• Provides insights into what features are driving performance

• Can re-use learnings from previous campaigns

Page 11: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Second price auctions

• First Price Auctions

– You bid $1, I bid $2: I win, and I pay $2

• RTB uses Second Price Auctions

– You bid $1, I bid $2: I win, and I pay $1

• Optimal bid = E[ value ]

– Say it’s worth $2 to me

– I will never bid more than $2

– If I bid $1.50 and you bid $1.75: I’ve lost an opportunity for $0.25 surplus!

– I should always bid $2

Page 12: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Don’t buy lottery tickets!

E[ value ] = payout * P( getting the payout )

Page 13: Int'l Conference on Predictive APIs: RTB Optimizer presentation

What’s it to you?

• If client gets paid $10,000 for 1,000 then payout = $10

E[ value | bid-request ] = $10 * P( conversion | bid-request )

• What was an economics problem is now a prediction

problem

• We need to calibrate to predict true probabilities

Page 14: Int'l Conference on Predictive APIs: RTB Optimizer presentation

RTB Optimizer

Bids API

E[ value ]

Outcomes API

P( outcome )

Page 15: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Collecting the data

• To compute P( X | Y ) we need examples of Y’s with an X label

• RTB Optimizer uses mix of strategies to meet campaign goals

• Probe strategy bids randomly to collect data

• Optimized strategy bids with E[ value]

• Automatic training/retraining when API see enough examples

Page 16: Int'l Conference on Predictive APIs: RTB Optimizer presentation

RTB Optimizer

Probe

Bids API

E[ value ]

Training

Outcomes API

P( outcome )

Page 17: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Bias control

• Never stop the probe strategy

• Always need control group for evaluation, retraining

• Risk of filter bubbles: future models trained on previous output

• Bid requests are randomly routed to probe, less often over time

• Models automatically back-tested before deployment

Page 18: Int'l Conference on Predictive APIs: RTB Optimizer presentation

How to learn in real-time

• Classify using bagged generalized linear models

• Generate non-linear features with statistics tables

• Periodically retrain classifier

• Continuously update stats tables

Page 19: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Statistics Table by example

Table Bucket Impressions OutcomesOutcomes/Impressions

95% Confidence Lower Bound on

Outcomes/Impressions

Browser

Chrome 5M 3k 0.060% 0.058%

Firefox 3M 1k 0.033% 0.031%

Website

abc.com 4M 2k 0.050% 0.048%

xyz.com 1k 10 1.000% 0.481%

Page 20: Int'l Conference on Predictive APIs: RTB Optimizer presentation

RTB Optimizer

Probe

Bids API

E[ value ]

Training

Outcomes API

GLZ Classifier

Stats Tables

Real-Time

Batch

Page 21: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Implementation details (are everything)

• 100k requests per second, 10 millisecond latency, running

24/7,

1 trillion predictions to date

• Distributed system, written in C++ 11

• AWS: data in S3, training runs on Amazon EC2 spot market

• http://opensource.datacratic.com/

– RTBkit

– JML

– StarCluster

Page 22: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Does it work?

Classification success? ROC or calibration curves…

Page 23: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Does it work?

Classification success? ROC and calibration curves…

Optimization success? 80% reductions in cost-per-outcome…

Page 24: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Does it work?

Classification success? ROC or calibration curves…

Optimization success? 80% reductions in cost-per-outcome…

Customer success! 25% monthly growth

Page 25: Int'l Conference on Predictive APIs: RTB Optimizer presentation

Thanks!

[email protected]

REAL TIME MACHINE LEARNING DECISIONS AS A SERVICE