Embeddings for Recommendation
Systems
Keynote Speech
Sihem Romdhani – Data Scientist
People watch one billion hours of YouTube every day
YouTube’s recommendations drive 70% of what we watch
=
700.000.000 hours of video / day
YouTube generates 6% of Google’s ad sales revenue.
Digital Marketing and Recommender
Systems
Individualized
customer
experience
Higher
Traffic &
Increased
revenue
Product
Bundling
Engaging
Shoppers
Real-Time
Recommendations
AI-based
Recommender
Systems
Machine Learning Models for
predicting product preference.
Recommender Systems help us to
manage big amounts of customer
data, and to extract preferences on
the individual customers‘ level.
AI-based Recommender Systems
Approache
s
Collaborative filtering
Content-based
filtering
Embeddings
Embeddings for
Recommendation
Systems
Background On Embeddings in NLP
Word Embeddings
 Feature Vector representations of words
(i.e. representing text as numbers)
 Capture semantic and syntactic
relationships.
Word Embeddings
 Feature Vector representations of words
(i.e. representing text as numbers)
 Capture semantic and syntactic
relationships.
0.1 0.67 - --
0.5 0.8 - --
0.01 0.9 - --
king
man
woma
n
queen 0.6 0.19 - --
Word embedding
(e.g. word2vec, GloVe)
Similarity( 0.1 0.67 - -- 0.5 0.8 - -- )=0.8
king man
,
Word2vec and Skipgram for Learning Word
Embeddings
0.8 0.01 … 0.89Marketing
Sale
School
art
…
…
….
advertising
Embedding Size
Embeddings
“You shall know a word by the company it keeps” J.R. Firth
Random Initialization1
Word2vec and Skipgram for Learning Word
Embeddings
Untrained Model
Task:
Are the two words neighbors?
0.8 0.01 … 0.89Marketing
Sale
School
art
…
…
….
advertising
Embedding Size
Embeddings
“You shall know a word by the company it keeps” J.R. Firth
Random Initialization1 Look up
embeddings2
Marketing
school
Train the model3 Model
Prediction
4
0.45
0.55
Yes
No
Word2vec and Skipgram for Learning Word
Embeddings
Untrained Model
Task:
Are the two words neighbors?
0.8 0.01 … 0.89Marketing
Sale
School
art
…
…
….
advertising
Embedding Size
Embeddings
“You shall know a word by the company it keeps” J.R. Firth
Random Initialization1 Look up
embeddings2
Marketing
school
Train the model3 Model
Prediction
4
0.45
0.55
Yes
No
Actual Target &
Error Estimation
5
0
1
Yes
No
Update Model Parameters
Word2vec and Skipgram for Learning Word
Embeddings
Marketing is the study and management of exchange relationships.
Source: Wikipedia
Sliding window across running text
context
Input word Output word Target
is marketing 1
is the 1
Dataset
Word2vec and Skipgram for Learning Word
Embeddings
Marketing is the study and management of exchange relationships.
Source: Wikipedia
Sliding window across running text
context
Input word Output word Target
is marketing 1
is the 1
the is 1
the study 1
Dataset
Word2vec and Skipgram for Learning Word
Embeddings
Dataset
Marketing is the study and management of exchange relationships.
Source: Wikipedia
Input word Output word Target
is marketing 1
is school 0
is the 1
is art 0
the is 1
the cat 0
the study 1
Negative Sampling
Applying
word2vec to
Recommenders
and Advertising
Researchers from the Web Search, E-
commerce and Marketplace domains
have realized that just like one can
train word embeddings by treating a
sequence of words in a sentence as
context, the same can be done for
training embeddings of user
actions by treating sequence of
user actions as context.
Applying word2vec to Recommenders and Advertising
Mihajlo Grbovic, Airbnb
 User activity around an item encodes many
abstract qualities of that item which are difficult to
capture by more direct means (e.g. How do you encode
qualities like “architecture, style and feel” of an Airbnb
listing?
 The word2vec approach has proven successful in
extracting these hidden insights.
 Being able to compare, search, and categorize items
on these abstract dimensions opens up a lot of
opportunities for smarter, better recommendations.
Applying
word2vec to
Recommenders
and Advertising
Airbnb Use Case
Airbnb Recommender Systems
 Airbnb is a marketplace that contains millions of diverse home listings
Potential guests explore the listings through search results generated from a sophisticated Machine Learning models.
Similar Listing Carousel shows listing recommendations related to the current viewed listing.
 Initially, search rankings were determined by a set of hard-coded rules based on very
basic signals
The rules were applied to every guest uniformly, rather than taking into account the unique values that could create the kind of
a personalized experience that keeps guests coming back.
 Airbnb uses machine learning to offer personalized search experience.
Listing
Embeddings in
Search Ranking
Airbnb Recommender Systems
 The listing embeddings are vector representations of Airbnb homes learned
from search sessions.
 They effectively encode many listing features, such as location, price, listing
type, architecture and listing style, all using only 32 float numbers.
 Measure similarities: Similar listings lie nearby in the embedding space.
 Improving Similar Listing Recommendations and Real-Time Personalization
in Search Ranking.
Site
Search
Airbnb Listing Embeddings
Airbnb
Homepage
Site
Search
Airbnb Listing Embeddings
Listing
#111
Airbnb
Homepage
Site
Search
Airbnb Listing Embeddings
Listing
#111
Listing
#2000
Airbnb
Homepage
Airbnb
Homepage
Site
Search
Airbnb Listing Embeddings
Listing
#111
Listing
#2000
Listing
#415
Site
Search
Click sessions
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Airbnb Listing Embeddings
Listing
#111
Listing
#2900
Listing
#415
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Listing
#700
Listing
#800
Listing
#900
Listing
#1000
Airbnb Listing Embeddings
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Listing
#700
….
Airbnb Listing Embeddings
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Listing
#700
….
Input listing Output listing class
#200 #100 1
#200 #300 1
#300 #200 1
#300 #400 1
… … …
Airbnb Listing Embeddings
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Listing
#700
….
Input listing Output listing class
#200 #100 1
#200 #300 1
#300 #200 1
#300 #400 1
… … …
Airbnb Listing Embeddings
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Listing
#700
….
Input listing Output listing class
#200 #100 1
#200 #71 0
#200 #300 1
#200 #417 0
#300 #200 1
#300 #33 0
#300 #400 1
… … …
0.06 0.1 … 0.47Listing #1
Listing #2
Listing #3
Listing #4
Listing #5
Listing #6
….
Listing #1000
Vector of 34 floating numbers
Listing Embeddings
Airbnb Listing Embeddings
0.06 0.1 … 0.47Listing #1
Listing #2
Listing #3
Listing #4
Listing #5
Listing #6
….
Listing #1000
Listing #3
Most Similar Listings
Listing #72
Listing #2006
Listing #1345
Listing #491
Listing #304
Vector of 34 floating numbers
Listing Embeddings
recommend
Click
Airbnb Listing Embeddings
New
Labeled
Data
Most Similar Listings
Listing #72
Listing #2006
Listing #1345
Listing #491
Listing #304
After recommending
Clicked
Clicked
Not clicked
Listing #72
Listing #2006
Listing #1345
Recommended
Input listing Output listing label
#3 #1345 0
Improving
Recommendations
Listing #3
Click
Improving
Recommendations
booked
Input listing Output listing label
#200 #100 1
#200 #300 1
#200 #1000 1
#300 #1000 1
Click sessions
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Listing
#111
Listing
#2900
Listing
#415
Listing
#100
Listing
#200
Listing
#300
Listing
#400
Listing
#500
Listing
#600
Listing
#700
Listing
#800
Listing
#900
Listing
#1000
New
Labeled
Data
Challenges
ML systems are not good at
generalizing when the underlying
data distribution changes.
What is needed to
build a ML product
What’s needed to
build a supervised
learning model
Robustness in AI
Covid-19 Pandemic… Sudden change in
Consumers' behavior
New behaviors derail
 old recommender
engines,
 AI inventory trackers,
 and fraud detection
systems
Building Robust Recommender Systems
The AI community needs to implement new
approaches and processes for post-
deployment monitoring like:
 building an alert system to flag changes,
 use human-in-the-loop deployments to
acquire new labels,
 assemble a robust MLOps team.
Valuable product
resilient to conditions
change
Toward Ethical AI…
Recommender Systems Vs. Data Privacy
How to build recommender systems without
compromising data privacy?
Building the
foundation for a
responsible
and innovative
Data
Economy
 Secure computation (e.g. cryptography).
 Secure hardware usage.
 Transparency and Audit.
 ML Models that can learn from small datasets
@ICDEc
sihemromdhani
@Sihem_Romdhani
ICDEc Virtual Conference 2020
romdhani.sihem@gmail.com
Sihem Romdhani
Thank you

Embeddings for Recommendation Systems

  • 1.
    Embeddings for Recommendation Systems KeynoteSpeech Sihem Romdhani – Data Scientist
  • 2.
    People watch onebillion hours of YouTube every day YouTube’s recommendations drive 70% of what we watch = 700.000.000 hours of video / day YouTube generates 6% of Google’s ad sales revenue.
  • 3.
    Digital Marketing andRecommender Systems Individualized customer experience Higher Traffic & Increased revenue Product Bundling Engaging Shoppers Real-Time Recommendations AI-based Recommender Systems Machine Learning Models for predicting product preference. Recommender Systems help us to manage big amounts of customer data, and to extract preferences on the individual customers‘ level.
  • 4.
    AI-based Recommender Systems Approache s Collaborativefiltering Content-based filtering Embeddings
  • 5.
  • 6.
  • 7.
    Word Embeddings  FeatureVector representations of words (i.e. representing text as numbers)  Capture semantic and syntactic relationships.
  • 8.
    Word Embeddings  FeatureVector representations of words (i.e. representing text as numbers)  Capture semantic and syntactic relationships. 0.1 0.67 - -- 0.5 0.8 - -- 0.01 0.9 - -- king man woma n queen 0.6 0.19 - -- Word embedding (e.g. word2vec, GloVe) Similarity( 0.1 0.67 - -- 0.5 0.8 - -- )=0.8 king man ,
  • 9.
    Word2vec and Skipgramfor Learning Word Embeddings 0.8 0.01 … 0.89Marketing Sale School art … … …. advertising Embedding Size Embeddings “You shall know a word by the company it keeps” J.R. Firth Random Initialization1
  • 10.
    Word2vec and Skipgramfor Learning Word Embeddings Untrained Model Task: Are the two words neighbors? 0.8 0.01 … 0.89Marketing Sale School art … … …. advertising Embedding Size Embeddings “You shall know a word by the company it keeps” J.R. Firth Random Initialization1 Look up embeddings2 Marketing school Train the model3 Model Prediction 4 0.45 0.55 Yes No
  • 11.
    Word2vec and Skipgramfor Learning Word Embeddings Untrained Model Task: Are the two words neighbors? 0.8 0.01 … 0.89Marketing Sale School art … … …. advertising Embedding Size Embeddings “You shall know a word by the company it keeps” J.R. Firth Random Initialization1 Look up embeddings2 Marketing school Train the model3 Model Prediction 4 0.45 0.55 Yes No Actual Target & Error Estimation 5 0 1 Yes No Update Model Parameters
  • 12.
    Word2vec and Skipgramfor Learning Word Embeddings Marketing is the study and management of exchange relationships. Source: Wikipedia Sliding window across running text context Input word Output word Target is marketing 1 is the 1 Dataset
  • 13.
    Word2vec and Skipgramfor Learning Word Embeddings Marketing is the study and management of exchange relationships. Source: Wikipedia Sliding window across running text context Input word Output word Target is marketing 1 is the 1 the is 1 the study 1 Dataset
  • 14.
    Word2vec and Skipgramfor Learning Word Embeddings Dataset Marketing is the study and management of exchange relationships. Source: Wikipedia Input word Output word Target is marketing 1 is school 0 is the 1 is art 0 the is 1 the cat 0 the study 1 Negative Sampling
  • 16.
  • 17.
    Researchers from theWeb Search, E- commerce and Marketplace domains have realized that just like one can train word embeddings by treating a sequence of words in a sentence as context, the same can be done for training embeddings of user actions by treating sequence of user actions as context. Applying word2vec to Recommenders and Advertising Mihajlo Grbovic, Airbnb  User activity around an item encodes many abstract qualities of that item which are difficult to capture by more direct means (e.g. How do you encode qualities like “architecture, style and feel” of an Airbnb listing?  The word2vec approach has proven successful in extracting these hidden insights.  Being able to compare, search, and categorize items on these abstract dimensions opens up a lot of opportunities for smarter, better recommendations.
  • 18.
  • 19.
    Airbnb Recommender Systems Airbnb is a marketplace that contains millions of diverse home listings Potential guests explore the listings through search results generated from a sophisticated Machine Learning models. Similar Listing Carousel shows listing recommendations related to the current viewed listing.  Initially, search rankings were determined by a set of hard-coded rules based on very basic signals The rules were applied to every guest uniformly, rather than taking into account the unique values that could create the kind of a personalized experience that keeps guests coming back.  Airbnb uses machine learning to offer personalized search experience.
  • 20.
    Listing Embeddings in Search Ranking AirbnbRecommender Systems  The listing embeddings are vector representations of Airbnb homes learned from search sessions.  They effectively encode many listing features, such as location, price, listing type, architecture and listing style, all using only 32 float numbers.  Measure similarities: Similar listings lie nearby in the embedding space.  Improving Similar Listing Recommendations and Real-Time Personalization in Search Ranking.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
    Click sessions Listing #100 Listing #200 Listing #300 Listing #400 Listing #500 Listing #600 Airbnb ListingEmbeddings Listing #111 Listing #2900 Listing #415 Listing #100 Listing #200 Listing #300 Listing #400 Listing #500 Listing #600 Listing #700 Listing #800 Listing #900 Listing #1000
  • 26.
  • 27.
    Airbnb Listing Embeddings Listing #100 Listing #200 Listing #300 Listing #400 Listing #500 Listing #600 Listing #700 …. Inputlisting Output listing class #200 #100 1 #200 #300 1 #300 #200 1 #300 #400 1 … … …
  • 28.
    Airbnb Listing Embeddings Listing #100 Listing #200 Listing #300 Listing #400 Listing #500 Listing #600 Listing #700 …. Inputlisting Output listing class #200 #100 1 #200 #300 1 #300 #200 1 #300 #400 1 … … …
  • 29.
    Airbnb Listing Embeddings Listing #100 Listing #200 Listing #300 Listing #400 Listing #500 Listing #600 Listing #700 …. Inputlisting Output listing class #200 #100 1 #200 #71 0 #200 #300 1 #200 #417 0 #300 #200 1 #300 #33 0 #300 #400 1 … … …
  • 30.
    0.06 0.1 …0.47Listing #1 Listing #2 Listing #3 Listing #4 Listing #5 Listing #6 …. Listing #1000 Vector of 34 floating numbers Listing Embeddings Airbnb Listing Embeddings
  • 31.
    0.06 0.1 …0.47Listing #1 Listing #2 Listing #3 Listing #4 Listing #5 Listing #6 …. Listing #1000 Listing #3 Most Similar Listings Listing #72 Listing #2006 Listing #1345 Listing #491 Listing #304 Vector of 34 floating numbers Listing Embeddings recommend Click Airbnb Listing Embeddings
  • 32.
    New Labeled Data Most Similar Listings Listing#72 Listing #2006 Listing #1345 Listing #491 Listing #304 After recommending Clicked Clicked Not clicked Listing #72 Listing #2006 Listing #1345 Recommended Input listing Output listing label #3 #1345 0 Improving Recommendations Listing #3 Click
  • 33.
    Improving Recommendations booked Input listing Outputlisting label #200 #100 1 #200 #300 1 #200 #1000 1 #300 #1000 1 Click sessions Listing #100 Listing #200 Listing #300 Listing #400 Listing #500 Listing #600 Listing #111 Listing #2900 Listing #415 Listing #100 Listing #200 Listing #300 Listing #400 Listing #500 Listing #600 Listing #700 Listing #800 Listing #900 Listing #1000 New Labeled Data
  • 35.
  • 36.
    ML systems arenot good at generalizing when the underlying data distribution changes. What is needed to build a ML product What’s needed to build a supervised learning model Robustness in AI
  • 37.
    Covid-19 Pandemic… Suddenchange in Consumers' behavior New behaviors derail  old recommender engines,  AI inventory trackers,  and fraud detection systems
  • 38.
    Building Robust RecommenderSystems The AI community needs to implement new approaches and processes for post- deployment monitoring like:  building an alert system to flag changes,  use human-in-the-loop deployments to acquire new labels,  assemble a robust MLOps team. Valuable product resilient to conditions change
  • 39.
    Toward Ethical AI… RecommenderSystems Vs. Data Privacy
  • 40.
    How to buildrecommender systems without compromising data privacy? Building the foundation for a responsible and innovative Data Economy  Secure computation (e.g. cryptography).  Secure hardware usage.  Transparency and Audit.  ML Models that can learn from small datasets
  • 41.
    @ICDEc sihemromdhani @Sihem_Romdhani ICDEc Virtual Conference2020 romdhani.sihem@gmail.com Sihem Romdhani Thank you