At Grubhub we leverage recent advances in Representation Learning to gain an automated and scalable understanding of our vast restaurant and menu catalog. We use these techniques to learn a latent food knowledge graph in order to drive better search and personalization. Particularly, we hope to share some of our advances in using: language modeling and knowledge graphs in the e-commerce setting.
4. Ecommerce Dilemma
● Our catalog grows everyday
● Data is unstructured
● and unbounded
● How can we understand it to
drive: search &
recommendations?
5. Use Cases
● Where can I get amazing Blueberry Pancakes? (semantic dish search)
● What are some synonyms for Pierogi? (query expansion)
● Show me French restaurants in Brooklyn? (semantic cuisine search)
● What are the top-10 asian noodle dishes near me? (semantics dish recs)
● Find me a new French restaurant that I’ll like (personalized restaurant recs)
16. Rest2Vec
Creates numerical vector representation of restaurants from historical clickstream
data using user’s clicks/conversions
● Helps to understand Restaurants
● Helps to power Discovery
● Helps to power Personalization
17. From Word2Vec to Rest2Vec (Data)
Distributional Hypothesis
A word is characterized by the company it keeps - Firth (1957)
26. FastMenu
Creates numerical vector representation of menu items using associated textual
data rather than diner behavior
● Helps to understand menus
● Helps to power semantic search
● Complete catalogue coverage
27. Menu Text Matching
Menu Item Description:
● mai fun
● blueberry pancake
String Matched Menu Items:
● mai fun, chow fun, shrimp mai fun
● blueberry smoothie, buttermilk pancake
Semantic Matched Menu Items
● stir fried noodles, thin rice noodles
● grand slam breakfast
● Increased recall
28. Static Sequence Embeddings
● Fasttext = sub-words
● Handles out of vocabulary words
● “pizza”
● <START>p, pi, iz, zz, za, a<END>
29. Menu Item Feature
How do you characterize a unique menu item with text?
Text Source Example Use
Restaurant Name San Gennaro’s No - no semantic info
Name margarita pizza Yes
Description Adorned simply in the colors of the Italian flag:
green from basil, white from mozzarella, red from
tomato sauce.
Yes
Menu Section House Favorites No - too noisy
Restaurant Cuisine Pizza, Subs, Italian, American, Lunch Specials Yes
Reviews “3/5” No
BUT: This content has no location awareness
31. Geohashes:
● Covers the surface of the earth
● Denotes rectangular area
● Alphanumeric string
● ~32 bit lat-long specification
● Nested precision levels
dr
dr5 drh
dr5x dr5z
32. Geohash Embedding
Geohashes: same representative characters as language
● Location words: geohash (dr5ru)
● Sentence = geohashes < 40 mi
“dr725 dr72h dr72j dr5rg dr5ru dr5rv dr5re dr5rs dr5rt”
● Concat geohash sentence to menu text
margarita pizza adorned simply colors italian flag green from
basil white from mozzarella red from tomato sauce pizza subs
italian american lunch specials dr725 dr72h dr72j dr5rg dr5ru
dr5rv dr5re dr5rs dr5rt
● Expand “word” vocabulary, but still 26 chars and 10
numbers
● Menu item text now knows about location
33. Data
Menu items: ~10 M
Geohash radius: 40 mi - geohash precision 4
Embedding Dimension: 30
Vocabulary: 3k words account for 97 % of all words used to describe menu items.
34. Visualization: TensorBoard
t-SNE: local variation
(cuisine separable)
PCA: global variation
(geography separable)
Phoenix:
mexican Topeka NashvillePhoenix
Phoenix:
asian
Phoenix:
indian
Nashville:
asian
Topeka:
Small market
37. Now we can answer the important questions
AMAZING!!!
blueberry
pancakes
Are pierogis really
empanadas?!?
10 Asian
noodles
near you
Try this French
restaurant instead
38. Alex Egg: @eggie5
Emily Ray: eray1@grubhub.com
Parin Choganwala: pchoganwala@grubhub.com
FOR MORE INFO CHECK OUT:
https://bit.ly/32fmBwJ