recommendation architecture - opentable - recsys 2014 - large scale recommender systems

58
Recommendation Architecture Jeremy Schiff RecSys 2014 Large Scale Recommender Systems 10/10/2014

Upload: jeremy-schiff

Post on 27-Nov-2014

174 views

Category:

Technology


0 download

DESCRIPTION

Conventionally when we talk about Recommender Systems, we talk about collaborative filtering. While providing personalized recommendations through collaborative filtering is an essential aspect to providing effective recommendations, it is but a piece of a much broader ecosystem of functionality, tools, and development pipelines. This presentation will discuss an holistic approach to building recommendation systems including 1) iterating towards better recommendations, 2) the data pipelines required, 3) a machine-learned ranking approach based on an Information Retrieval formulation that leverages collaborative filtering, 4) ways to make recommendations more relevant and interpretable.

TRANSCRIPT

Page 1: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Recommendation Architecture

Jeremy Schiff

RecSys 2014Large Scale Recommender Systems10/10/2014

Page 2: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

BEFORE DURING AFTER

DIN

ERS

REST

AURA

NTS

Sharing & Remembering

Understanding& Evolving

Attracting &Planning

Discovery &Convenience

DelightfulDining

OpenTable:Becoming an Experience Company

Proprietary 2

Page 3: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

BEFORE DURING AFTER

DIN

ERS

REST

AURA

NTS

Understanding& Evolving

Attracting &Planning

Deliver great experiences at every step, based on who you are

Proprietary 3

Page 4: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

OpenTable in Numbers

•Our network connects diners with approximately 32,000 restaurants worldwide.•Our diners have spent more than $25 billion at our partner restaurants.•OpenTable seats more than 15 million diners each month.• Every month, OpenTable diners write more than 400,000 restaurant reviews

4

Page 5: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Recommendations ≠

Collaborative Filtering

5

Page 6: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

So what are recommendations?

6

Page 7: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Building Recommendation Systems

• Importance of A/B Testing

• Generating Recommendations

• Recommendation Explanations

• Recommendation Infrastructure

7

Page 8: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

What’s the Goal

Minimizing Engineering Time to Improve The Metric that Matters

•Make it Easy to Measure•Make it Easy to Iterate• Reduce Iteration Cycle Times

8

Page 9: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Importance of A/B Testing

• If you don’t measure it, you can’t improve it

•Metrics Drive Behavior

• Continued Forward Progress

9

Page 10: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Pick Your Business Metric

Revenue, Conversions or Satisfaction• OpenTable • Amazon

Engagement• Netflix• Pandora• Spotify

10

Page 11: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Satisfaction Metric

Recommend RestaurantUser Query

User Review

Verify / Refine

Models

11

Page 12: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Measuring & The Iteration Loop

A/B Testing

Weeks

Measure

12

Page 13: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Measuring & The Iteration Loop

Optimize Models

A/B Testing

Days Weeks

Predict Measure

13

Page 14: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Measuring & The Iteration Loop

Analyze & Introspect

Optimize Models

A/B Testing

Hours Days Weeks

Insights Predict Measure

14

Page 15: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Fundamental Differences in Usage

Right now vs. Planning

Search vs. Recommendations

Cost of Being Wrong

15

Page 16: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Recommendation Stack

Query Interpretation

Retrieval

Ranking – Item & Explanation

Index Building

Context for Query & User

Model Building

Explanation Content

Visualization

CollaborativeFilters

Item / User Metadata

16

Page 17: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Query Interpretation & Retrieval

•Get User Intent• Two Solutions

- Spelling Correction- Auto Complete

•One Box, Many Types

- Name- Cuisine

17

Page 18: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Ranking Objectives

Objectives: • Training Error

- RMSE

•Generalization Error- Precision at K

• A/B Metric- Conversion

18

Page 19: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Ranking

Phase 1: Bootstrap through heuristics

Phase 2: Learn to Rank• E [ Revenue | Query, Position, Item, User ]• E [ Engagement | Query, Position, Item,

User ]• Modeling Diversity is Important

19

Page 20: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Modeling Support: Example

20

Page 21: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Modeling Support: Example

21

Page 22: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Modeling Support: Example

22

Page 23: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Modeling Confidence

•Understand Intersection of

- Support of User- Support of Item

•How does support affect variability of prediction?

- 23

Page 24: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Frequency, Sentiment, and Context

• High End Restaurant for Dinner

- High Sentiment, Low Frequency

• Fast, Mediocre Sushi for Lunch

- High Frequency, Moderate Sentiment

24

Page 25: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

How to use this data

• Frequency Data: - General: Popularity- Personalized: Implicit CF

• Sentiment Data: - General: Good Experience- Personalized: Explicit CF

• Good Recommendation- Use both to drive your Business Metric

25

Page 26: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Collaborative Filtering Architecture

Hyper-Parameter Tuning

(Many Days)

Predicted Rating

Full Trainer(Many hours)

Incremental Trainer

(A few seconds)Model

(User, Item)

26

Page 27: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Analyzing Review Content

27

Page 28: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

This really is a hidden gem and I'm not sure I want to share but I will. :) The owner, Claude, has been here for 47 years and is all about quality, taste, and not overcharging for what he loves. My husband and I don't often get into the city at night, but when we do this is THE place. The Grand Marnier Souffle' is the best I've had in my life - and I have a few years on the life meter. The custard is not over the top and the texture of the entire dessert is superb. This is the only family style French restaurant I'm aware of in SF. It also doesn't charge you an arm and a leg for their excellent quality and that also goes for the wine list. Soup, salad, choice of main (try the lamb shank) and choice of dessert - for around $42 w/o drinks.

“SUPERB!”

Bay Area ReviewsPost Jan 2013

Reviews come in all shapes and sizes!

28

Page 29: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

29

The ingredients of a spectaculardining experience…

Page 30: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

30

… and a spectacularly bad one

Page 31: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Content Features

Pandora•Music Genome Project

Natural Language Processing• Topics & Tags

31

Page 32: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Generating Topic Features

• Stop Words & Stemming• Bag of Words Model• TF/IDF • Topic Modeling•Describe Restaurants as Topics

32

Page 33: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Stop Words & Stemming

The food was great! I loved the view of the sailboats.

33

Page 34: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Stop Words & Stemming

The food was great! I loved the view of the sailboats.

34

Page 35: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

The food was great! I loved the view of the sailboats.

Bag of Words Model

food great chicken sailboat view service

1 1 0 1 1 0

35

Page 36: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

TF-IDF

• Term Frequency - Inverse Document Frequency

• Final Value = TF(t) IDF(t)36

Page 37: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

TF-IDF Example

food great chicken sailboat view service

.02 0.05 0 0.5 0.25 0

The food was great! I loved the view of the sailboats.

37

Page 38: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Topic Modeling Methods

We applied two main topic modeling methods:• Latent Dirichlet Allocation (LDA)

- (Blei et al. 2003)

•Non-negative Matrix Factorization (NMF)

- (Aurora et al. 2012)38

Page 39: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Topics with NMF using TF-IDFWord 1 Word … Word N

Review 1 0.8 0.9 0

Review … 0.6 0 0.8

Review N 0.9 0 0.8

ReviewsX

Words

ReviewsX

Topics

TopicsX

Words

39

Page 40: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Describing Restaurants as Topics

Each review for a given restaurant has certain topic distribution

Combining them, we identify the top topics for that restaurant.

Topic 01 Topic 02 Topic 03 Topic 04 Topic 05

Topic 01 Topic 02 Topic 03 Topic 04 Topic 05

Topic 01 Topic 02 Topic 03 Topic 04 Topic 05

review 1

review 2

review N

...

Topic 01 Topic 02 Topic 03 Topic 04 Topic 05

Rest

aura

nt

40

Page 41: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Examples of Topics

41

Page 42: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Varying Topic By Region• San Francisco

• `

• London

• Chicago

• New York

42

Page 43: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Compelling Recommendations

43

Page 44: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Recommendation Explanations• Amazon

• Ness

• Netfl

• ix

• Ness - Social

44

Page 45: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Summarizing Content

• Essential for Mobile• Balance Utility With Trust?

- Summarize, but surface raw data

• Example: - Initially, read every review- Later, use average star

rating

45

Page 46: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Summarizing Restaurant Attributes

46

Page 47: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Active Learning for Summarization

• Incremental Supervised Learning• Know Precision & Recall• Always Forward Progress• Generate Dataset: False Positive/Negative or Difficult to

Discriminate

Provide Labels

Train Model

Evaluate AccuracyOn Full Dataset

Generate New

Dataset

47

Page 48: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Devil is in the Details

Attribute Tag – Dim Lighting

“I love the relaxed feel of this place – dark, small, and cozy – like a comfortable living room.”

48

Page 49: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Dish Recommendation•What to try once I have arrived?

49

Page 50: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Edit via the Header & Footer menu in PowerPoint

5050

Page 51: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Infrastructure

User Interactions

Service Logs

51

Page 52: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Infrastructure

User Interactions

Service Logs

Queue

52

Page 53: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Infrastructure

User Interactions

Service LogsBatched Data For Analysis

Real-Time Processing

Queue

53

Page 54: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Infrastructure

User Interactions

Service Logs

Queue

Batched Data For Analysis

Real-Time Processing

Model Training

A/B Testing

Analytics

54

Page 55: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Multi-Datacenter Infrastructure

55

Page 56: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Building Recommendation Systems

• Importance of A/B Testing

• Generating Recommendations

• Recommendation Explanations

• Recommendation Infrastructure

56

Page 57: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Team Composition

Team• Data Scientist

- Math & Applied Machine Learning- Relevancy and Accuracy

• Data Science Engineer- Software Development- Infrastructure, Speed and Maintainability

Everyone works on production systems57

Page 58: Recommendation Architecture - OpenTable - RecSys 2014 - Large Scale Recommender Systems

Questions?

Jeremy [email protected]