SlideShare a Scribd company logo
1 of 28
Real-Time Open-Domain QA with
Dense-Sparse Phrase Index
Minjoon Seo*, Jinhyuk Lee*, Tom Kwiatkowski, Ankur Parikh, Ali Farhadi, Hannaneh Hajishirzi
ACL 2019
presented at LG CNS AI Tech Talk on Sep 5, 2019
* denotes equal contribution
Open-domain QA?
Some
Model
When was
Obama born?
1961
5 Million documents
3 Billion tokens
Information
Retrieval
Reader
(Model)
When was
Obama born?
1961
Chen et al., 2017
Retrieve & Read
TF-IDF,
BM-25,
LSA
1. Error propagation: reading only 5-10 docs
2. Query-dependent encoding: 30s+ per query
We want…
• To ”read” entire Wikipedia
• 5-10 docs  5 Million docs
• Reach long-tail answers
• Fast inference on CPUs
• 35s  0.5s
• Maintain high accuracy
HOW?
Our approach: index phrases!
Barack Obama …
… (1961-present …
… 44th President …
… United States.
Who is the 44th
President of the
U.S.?Nearest
neighbor
search
When was
Obama born?
“Barack Obama (1961-present)
was the 44th President of the
United States.”
Phrase
encoding
Question
encoding
Phrase Indexing
Seo et al., 2018
[-3, 0.1, …]
[0.3, -0.2, …]
[0.5, 0.1, …]
[0.7, -0.4, …]
[0.5, 0.0, …]
[3.3, -2.2, …]
When was
Obama born?
Nearest
neighbor
search
[0.5, 0.1, …]
Document Indexing
- Locality Sensitive Hashing (LSH)
- aLSH (Shrivastava & Li, 2014)
- HNSW (Malkov & Yashunin, 2018)
𝑎 = argmax
𝑎
𝐹𝜃 𝑎, 𝑞, 𝑑
𝑎 = argmax
𝑎
𝐺 𝜃(𝑞) ∙ 𝐻 𝜃(𝑎, 𝑑)
Model phrase question document
Query-Agnostic
Decomposition
Question encoder Phrase encoder
Phrase (and question) Representation
• Dense representation
• Can utilize deep neural networks
• great for capturing semantic and syntactic information
• Not great for disambiguating ”Einstein” vs “Tesla”
• Sparse representation (bag-of-word)
• Great for capturing lexical information
• Represent each phrase with a concatenation of both
Dense-Sparse Phrase Index (DenSPI)
…
When was
Barack
Obama born?
Reader
Model
1961
When was
Barack
Obama born?
…
Query
vector for
documentDense
1961
Sparse
Retrieve & Read
(Chen et al., 2017)
Phrase Index Document Index
DenSPI
Ours
N = 60 Billion N = 5 Million
Dense Representation for Phrases
According
Text Encoder (BERT)
to the American Library Association
dot
Start vector
End vector
Coherency vector
Coherency scalar
We want encoding for this phrase
phrase vector
Dense Representation for Questions
[CLS]
Text Encoder (BERT)
When was Barack Obama born?
Start vector
End vector
Coherency vector
Coherency scalar1
question vector
Sparse Representation
• TF-IDF document & paragraph vector, computed over
Wikipedia
• Unigram & Bigram (vocab size = 17 Million)
• Adopted DrQA’s vocab/TF-IDF (Chen et al., 2017)
Beware of the scale…
• 60 Billion phrases in Wikipedia!
• Training
• Softmax on 60 Billion phrases?
• Storage
• 60 Billion phrases x 4 KB per phrase = 240 TB?
• Search
• Exact search on 60 Billion phrases?
We want to be open-research-friendly
4 GPUs, 64 GB RAM, 2 TB Storage, One Week
Training
• Close-domain QA dataset: the model can easily overfit
• e.g. ”who” question when only one named entity in the context
• Negative sampling and concatenation
• Sampling strategy is crucial
• Use query encoder to associate similar questions in training set
• Concatenate the context that the similar question belongs to
Storage
• 60 Billion phrases x 4 KB per phrase = 240 TB!
1. Pointer: share start and end vectors
• 240 TB  12 TB
2. Filter: 1-layer classifier on phrase vectors
• 12 TB  4.5 TB
3. Scalar Quantization: 4 bytes  1 byte per dim
• 4.5 TB  1.5 TB
Search
• An open-source library for large-scale dense+sparse nearest
neighbor search is non-existent
• Dense-first search (DFS)
• faiss (Johnson et al., 2017)
• Sparse-first search (SFS)
• similar to retrieve & read
• Hybrid
Experiments
Weaver (Raison et al., 2018)
BERTserini (Yang et al., 2019)
42% EM
39% EM
DrQA (Chen et al., 2017) 30% EM
DenSPI (Ours) 36% EM
35 s/Q
Open-Domain
SQuAD
Red color is query-
agnostic.
0.8 s/Q
144x
44x
Multi-step reasoner (Das et al., 2019) 32% EM
MINIMAL (Min et al., 2018) 35% EM
115 s/Q
Qualitative Comparisons
Q: What can hurt a teacher’s mental and physical health?
… and poor mental health
can lead to problems such
as substance abuse.
Teachers face several
occupational hazards in
their line of work,
including occupational
stress…
Mental health Teacher
Retrieve & Read (Chen et al., 2017) DenSPI (Ours)
Q: Who was Kennedy’s science adviser that opposed
manned spacecraft flights?
Kennedy’s science advisor Jerome
Wiesner, … his opposition to
manned spaceflight …
Apollo program
… and the sun by NASA manager
Abe Silverstein, who later said
that …
Apollo program
Although Grumman wanted a
second unmanned test, George
Low decided … be manned.
Apollo program
Kennedy’s science advisor Jerome
Wiesner, … his opposition to
manned spaceflight …
Apollo program
Jerome Wiesner of MIT, who
served as a … advisor to …
Kennedy, … opponent of manned
Space Race
… science advisor Jerome
Wiesner … strongly opposed to
manned space exploration, …
John F. Kennedy
Q: What is the best thing to do when bored?
I’m nearly bored to death
Bored to Death (song)
The twin tunnels were bored by
… tunnel boring machine (TBM)
…
Waterview Connection
It’s easier to say you’re bored, or
to be angry, than it is to be sad.
Bored to Death (song)
http://nlp.cs.washington.edu/denspi
Q: What is the best thing to do when bored?
I’m nearly bored to death
Bored to Death (song)
The twin tunnels were bored by
… tunnel boring machine (TBM)
…
Waterview Connection
It’s easier to say you’re bored, or
to be angry, than it is to be sad.
Bored to Death (song)
When bored, she enjoys drawing.
Big Brother 2
he can think of a much more fun
thing he can do while on his
back: painting.
Angry Kid
She is a live music goer, and her
hobby is watching movies.
Pearls Before Swine
Demo
• http://nlp.cs.washington.edu/denspi
Conclusion
• “Read” entire Wikipedia in 0.5s with CPUs
• Query-agnostic, indexable phrase representations
• Utilize both dense (BERT-based) and sparse (bag-of-word)
representations for encoding lexical, syntactic, and semantic
information
• 6,000x lower computational cost with higher accuracy for
exact search
• At least 44x faster open-domain QA with higher accuracy
• (query-agnostic) decomposability gap still exists (6-10%); we
hope future research can close the gap
Thank you! Questions?
• http://nlp.cs.washington.edu/denspi
@seo_minjoon

More Related Content

Recently uploaded

Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 

Recently uploaded (20)

Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Real-Time Open-Domain QA with Dense-Sparse Phrase Index

  • 1. Real-Time Open-Domain QA with Dense-Sparse Phrase Index Minjoon Seo*, Jinhyuk Lee*, Tom Kwiatkowski, Ankur Parikh, Ali Farhadi, Hannaneh Hajishirzi ACL 2019 presented at LG CNS AI Tech Talk on Sep 5, 2019 * denotes equal contribution
  • 3. Some Model When was Obama born? 1961 5 Million documents 3 Billion tokens
  • 4. Information Retrieval Reader (Model) When was Obama born? 1961 Chen et al., 2017 Retrieve & Read TF-IDF, BM-25, LSA 1. Error propagation: reading only 5-10 docs 2. Query-dependent encoding: 30s+ per query
  • 5. We want… • To ”read” entire Wikipedia • 5-10 docs  5 Million docs • Reach long-tail answers • Fast inference on CPUs • 35s  0.5s • Maintain high accuracy HOW?
  • 7. Barack Obama … … (1961-present … … 44th President … … United States. Who is the 44th President of the U.S.?Nearest neighbor search When was Obama born? “Barack Obama (1961-present) was the 44th President of the United States.” Phrase encoding Question encoding Phrase Indexing Seo et al., 2018
  • 8. [-3, 0.1, …] [0.3, -0.2, …] [0.5, 0.1, …] [0.7, -0.4, …] [0.5, 0.0, …] [3.3, -2.2, …] When was Obama born? Nearest neighbor search [0.5, 0.1, …] Document Indexing - Locality Sensitive Hashing (LSH) - aLSH (Shrivastava & Li, 2014) - HNSW (Malkov & Yashunin, 2018)
  • 9. 𝑎 = argmax 𝑎 𝐹𝜃 𝑎, 𝑞, 𝑑 𝑎 = argmax 𝑎 𝐺 𝜃(𝑞) ∙ 𝐻 𝜃(𝑎, 𝑑) Model phrase question document Query-Agnostic Decomposition Question encoder Phrase encoder
  • 10. Phrase (and question) Representation • Dense representation • Can utilize deep neural networks • great for capturing semantic and syntactic information • Not great for disambiguating ”Einstein” vs “Tesla” • Sparse representation (bag-of-word) • Great for capturing lexical information • Represent each phrase with a concatenation of both
  • 11. Dense-Sparse Phrase Index (DenSPI) … When was Barack Obama born? Reader Model 1961 When was Barack Obama born? … Query vector for documentDense 1961 Sparse Retrieve & Read (Chen et al., 2017) Phrase Index Document Index DenSPI Ours N = 60 Billion N = 5 Million
  • 12. Dense Representation for Phrases According Text Encoder (BERT) to the American Library Association dot Start vector End vector Coherency vector Coherency scalar We want encoding for this phrase phrase vector
  • 13. Dense Representation for Questions [CLS] Text Encoder (BERT) When was Barack Obama born? Start vector End vector Coherency vector Coherency scalar1 question vector
  • 14. Sparse Representation • TF-IDF document & paragraph vector, computed over Wikipedia • Unigram & Bigram (vocab size = 17 Million) • Adopted DrQA’s vocab/TF-IDF (Chen et al., 2017)
  • 15. Beware of the scale… • 60 Billion phrases in Wikipedia! • Training • Softmax on 60 Billion phrases? • Storage • 60 Billion phrases x 4 KB per phrase = 240 TB? • Search • Exact search on 60 Billion phrases? We want to be open-research-friendly 4 GPUs, 64 GB RAM, 2 TB Storage, One Week
  • 16. Training • Close-domain QA dataset: the model can easily overfit • e.g. ”who” question when only one named entity in the context • Negative sampling and concatenation • Sampling strategy is crucial • Use query encoder to associate similar questions in training set • Concatenate the context that the similar question belongs to
  • 17. Storage • 60 Billion phrases x 4 KB per phrase = 240 TB! 1. Pointer: share start and end vectors • 240 TB  12 TB 2. Filter: 1-layer classifier on phrase vectors • 12 TB  4.5 TB 3. Scalar Quantization: 4 bytes  1 byte per dim • 4.5 TB  1.5 TB
  • 18. Search • An open-source library for large-scale dense+sparse nearest neighbor search is non-existent • Dense-first search (DFS) • faiss (Johnson et al., 2017) • Sparse-first search (SFS) • similar to retrieve & read • Hybrid
  • 20. Weaver (Raison et al., 2018) BERTserini (Yang et al., 2019) 42% EM 39% EM DrQA (Chen et al., 2017) 30% EM DenSPI (Ours) 36% EM 35 s/Q Open-Domain SQuAD Red color is query- agnostic. 0.8 s/Q 144x 44x Multi-step reasoner (Das et al., 2019) 32% EM MINIMAL (Min et al., 2018) 35% EM 115 s/Q
  • 21. Qualitative Comparisons Q: What can hurt a teacher’s mental and physical health? … and poor mental health can lead to problems such as substance abuse. Teachers face several occupational hazards in their line of work, including occupational stress… Mental health Teacher Retrieve & Read (Chen et al., 2017) DenSPI (Ours)
  • 22. Q: Who was Kennedy’s science adviser that opposed manned spacecraft flights? Kennedy’s science advisor Jerome Wiesner, … his opposition to manned spaceflight … Apollo program … and the sun by NASA manager Abe Silverstein, who later said that … Apollo program Although Grumman wanted a second unmanned test, George Low decided … be manned. Apollo program Kennedy’s science advisor Jerome Wiesner, … his opposition to manned spaceflight … Apollo program Jerome Wiesner of MIT, who served as a … advisor to … Kennedy, … opponent of manned Space Race … science advisor Jerome Wiesner … strongly opposed to manned space exploration, … John F. Kennedy
  • 23. Q: What is the best thing to do when bored? I’m nearly bored to death Bored to Death (song) The twin tunnels were bored by … tunnel boring machine (TBM) … Waterview Connection It’s easier to say you’re bored, or to be angry, than it is to be sad. Bored to Death (song)
  • 25. Q: What is the best thing to do when bored? I’m nearly bored to death Bored to Death (song) The twin tunnels were bored by … tunnel boring machine (TBM) … Waterview Connection It’s easier to say you’re bored, or to be angry, than it is to be sad. Bored to Death (song) When bored, she enjoys drawing. Big Brother 2 he can think of a much more fun thing he can do while on his back: painting. Angry Kid She is a live music goer, and her hobby is watching movies. Pearls Before Swine
  • 27. Conclusion • “Read” entire Wikipedia in 0.5s with CPUs • Query-agnostic, indexable phrase representations • Utilize both dense (BERT-based) and sparse (bag-of-word) representations for encoding lexical, syntactic, and semantic information • 6,000x lower computational cost with higher accuracy for exact search • At least 44x faster open-domain QA with higher accuracy • (query-agnostic) decomposability gap still exists (6-10%); we hope future research can close the gap
  • 28. Thank you! Questions? • http://nlp.cs.washington.edu/denspi @seo_minjoon