SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Deep Learning for Semantic Search in E-commerce
Somnath Banerjee
Head of Search Algorithms at Walmart Labs
https://www.linkedin.com/in/somnath-banerjee/
March 19, 2019
Walmart E-commerce search problem
2
100M+
Customers
100M+
Queries
100M+
Items
Store Associate E-commerce Search
providesthe functionalityof a human butatscale
3
????
Flash Drive
USB Drive
Thumb Drive
Jump Drive
Pen Drive
Zip Drive
Memory Stick
USB Stick
USB Flash Drive
USB Memory
USB Storage Device
Flush Drive
USC Drive
Thamb Drive
Jmp Drive
Pin Drive
Zap Drive
Memory Steak
USB Stock
USB Flash Drve
MisspelledQueries
4
saddle
Horse Saddle
Bike Saddle
Outline
5
• Core problems of e-commerce search
• Semantic search in e-commerce
• Deep Learning for semantic search
– Query classification
– Query token tagging
– Neural IR
– Image understanding (sneak peek)
Core of E-commerce Search
6
Text Query
Text
Query
Find Items
Catalog
Core problems of E-commerce search
7
Learning book
Tide 100 oz
Tide 100 fl oz
Tide 100 ounce
Neck style?
Fabric?
No. of pockets?
Ziploc
Ambiguity
Missing catalog values
Levi’s
Levi Strauss
Signature by Levi Strauss and Co.
Open vocabulary in query and catalog
Buying decision is influenced by item attractiveness
8
pump shoes
Tags
$300!!!
Presence of
expensive items
Image quality
Matching
query to items
Ranking
items
Core technical problems of e-commerce search
9
Pump shoes
✅
✅
❌
Position 1
Position 2
Text matching is not enough
10
Lemon
Lemon BalmLemon Fruit
Nivea 16oz
Nivea 15.5oz
Tire sealant
16oz
Query understanding
•Attributeunderstanding
Matching query and
item
•Text matching
•Attributematching
Ranking Items
Semantic Search
11
Deep learning for semantic search
12
Deep Learning for
Query understanding
Matching query and
item
•Text matching
•Attributematching
Ranking Items
Deep learning for semantic search
13
Deep Learning for
Query understanding
Matching query and
item
•Text matching
•Attributematching
Ranking Items
Neural IR
End-to-end matching and ranking
Image understanding
Not just text search
Outline
14
• Core problems of e-commerce search
• Semantic search in e-commerce
• Deep Learning for semantic search
– Query classification
– Query token tagging
– Neural IR
– Image understanding (sneak peek)
Query Classification
15
Text query
product type 1 : confidence level
product type 2 : confidence level
product type 3 : confidence level
Product Type
• A predefined list
• Indicates a specific product in the catalog
• Every item in the catalog is tagged with a product type
Query classification examples
16
Computer Video Cards: 0.85
Laptop Computers: 0.08
Desktop Computers: 0.06
nvidia gpu
Food StorageBags: 1.0ziploc bags
Largenumber of product
typesbedroom furniture
Hard to balance
precision vs recall
Query classification challenges
17
Shorttext
•Queries areof 2-3
tokens
Largescale
classification
•Thousandsof
producttypes
(classes)
Multi-class, multi-
label problem
•Samequery can
have multiple
producttypes
Needs to respond
in few milliseconds
•Classifies queries
at runtime
Unbalanced class
distribution
•Someproduct
types aremuch
morepopular
Data and Model
18
BiLSTM
<query, product type
ordered>
<query, item ordered>
Historical Search Log
https://guillaumegenthial.github.io/sequence-tagging-with-tensorflow.html
Output Layer
word2vec
Softmax/sigmoid
Usage of query classification
19
Without Query Classification After we understand the query “lemon” as a fruit
lemon
20% reduction of
irrelevant items
in certain query
segments
Key Learnings
20
Logistic
RegressionDeep
Learning
6%
higher
accuracy
CNN
BiLSTM
More
accurate
1 K80 GPU
8 Core CPU
6X
faster
1 K80 GPU48 Core CPU
Equal
Accuracy Training Time
Key Learnings - instability in Prediction
21
Television Stands: 0.32;
Laptop Computers: 0.27
Hard Drives: 0.11
Hard Drives: 1.00
Old model
New model
samsung 850 evo 250gb 2.5 inch
Instability in Prediction
22
Training data N Training data (N + 1)2.5% difference
in training data
Model N Model (N + 1)
Top predicted class is different for 10% of the test set
Instability in prediction – different seeds
23
Training data N
Model N Model N’
Top predicted class is different for 7% of the test set
Seed 1 Seed 2
Different tensorflow
and numpy seeds
Sources of Instability
24
Overfitting
•Deep Learning model has high
variance, particularly on the low
traffic queries
•Simpler models could be more
stable but less accurate
Sigmoid (1-vs-all) classifier
is more stable
•Softmax scores are
interdependent across classes
and less stable
Noisy training data
•Item order data is less noisy
than click
Rounding errors in the
arithmetic operations
•CPU is more stable than GPU
Reduction of Instability
25
40% reduction
of instability
Softmax
Clicks
CNN
Sigmoid
Orders
BiLSTM
• Product Type
• Brand
• Color
• Gender
• Age Group
• Size (value & unit)
– Pack Size
– Screen Size
– Shoe Size
– …
• Character
• Style
• Material
• …
Attributes to match
26
Not Feasible – Separate classifier for
each attribute
• Too many classes (e.g. 100K+ brand values)
• Sparse attributes; most attribute prediction
should be NA
• Creating training data of <query, attribute> is
more noisy and inaccurate
Query token tagging
27
Query
Query tokens
tagged with
Attribute Names
faded glory long sleeve shirts for women
Faded Glory
Long sleeve
shirts
women
for
Product type
Brand
Sleeve length
Gender
NULL
Training data
28
blue women levis jeans
Brand Product
Type
GenderColor
toys for girls 3 – 6 years
Age
Value
Age
Unit
GenderProduct
Type
Human curated data
It is a hard task for human
•Is "outside” a producttype token in the
query, “canopytents for outside”?
Disagreement between taggers are
high (~30%)
Fortunately 10K training data is a
good start
Model – BiLSTM-CRF
29
word2vec
Features
for CRF
https://guillaumegenthial.github.io/sequence-tagging-with-tensorflow.html
Linear Chain CRF
querytokens
𝑃(𝑡𝑎𝑔1, … , 𝑡𝑎𝑔 𝑛)
Char
embedding
Char Embeddings
30
G P U
word2vec
BiLSTM-CRF Network
Character embedding network
word2vec type
learnt on character
sequence
• Maps a sequence of characters to a fixed size vector
• Handles out of vocabulary words
• Handles misspellings
Char Embedding
31
sansung tvsansung tv
Brand Product
Type
NULL Product
Type
With Char EmbeddingWithout Char Embedding
Improving search results using query tagging
32
Women citizen eco drive watch
Before After understanding the Gender token
Regex matchwill be incorrect for
queries like
pioneer women dinnerware
wonder women bedding
spider man car seats
Other use cases of query tagging
33
samsung tv 32 in
32 in vizio tv
sanyo flat screen tv
led tv sony 55”
samsung tv stand
sony tv remote
TV queries
Not
TV queries
Customer Demand Analysis
• Most searched brand of TV
Attribute filter suggestion
• Suggest top attributes (e.g. brand,
screen size) that customers look for
for in a product type query (e.g. TV)
Search query log
Traditional
IR
Semantic
Search
Neural IR
Neural IR
34
Token and synonym
match
Learning to Rank
• Attribute extraction
• Token, synonym and
attribute match
• Learning to rank
End-to-end matching
and ranking
Neural IR – Design 1
35
Query
Item
Title
Input
Embedding
Concatenation
Neural
Transformation
Transformed
feature
Relevance
Score
• Runtime computation
• Not scalable for large
number of items
Neural IR – Design 2
36
Query
Item
Title
Input
Embedding
Neural
Transformation
Query, item
embeddings
Relevance
Score
item embeddings can be
computed offline and
indexed
shared weights
Input Embedding
37
Comparable Accuracy
Input
Embedding
token 1
…
token n
Query
or
Item Title
… AVG
word2vec
token 1
…
token n
… CNN
word2vec
Input
Embedding
Query
or
Item Title
Training Data
38
query, item title, click through rate (ctr)*
Historical search log
*Position bias correction for ctr of a query, item pair
𝑐𝑡𝑟 =
σ 𝑟 𝑐𝑙𝑖𝑐𝑘𝑠_𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑒𝑑 𝑟
σ 𝑟 𝑖𝑚𝑝𝑟𝑒𝑠𝑠𝑖𝑜𝑛𝑠 𝑟
𝑐𝑙𝑖𝑐𝑘𝑠_𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑒𝑑 𝑟 = 𝑐𝑙𝑖𝑐𝑘𝑠 𝑟 + 𝑖𝑚𝑝𝑟𝑒𝑠𝑠𝑖𝑜𝑛𝑠 𝑟 − 𝑐𝑙𝑖𝑐𝑘𝑠 𝑟 ∗ 𝑃 𝑐𝑙𝑖𝑐𝑘 𝑟)
𝑟 = 𝑟𝑎𝑛𝑘 𝑎𝑡 𝑤ℎ𝑖𝑐ℎ 𝑡ℎ𝑒 𝑖𝑡𝑒𝑚 𝑤𝑎𝑠 𝑑𝑖𝑠𝑝𝑙𝑎𝑦𝑒𝑑
Training Loss
39
Point-wise Pair-wise
𝑥 𝑞 = 𝑞𝑢𝑒𝑟𝑦 𝑓𝑒𝑎𝑡𝑢𝑟𝑒𝑠
𝑥 𝑝 = 𝑖𝑡𝑒𝑚 𝑓𝑒𝑎𝑡𝑢𝑟𝑒𝑠
𝑓 𝑥 𝑞, 𝑥 𝑝 → ctr
Regression problem
Sigmoid cross entropy loss
Brooks shoes
𝑥 𝑞 𝑥 𝑝
𝑥 𝑛
relevant less relevantquery
𝑓 𝑥 𝑞, 𝑥 𝑝 > 𝑓 𝑥 𝑞, 𝑥 𝑛
𝑤ℎ𝑒𝑛 𝑐𝑡𝑟 𝑥 𝑞, 𝑥 𝑝 > 𝑐𝑡𝑟(𝑥 𝑞, 𝑥 𝑛)
Minimize pair inversions
Pair-wise logistic loss
Accuracy on pair-wise loss
40
NDCG captures quality of overall ranking
Pair accuracy captures if higher ctr (relevant) items ranked above the lower ctr items
0.00%
10.00%
20.00%
30.00%
40.00%
50.00%
60.00%
70.00%
Design 1 Design 2
NDCG@10liftagainstbaseline
30.00%
31.00%
32.00%
33.00%
34.00%
35.00%
36.00%
Design 1 Design 2
PairAccuracyliftagainstbaseline
Pros
• End to end approach
• Enables Semantic matching implicitly
• Handles different data types (text, image)
Cons
• Not scalable (yet)
• Not so successful (yet)
Neural IR
41
Image understanding
42
Predicted Attributes
• Product type
• Style
• Material
• Color
Attribute
Prediction
Visual
Search
Compatible
Outfit
Image understanding key learnings
43
• Multi-task learning is
more accurate
• Predicting style is
harder than predicting
product type
Attribute
Prediction
Visual
Search
Compatible
Outfit
• A/B test on hayneedle.com
• Comparable results against
a well established startup
• Under exploration
• Early results beating
token based approach
Future
44
Evolution of mobile phone
Future
45
Web Search E-commerce Search
Conversational
commerce
Seamless search
and personalized
results
V-Commerce
46

Weitere ähnliche Inhalte

Was ist angesagt?

Recommender system introduction
Recommender system   introductionRecommender system   introduction
Recommender system introduction
Liang Xiang
 
GTC 2021: Counterfactual Learning to Rank in E-commerce
GTC 2021: Counterfactual Learning to Rank in E-commerceGTC 2021: Counterfactual Learning to Rank in E-commerce
GTC 2021: Counterfactual Learning to Rank in E-commerce
GrubhubTech
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
Lior Rokach
 
Recommendation engines
Recommendation enginesRecommendation engines
Recommendation engines
Georgian Micsa
 

Was ist angesagt? (20)

네이버서치ABT: 신뢰할 수 있는 A/B 테스트 플랫폼 개발 및 정착기
네이버서치ABT: 신뢰할 수 있는 A/B 테스트 플랫폼 개발 및 정착기네이버서치ABT: 신뢰할 수 있는 A/B 테스트 플랫폼 개발 및 정착기
네이버서치ABT: 신뢰할 수 있는 A/B 테스트 플랫폼 개발 및 정착기
 
Recommender system introduction
Recommender system   introductionRecommender system   introduction
Recommender system introduction
 
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
 
Music Recommendations at Scale with Spark
Music Recommendations at Scale with SparkMusic Recommendations at Scale with Spark
Music Recommendations at Scale with Spark
 
Vector database
Vector databaseVector database
Vector database
 
Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017
 
GTC 2021: Counterfactual Learning to Rank in E-commerce
GTC 2021: Counterfactual Learning to Rank in E-commerceGTC 2021: Counterfactual Learning to Rank in E-commerce
GTC 2021: Counterfactual Learning to Rank in E-commerce
 
The How and Why of Feature Engineering
The How and Why of Feature EngineeringThe How and Why of Feature Engineering
The How and Why of Feature Engineering
 
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Content based filtering
Content based filteringContent based filtering
Content based filtering
 
機器學習簡報 / 机器学习简报 Machine Learning
機器學習簡報 / 机器学习简报 Machine Learning 機器學習簡報 / 机器学习简报 Machine Learning
機器學習簡報 / 机器学习简报 Machine Learning
 
Recommendation systems
Recommendation systemsRecommendation systems
Recommendation systems
 
Little Big Data #1. 바닥부터 시작하는 데이터 인프라
Little Big Data #1. 바닥부터 시작하는 데이터 인프라Little Big Data #1. 바닥부터 시작하는 데이터 인프라
Little Big Data #1. 바닥부터 시작하는 데이터 인프라
 
Movie Recommendation System - MovieLens Dataset
Movie Recommendation System - MovieLens DatasetMovie Recommendation System - MovieLens Dataset
Movie Recommendation System - MovieLens Dataset
 
Overview of recommender system
Overview of recommender systemOverview of recommender system
Overview of recommender system
 
GPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge GraphGPT and Graph Data Science to power your Knowledge Graph
GPT and Graph Data Science to power your Knowledge Graph
 
Recommendation engines
Recommendation enginesRecommendation engines
Recommendation engines
 
Recommender system
Recommender systemRecommender system
Recommender system
 
Calibrated Recommendations
Calibrated RecommendationsCalibrated Recommendations
Calibrated Recommendations
 

Ähnlich wie Deep Learning for Semantic Search in E-commerce​

Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr...
 Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr... Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr...
Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr...
Databricks
 
Automated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and TrackingAutomated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and Tracking
Databricks
 
Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks
Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks
Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks
Lucidworks
 

Ähnlich wie Deep Learning for Semantic Search in E-commerce​ (20)

Which library should you choose for data-science? That's the question!
Which library should you choose for data-science? That's the question!Which library should you choose for data-science? That's the question!
Which library should you choose for data-science? That's the question!
 
Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr...
 Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr... Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr...
Using Spark-Solr at Scale: Productionizing Spark for Search with Apache Solr...
 
Summit EU Machine Learning
Summit EU Machine LearningSummit EU Machine Learning
Summit EU Machine Learning
 
Strata London - Deep Learning 05-2015
Strata London - Deep Learning 05-2015Strata London - Deep Learning 05-2015
Strata London - Deep Learning 05-2015
 
Data Science for Dummies - Data Engineering with Titanic dataset + Databricks...
Data Science for Dummies - Data Engineering with Titanic dataset + Databricks...Data Science for Dummies - Data Engineering with Titanic dataset + Databricks...
Data Science for Dummies - Data Engineering with Titanic dataset + Databricks...
 
Automated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and TrackingAutomated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and Tracking
 
Role of Data Science in eCommerce
Role of Data Science in eCommerceRole of Data Science in eCommerce
Role of Data Science in eCommerce
 
Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks
Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks
Practical End-to-End Learning to Rank Using Fusion - Andy Liu, Lucidworks
 
[RakutenTechConf2013] [B-3_3] Rakuten Category
[RakutenTechConf2013] [B-3_3] Rakuten Category[RakutenTechConf2013] [B-3_3] Rakuten Category
[RakutenTechConf2013] [B-3_3] Rakuten Category
 
ATP 2014
ATP 2014ATP 2014
ATP 2014
 
VSSML18. Clustering and Latent Dirichlet Allocation
VSSML18. Clustering and Latent Dirichlet AllocationVSSML18. Clustering and Latent Dirichlet Allocation
VSSML18. Clustering and Latent Dirichlet Allocation
 
Análisis del roadmap del Elastic Stack
Análisis del roadmap del Elastic StackAnálisis del roadmap del Elastic Stack
Análisis del roadmap del Elastic Stack
 
Telecom datascience master_public
Telecom datascience master_publicTelecom datascience master_public
Telecom datascience master_public
 
Faceted search with Oracle InMemory option
Faceted search with Oracle InMemory optionFaceted search with Oracle InMemory option
Faceted search with Oracle InMemory option
 
Approximate "Now" is Better Than Accurate "Later"
Approximate "Now" is Better Than Accurate "Later"Approximate "Now" is Better Than Accurate "Later"
Approximate "Now" is Better Than Accurate "Later"
 
BSSML17 - Deepnets
BSSML17 - DeepnetsBSSML17 - Deepnets
BSSML17 - Deepnets
 
ML Infra @ Spotify: Lessons Learned - Romain Yon - NYC ML Meetup
ML Infra @ Spotify: Lessons Learned - Romain Yon -  NYC ML MeetupML Infra @ Spotify: Lessons Learned - Romain Yon -  NYC ML Meetup
ML Infra @ Spotify: Lessons Learned - Romain Yon - NYC ML Meetup
 
Modern Search: Using ML & NLP advances to enhance search and discovery
Modern Search: Using ML & NLP advances to enhance search and discoveryModern Search: Using ML & NLP advances to enhance search and discovery
Modern Search: Using ML & NLP advances to enhance search and discovery
 
Using Deep Learning and Customized Solr Components to Improve search Relevanc...
Using Deep Learning and Customized Solr Components to Improve search Relevanc...Using Deep Learning and Customized Solr Components to Improve search Relevanc...
Using Deep Learning and Customized Solr Components to Improve search Relevanc...
 
Introduction to machine learning with GPUs
Introduction to machine learning with GPUsIntroduction to machine learning with GPUs
Introduction to machine learning with GPUs
 

Kürzlich hochgeladen

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Kürzlich hochgeladen (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Deep Learning for Semantic Search in E-commerce​

  • 1. Deep Learning for Semantic Search in E-commerce Somnath Banerjee Head of Search Algorithms at Walmart Labs https://www.linkedin.com/in/somnath-banerjee/ March 19, 2019
  • 2. Walmart E-commerce search problem 2 100M+ Customers 100M+ Queries 100M+ Items Store Associate E-commerce Search providesthe functionalityof a human butatscale
  • 3. 3 ???? Flash Drive USB Drive Thumb Drive Jump Drive Pen Drive Zip Drive Memory Stick USB Stick USB Flash Drive USB Memory USB Storage Device Flush Drive USC Drive Thamb Drive Jmp Drive Pin Drive Zap Drive Memory Steak USB Stock USB Flash Drve MisspelledQueries
  • 5. Outline 5 • Core problems of e-commerce search • Semantic search in e-commerce • Deep Learning for semantic search – Query classification – Query token tagging – Neural IR – Image understanding (sneak peek)
  • 6. Core of E-commerce Search 6 Text Query Text Query Find Items Catalog
  • 7. Core problems of E-commerce search 7 Learning book Tide 100 oz Tide 100 fl oz Tide 100 ounce Neck style? Fabric? No. of pockets? Ziploc Ambiguity Missing catalog values Levi’s Levi Strauss Signature by Levi Strauss and Co. Open vocabulary in query and catalog
  • 8. Buying decision is influenced by item attractiveness 8 pump shoes Tags $300!!! Presence of expensive items Image quality
  • 9. Matching query to items Ranking items Core technical problems of e-commerce search 9 Pump shoes ✅ ✅ ❌ Position 1 Position 2
  • 10. Text matching is not enough 10 Lemon Lemon BalmLemon Fruit Nivea 16oz Nivea 15.5oz Tire sealant 16oz
  • 11. Query understanding •Attributeunderstanding Matching query and item •Text matching •Attributematching Ranking Items Semantic Search 11
  • 12. Deep learning for semantic search 12 Deep Learning for Query understanding Matching query and item •Text matching •Attributematching Ranking Items
  • 13. Deep learning for semantic search 13 Deep Learning for Query understanding Matching query and item •Text matching •Attributematching Ranking Items Neural IR End-to-end matching and ranking Image understanding Not just text search
  • 14. Outline 14 • Core problems of e-commerce search • Semantic search in e-commerce • Deep Learning for semantic search – Query classification – Query token tagging – Neural IR – Image understanding (sneak peek)
  • 15. Query Classification 15 Text query product type 1 : confidence level product type 2 : confidence level product type 3 : confidence level Product Type • A predefined list • Indicates a specific product in the catalog • Every item in the catalog is tagged with a product type
  • 16. Query classification examples 16 Computer Video Cards: 0.85 Laptop Computers: 0.08 Desktop Computers: 0.06 nvidia gpu Food StorageBags: 1.0ziploc bags Largenumber of product typesbedroom furniture Hard to balance precision vs recall
  • 17. Query classification challenges 17 Shorttext •Queries areof 2-3 tokens Largescale classification •Thousandsof producttypes (classes) Multi-class, multi- label problem •Samequery can have multiple producttypes Needs to respond in few milliseconds •Classifies queries at runtime Unbalanced class distribution •Someproduct types aremuch morepopular
  • 18. Data and Model 18 BiLSTM <query, product type ordered> <query, item ordered> Historical Search Log https://guillaumegenthial.github.io/sequence-tagging-with-tensorflow.html Output Layer word2vec Softmax/sigmoid
  • 19. Usage of query classification 19 Without Query Classification After we understand the query “lemon” as a fruit lemon 20% reduction of irrelevant items in certain query segments
  • 20. Key Learnings 20 Logistic RegressionDeep Learning 6% higher accuracy CNN BiLSTM More accurate 1 K80 GPU 8 Core CPU 6X faster 1 K80 GPU48 Core CPU Equal Accuracy Training Time
  • 21. Key Learnings - instability in Prediction 21 Television Stands: 0.32; Laptop Computers: 0.27 Hard Drives: 0.11 Hard Drives: 1.00 Old model New model samsung 850 evo 250gb 2.5 inch
  • 22. Instability in Prediction 22 Training data N Training data (N + 1)2.5% difference in training data Model N Model (N + 1) Top predicted class is different for 10% of the test set
  • 23. Instability in prediction – different seeds 23 Training data N Model N Model N’ Top predicted class is different for 7% of the test set Seed 1 Seed 2 Different tensorflow and numpy seeds
  • 24. Sources of Instability 24 Overfitting •Deep Learning model has high variance, particularly on the low traffic queries •Simpler models could be more stable but less accurate Sigmoid (1-vs-all) classifier is more stable •Softmax scores are interdependent across classes and less stable Noisy training data •Item order data is less noisy than click Rounding errors in the arithmetic operations •CPU is more stable than GPU
  • 25. Reduction of Instability 25 40% reduction of instability Softmax Clicks CNN Sigmoid Orders BiLSTM
  • 26. • Product Type • Brand • Color • Gender • Age Group • Size (value & unit) – Pack Size – Screen Size – Shoe Size – … • Character • Style • Material • … Attributes to match 26 Not Feasible – Separate classifier for each attribute • Too many classes (e.g. 100K+ brand values) • Sparse attributes; most attribute prediction should be NA • Creating training data of <query, attribute> is more noisy and inaccurate
  • 27. Query token tagging 27 Query Query tokens tagged with Attribute Names faded glory long sleeve shirts for women Faded Glory Long sleeve shirts women for Product type Brand Sleeve length Gender NULL
  • 28. Training data 28 blue women levis jeans Brand Product Type GenderColor toys for girls 3 – 6 years Age Value Age Unit GenderProduct Type Human curated data It is a hard task for human •Is "outside” a producttype token in the query, “canopytents for outside”? Disagreement between taggers are high (~30%) Fortunately 10K training data is a good start
  • 29. Model – BiLSTM-CRF 29 word2vec Features for CRF https://guillaumegenthial.github.io/sequence-tagging-with-tensorflow.html Linear Chain CRF querytokens 𝑃(𝑡𝑎𝑔1, … , 𝑡𝑎𝑔 𝑛) Char embedding
  • 30. Char Embeddings 30 G P U word2vec BiLSTM-CRF Network Character embedding network word2vec type learnt on character sequence
  • 31. • Maps a sequence of characters to a fixed size vector • Handles out of vocabulary words • Handles misspellings Char Embedding 31 sansung tvsansung tv Brand Product Type NULL Product Type With Char EmbeddingWithout Char Embedding
  • 32. Improving search results using query tagging 32 Women citizen eco drive watch Before After understanding the Gender token Regex matchwill be incorrect for queries like pioneer women dinnerware wonder women bedding spider man car seats
  • 33. Other use cases of query tagging 33 samsung tv 32 in 32 in vizio tv sanyo flat screen tv led tv sony 55” samsung tv stand sony tv remote TV queries Not TV queries Customer Demand Analysis • Most searched brand of TV Attribute filter suggestion • Suggest top attributes (e.g. brand, screen size) that customers look for for in a product type query (e.g. TV) Search query log
  • 34. Traditional IR Semantic Search Neural IR Neural IR 34 Token and synonym match Learning to Rank • Attribute extraction • Token, synonym and attribute match • Learning to rank End-to-end matching and ranking
  • 35. Neural IR – Design 1 35 Query Item Title Input Embedding Concatenation Neural Transformation Transformed feature Relevance Score • Runtime computation • Not scalable for large number of items
  • 36. Neural IR – Design 2 36 Query Item Title Input Embedding Neural Transformation Query, item embeddings Relevance Score item embeddings can be computed offline and indexed shared weights
  • 37. Input Embedding 37 Comparable Accuracy Input Embedding token 1 … token n Query or Item Title … AVG word2vec token 1 … token n … CNN word2vec Input Embedding Query or Item Title
  • 38. Training Data 38 query, item title, click through rate (ctr)* Historical search log *Position bias correction for ctr of a query, item pair 𝑐𝑡𝑟 = σ 𝑟 𝑐𝑙𝑖𝑐𝑘𝑠_𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑒𝑑 𝑟 σ 𝑟 𝑖𝑚𝑝𝑟𝑒𝑠𝑠𝑖𝑜𝑛𝑠 𝑟 𝑐𝑙𝑖𝑐𝑘𝑠_𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑒𝑑 𝑟 = 𝑐𝑙𝑖𝑐𝑘𝑠 𝑟 + 𝑖𝑚𝑝𝑟𝑒𝑠𝑠𝑖𝑜𝑛𝑠 𝑟 − 𝑐𝑙𝑖𝑐𝑘𝑠 𝑟 ∗ 𝑃 𝑐𝑙𝑖𝑐𝑘 𝑟) 𝑟 = 𝑟𝑎𝑛𝑘 𝑎𝑡 𝑤ℎ𝑖𝑐ℎ 𝑡ℎ𝑒 𝑖𝑡𝑒𝑚 𝑤𝑎𝑠 𝑑𝑖𝑠𝑝𝑙𝑎𝑦𝑒𝑑
  • 39. Training Loss 39 Point-wise Pair-wise 𝑥 𝑞 = 𝑞𝑢𝑒𝑟𝑦 𝑓𝑒𝑎𝑡𝑢𝑟𝑒𝑠 𝑥 𝑝 = 𝑖𝑡𝑒𝑚 𝑓𝑒𝑎𝑡𝑢𝑟𝑒𝑠 𝑓 𝑥 𝑞, 𝑥 𝑝 → ctr Regression problem Sigmoid cross entropy loss Brooks shoes 𝑥 𝑞 𝑥 𝑝 𝑥 𝑛 relevant less relevantquery 𝑓 𝑥 𝑞, 𝑥 𝑝 > 𝑓 𝑥 𝑞, 𝑥 𝑛 𝑤ℎ𝑒𝑛 𝑐𝑡𝑟 𝑥 𝑞, 𝑥 𝑝 > 𝑐𝑡𝑟(𝑥 𝑞, 𝑥 𝑛) Minimize pair inversions Pair-wise logistic loss
  • 40. Accuracy on pair-wise loss 40 NDCG captures quality of overall ranking Pair accuracy captures if higher ctr (relevant) items ranked above the lower ctr items 0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00% Design 1 Design 2 NDCG@10liftagainstbaseline 30.00% 31.00% 32.00% 33.00% 34.00% 35.00% 36.00% Design 1 Design 2 PairAccuracyliftagainstbaseline
  • 41. Pros • End to end approach • Enables Semantic matching implicitly • Handles different data types (text, image) Cons • Not scalable (yet) • Not so successful (yet) Neural IR 41
  • 42. Image understanding 42 Predicted Attributes • Product type • Style • Material • Color Attribute Prediction Visual Search Compatible Outfit
  • 43. Image understanding key learnings 43 • Multi-task learning is more accurate • Predicting style is harder than predicting product type Attribute Prediction Visual Search Compatible Outfit • A/B test on hayneedle.com • Comparable results against a well established startup • Under exploration • Early results beating token based approach
  • 45. Future 45 Web Search E-commerce Search Conversational commerce Seamless search and personalized results V-Commerce
  • 46. 46