SlideShare a Scribd company logo
Large-Scale Semantic Search 
Roi Blanco (roi@yahoo-inc.com) 
http://labs.yahoo.com/Yahoo_Labs_Barcelona
Semantic Search 
• Gain insights/value over your data 
– Aggregate 
– Search 
• Adding a “understanding” layer to the stages of a search 
engine 
– Typically very hard, limited success, slow, no clear benefits or 
application … 
– Boils down to generate structure over unstructured text 
• Currently, (more or less) confined within “entity-search” 
– Identifying (or extracting) real-world concepts in free text, with 
types 
– Although that shouldn’t be the end! 
• Borrows from different fields (IR, SW, NLP, DB) 
– Large scale = only the efficient/reliable parts
Search is really fast, without 
necessarily being intelligent
Why Semantic Search? Part I 
• Improvements in IR are harder and harder to 
come by 
– Machine learning using hundreds of features 
• Text-based features for matching 
• Graph-based features provide authority 
– Heavy investment in computational power, e.g. real-time 
indexing and instant search 
• Remaining challenges are not computational, but 
in modeling user cognition 
– Need a deeper understanding of the query, the 
content and/or the world at large 
– Could Watson explain why the answer is Toronto?
Ambiguity
What it’s like to be a machine? 
Roi Blanco
What it’s like to be a machine? 
✜Θ♬♬ţğ 
✜Θ♬♬ţğ√∞§®ÇĤĪ✜★♬☐✓✓ 
ţğ★✜ 
✪✚✜ΔΤΟŨŸÏĞÊϖυτρ℠≠⅛⌫ 
≠=⅚©§★✓♪ΒΓΕ℠ 
✖Γ♫⅜±⏎↵⏏☐ģğğğμλκσςτ 
⏎⌥°¶§ΥΦΦΦ✗✕☐
Poorly solved information needs 
• Multiple interpretations 
– paris hilton 
• Long tail queries 
Many of these queries 
would not be asked by 
users, who learned over 
time what search 
technology can and can 
not do. 
– george bush (and I mean the beer brewer in Arizona) 
• Multimedia search 
– paris hilton sexy 
• Imprecise or overly precise searches 
– jim hendler 
– pictures of strong adventures people 
• Searches for descriptions 
– countries in africa 
– 34 year old computer scientist living in barcelona 
– reliable digital camera under 300 dollars
Use cases in web search 
Top-1 entity with 
structured data 
Related entities 
Structured data 
extracted from HTML
Semantics at every step of the IR process 
bla bla bla? 
bla 
bla bla 
The IR engine The Web 
Query interpretation 
q=“bla” * 3 
Document processing bla 
bla bla 
bla 
bla 
bla 
Indexing 
Ranking 
θ(q,d) “bla” 
Result presentation
Usability 
We also fail at using the technology 
Sometimes
Annotated documents 
Barack Obama visited Tokyo this Monday as part of an extended Asian trip. 
He is expected to deliver a speech at the ASEAN conference next Tuesday 
20 May 2009 
28 May 2009 
Barack Obama visited Tokyo this Monday as part of an extended Asian trip. 
He is expected to deliver a speech at the ASEAN conference next Tuesday
Semantic annotations help to 
generalize… 
Sports team 
oakland as bradd pitt movie moneyball trailer movies.yahoo.com oakland as wikipedia.org 
Movie 
Actor
… and understand user needs 
what the user wants to do with it 
moneyball trailer 
Movie 
Object of the query
Is NLU that complex? 
”A child of five would understand this. 
Send someone to fetch a child of five”. 
Groucho Marx
Applications 
• Enhanced search 
– Better query understanding 
– Better ranking (tail/hard queries) 
– Better results presentation 
– Use heavy types, dependencies + WSD 
• Advisory to employ models to minimize overfitting. (Blanco & Boldi 
Extending BM25 with multiple query operators. SIGIR 2012) 
• Recommender systems 
– Structured data helps cross-domain recommendation 
• Diversity in search/recommendations 
• Crazy prototypes! 
– From Q&A to mining/retrieving heavily annotated information 
• Even predictions about the future! 
– Matthews et al, 2010. Searching over time in the NYT. HCIR 2010 
• Or systems that return entity-grained answers
Other applications 
• Frequent pattern mining over queries 
– PrefixSpan algorithm (movies) 
• Types as items 
– Film queries are more common than Actor queries 
• Attributes as items 
– Trailers and dvd are most commonly searched for new movie 
releases 
– Cast and quote queries are most common for older movies 
• Abandonment 
– ML model to predict when users abandon a some site in favor of the 
competition 
• Combination of attributes, types for past two queries 
• Tree ensemble ~ set of positive/negative patterns 
L. Hollink, P. Mika and R. Blanco. Web Usage Mining with Semantic 
Analysis. WWW 2013
Large-Scale Semantic Search
How does correlator work? 
Monty 
Python 
Inverted Index 
(sentence/doc level) 
Forward Index 
(entity level) 
Flying Circus 
John Cleese 
Brian
Parallel Indexes 
• Standard index contains only tokens 
• Parallel indices contain annotations on the tokens – the 
annotation indices must be aligned with main token index 
• For example: given the sentence “New York has great 
pizza” where New York has been annotated as a LOCATION 
– Token index has five entries 
(“new”, “york”, “has”, “great”, “pizza”) 
– The annotation index has five entries 
(“LOC”, “LOC”, “O”,”O”,”O”) 
Can optionally encode BIO format (e.g. LOC-B, LOC-I) 
• To search for the New York location entity, we search for: 
“token:New ^ entity:LOC token:York ^ entity:LOC”
Parallel Indices (II) 
Doc #3: The last time Peter exercised was in the XXth century. 
Doc #5: Hope claims that in 1994 she run to Peter Town. 
Peter  D3:4, D5:9 
Town  D5:10 
Hope  D5:1 
1994  D5:5 
… 
Possible Queries: 
“Peter AND run” 
“Peter AND WNS:N_DATE” 
“(WSJ:CITY ^ *) AND run” 
“(WSJ:PERSON ^ Hope) AND run” 
WSJ:PERSON  D3:4, D5:1 
WSJ:CITY  D5:9, D5:10 
WNS:V_DATE  D5:5 
(Bracketing can also be dealt with)
Resource Description Framework 
(RDF) 
• Each resource (thing, entity) is identified by a URI 
– Globally unique identifiers 
– Locators of information 
• Data is broken down into individual facts 
– Triples of (subject, predicate, object) 
• A set of triples (an RDF graph) is published together in an RDF document 
example:roi 
“Roi Blanco” 
type 
name 
foaf:Person 
RDF document
Linked Data: interlinked RDF 
example:roi 
“Roi Blanco” 
name 
foaf:Person 
sameAs 
example:roi2 
worksWith 
example:peter 
type 
email 
“pmika@yahoo-inc.com” 
type 
Roi’s homepage 
Yahoo 
Friend-of-a-Friend ontology
Information access in the Semantic 
Web 
• Database-style indexing of RDF data 
– Triple stores 
– Structural queries (SPARQL) 
– No ranking 
– Evaluation focused on efficiency 
• IR-style indexing of RDF data 
– Search engines 
– Keyword queries 
– Ranking 
– Evaluation focused on effectiveness 
• Combined methods 
– Keyword matching and limited join processing
Search over RDF data 
• Unstructured or hybrid search over RDF data 
– Supporting end-users 
• Users who can not express their need in SPARQL 
– Dealing with large-scale data 
• Giving up query expressivity for scale 
– Dealing with heterogeneity 
• Users who are unaware of the schema of the data 
• No single schema to the data 
– Example: 2.6m classes and 33k properties in Billion Triples 2009 
• Entity search 
– Queries where the user is looking for a single entity named or 
described in the query 
– e.g. kaz vaporizer, hospice of cincinnati, mst3000
Conclusions 
• Large-scale semantic search should become a 
commodity soon 
– Plenty of open source tools for extraction, linking 
– (soon) and indexing, ranking semantic information 
• Research challenges ahead 
– Making all the pieces fit together 
– Using more fine-grained structured information 
(think of context, location, device)
Architecture overview 
Doc 
1. Download, uncompress, 
convert (if needed) 
2. Sort quads by subject 
3. Compute Minimal Perfect 
Hash (MPH) 
map 
map 
reduce 
reduce 
map reduce 
Index 
3. Each mapper reads part of the 
collection 
4. Each reducer builds an index 
for a subset of the vocabulary 
5. Optionally, we also build an 
archive (forward-index) 
5. The sub-indices are 
merged into a single index 
6. Serving 
and 
Ranking
RDF indexing using MapReduce 
• Text indexing using MapReduce 
– Map: parse input into (term, doc) pairs 
• Pre-processing such as stemming, blacklisting 
• To support phrase queries values are (doc, position) pairs 
– Reduce: collect all values for the same key: (term, {doc1,doc2…}), output 
posting-list 
• Secondary sort to pre-sort document ids before iteration 
• RDF indexing using MapReduce 
– Document is all triples with a given subject 
• Variations: index also RDF molecules, triples where the URI is an object 
– Index terms in property-values 
• Keys are (field, term) pairs 
• Variation: distinguish values for the same property 
– Index terms in the subject URI 
• Variation: index also terms in object URIs
Horizontal index structure 
• One field per position 
– one for object (token), one for predicates (property), optionally one for context 
• For each term, store the property on the same position in the property 
index 
– Positions are required even without phrase queries 
• Query engine needs to support fields and the alignment operator 
 Dictionary is number of unique terms + number of properties 
 Occurrences is number of tokens * 2
Vertical index structure 
• One field (index) per property 
• Positions are not required 
• Query engine needs to support fields 
 Dictionary is number of unique terms 
 Occurrences is number of tokens 
✗ Number of fields is a problem for merging, query performance 
• In experiments we index the N most common properties
Big data = data 
• Modern data-sets comprise a mixture of structured and non-structured 
data 
– Text, news, blogs 
– Microformats, rdf 
– Images 
– Video 
– Social media (a mixture too) 
• Transform unstructured data into structured data 
• Entity extraction, disambiguation 
• Provide value over the data 
– Aggregation (BI) 
– Search 
• Scalable semantic search 
– Power next-generation search, recommendation, analytics etc. 
– Improvements linear with resources 
– Lightweight processes, powering interactive real-time experiences
Efficiency improvements 
• r-vertical (reduced-vertical) index 
– One field per weight vs. one field per property 
– More efficient for keyword queries but loses the ability to 
restrict per field 
– Example: three weight levels 
• Pre-computation of alignments 
– Additional term-to-field index 
– Used to quickly determine which fields contain a term (in any 
document)
Indexing efficiency 
• Billion Triples 2009 dataset 
– 249 GB in uncompressed N-Quad 
– 114 million URIs and 274 million triples with datatype properties 
– 2.9B / 1.4B occurrences (horiz/vert) 
• Selected 300 most frequent datatype properties for vertical indexing 
• Resulting index is 9-10GB in size 
• Horizontal and vertical indexing using Hadoop 
– Scale is only limited by number of machines 
– Number of reducers is a trade-off between speed and number of sub-indices to be merged
Run-time efficiency 
• Measured average execution time (including ranking) 
– Using 150k queries that lead to a click on Wikipedia 
– Avg. length 2.2 tokens 
– Baseline is plain text indexing with BM25 
• Results 
– Some cost for field-based retrieval compared to plain text indexing 
– AND is always faster than OR 
• Except in horizontal, where alignment time dominates 
– r-vertical significantly improves execution time in OR mode 
AND mode OR mode 
plain text 46 ms 80 ms 
horizontal 819 ms 847 ms 
vertical 97 ms 780 ms 
r-vertical 78 ms 152 ms
Efficient element retrieval 
• Goal 
– Given an ad-hoc query, return a list of documents and 
annotations ranked according to their relevance to the query 
• Simple Solution 
– For each document that matches the query, retrieve its 
annotations and return the ones with the highest counts 
• Problems 
– If there are many documents in the result set this will take too 
long - too many disk seeks, too much data to search through 
– What if counting isn’t the best method for ranking elements? 
• Solution 
– Special compressed data structures designed specifically for 
annotation retrieval
Forward Index 
• Access metadata and document contents 
– Length, terms, annotations 
• Compressed (in memory) forward indexes 
– Gamma, Delta, Nibble, Zeta codes (power laws) 
• Retrieving and scoring annotations 
– Sort terms by frequency 
• Random access using an extra compressed 
pointer list (Elias-Fano)

More Related Content

PPTX
Beyond document retrieval using semantic annotations
PPT
Semantic Search
PPTX
Influence of Timeline and Named-entity Components on User Engagement
PDF
Information Retrieval Fundamentals - An introduction
PDF
Best Practices for Large Scale Text Mining Processing
PPTX
Introduction to Information Retrieval
PPTX
Introduction to Information Retrieval
PPT
Related Entity Finding on the Web
Beyond document retrieval using semantic annotations
Semantic Search
Influence of Timeline and Named-entity Components on User Engagement
Information Retrieval Fundamentals - An introduction
Best Practices for Large Scale Text Mining Processing
Introduction to Information Retrieval
Introduction to Information Retrieval
Related Entity Finding on the Web

What's hot (19)

PPTX
Text REtrieval Conference (TREC) Dynamic Domain Track 2015
PPT
Week12
PDF
Konsep Dasar Information Retrieval - Edi faizal
PPTX
Model of information retrieval (3)
PPT
Big Data & Text Mining
PPTX
3. introduction to text mining
PDF
Apache Solr, il motore di ricerca enterprise open source
PPT
Tesxt mining
PPT
Information retrieval system
PPTX
Information retrieval introduction
PPTX
Quick tour all handout
PPTX
Text mining
PPTX
Challenges and opportunities in library discovery services gen
PPT
Text mining
PDF
CWIN17 Frankfurt / talend_nlp
PPTX
Knowledge Representation, Semantic Web
PPT
Role of Text Mining in Search Engine
PPTX
Text data mining1
PPTX
Knowledge mangement
Text REtrieval Conference (TREC) Dynamic Domain Track 2015
Week12
Konsep Dasar Information Retrieval - Edi faizal
Model of information retrieval (3)
Big Data & Text Mining
3. introduction to text mining
Apache Solr, il motore di ricerca enterprise open source
Tesxt mining
Information retrieval system
Information retrieval introduction
Quick tour all handout
Text mining
Challenges and opportunities in library discovery services gen
Text mining
CWIN17 Frankfurt / talend_nlp
Knowledge Representation, Semantic Web
Role of Text Mining in Search Engine
Text data mining1
Knowledge mangement
Ad

Viewers also liked (20)

ODP
Semantic differential in design
PPTX
Semantic differential
PPT
Likert scale
PPT
Likert Scale
PPTX
本当は怖いオープンデータ・ビッグデータ
PDF
Strategic research agenda for cocoa coffee Wageningen UR 09062014
PDF
User-centred innovation at Digital World Research Centre
PPTX
Greater Halifax: A Global Talent Magnet
PPTX
Slinky presentation
ODP
Corporateblogging
PPT
Werven Utrecht
PPTX
Presentacion emprendimiento
PDF
Englishtestunit73 eso d-2
PPT
PPT
Searching over the past, present and future
PPTX
Early Intervention Language Coach Course Overview and Introduction
PPTX
Rene descartes
PPTX
Top+5+world+flatness
PPTX
Media evaluation
PPTX
Pitching your brand
Semantic differential in design
Semantic differential
Likert scale
Likert Scale
本当は怖いオープンデータ・ビッグデータ
Strategic research agenda for cocoa coffee Wageningen UR 09062014
User-centred innovation at Digital World Research Centre
Greater Halifax: A Global Talent Magnet
Slinky presentation
Corporateblogging
Werven Utrecht
Presentacion emprendimiento
Englishtestunit73 eso d-2
Searching over the past, present and future
Early Intervention Language Coach Course Overview and Introduction
Rene descartes
Top+5+world+flatness
Media evaluation
Pitching your brand
Ad

Similar to Large-Scale Semantic Search (20)

PPT
Peter Mika's Presentation at SSSW 2011
PPTX
SemTech 2011 Semantic Search tutorial
PPTX
Semantic Search tutorial at SemTech 2012
PDF
Semantic Search Tutorial at SemTech 2012
PPTX
Making things findable
PPTX
Semantic search: from document retrieval to virtual assistants
PPTX
Recent Trends in Semantic Search Technologies
PPTX
Sem tech2013 tutorial
PPTX
Mining Web content for Enhanced Search
PPTX
Effective and Efficient Entity Search in RDF data
PPT
Semantic Search overview at SSSW 2012
PPTX
Making the Web Searchable - Keynote ICWE 2015
PPTX
(Keynote) Peter Mika - “Making the Web Searchable”
PPTX
Semantic Search on the Rise
PPTX
Semantic Search keynote at CORIA 2015
PPTX
Semantic Search at Yahoo
PPTX
Semtech bizsemanticsearchtutorial
PDF
NetIKX Semantic Search Presentation
PPTX
From Queries to Answers in the Web
PPTX
Understanding Queries through Entities
Peter Mika's Presentation at SSSW 2011
SemTech 2011 Semantic Search tutorial
Semantic Search tutorial at SemTech 2012
Semantic Search Tutorial at SemTech 2012
Making things findable
Semantic search: from document retrieval to virtual assistants
Recent Trends in Semantic Search Technologies
Sem tech2013 tutorial
Mining Web content for Enhanced Search
Effective and Efficient Entity Search in RDF data
Semantic Search overview at SSSW 2012
Making the Web Searchable - Keynote ICWE 2015
(Keynote) Peter Mika - “Making the Web Searchable”
Semantic Search on the Rise
Semantic Search keynote at CORIA 2015
Semantic Search at Yahoo
Semtech bizsemanticsearchtutorial
NetIKX Semantic Search Presentation
From Queries to Answers in the Web
Understanding Queries through Entities

More from Roi Blanco (7)

PDF
Entity Linking via Graph-Distance Minimization
PDF
Introduction to Big Data
PPT
Keyword Search over RDF Graphs
PDF
Extending BM25 with multiple query operators
PPTX
Energy-Price-Driven Query Processing in Multi-center Web Search Engines
PPT
Caching Search Engine Results over Incremental Indices
PPT
Finding support sentences for entities
Entity Linking via Graph-Distance Minimization
Introduction to Big Data
Keyword Search over RDF Graphs
Extending BM25 with multiple query operators
Energy-Price-Driven Query Processing in Multi-center Web Search Engines
Caching Search Engine Results over Incremental Indices
Finding support sentences for entities

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
KodekX | Application Modernization Development
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf
Cloud computing and distributed systems.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
20250228 LYD VKU AI Blended-Learning.pptx
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Unlocking AI with Model Context Protocol (MCP)
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
KodekX | Application Modernization Development
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx

Large-Scale Semantic Search

  • 1. Large-Scale Semantic Search Roi Blanco (roi@yahoo-inc.com) http://labs.yahoo.com/Yahoo_Labs_Barcelona
  • 2. Semantic Search • Gain insights/value over your data – Aggregate – Search • Adding a “understanding” layer to the stages of a search engine – Typically very hard, limited success, slow, no clear benefits or application … – Boils down to generate structure over unstructured text • Currently, (more or less) confined within “entity-search” – Identifying (or extracting) real-world concepts in free text, with types – Although that shouldn’t be the end! • Borrows from different fields (IR, SW, NLP, DB) – Large scale = only the efficient/reliable parts
  • 3. Search is really fast, without necessarily being intelligent
  • 4. Why Semantic Search? Part I • Improvements in IR are harder and harder to come by – Machine learning using hundreds of features • Text-based features for matching • Graph-based features provide authority – Heavy investment in computational power, e.g. real-time indexing and instant search • Remaining challenges are not computational, but in modeling user cognition – Need a deeper understanding of the query, the content and/or the world at large – Could Watson explain why the answer is Toronto?
  • 6. What it’s like to be a machine? Roi Blanco
  • 7. What it’s like to be a machine? ✜Θ♬♬ţğ ✜Θ♬♬ţğ√∞§®ÇĤĪ✜★♬☐✓✓ ţğ★✜ ✪✚✜ΔΤΟŨŸÏĞÊϖυτρ℠≠⅛⌫ ≠=⅚©§★✓♪ΒΓΕ℠ ✖Γ♫⅜±⏎↵⏏☐ģğğğμλκσςτ ⏎⌥°¶§ΥΦΦΦ✗✕☐
  • 8. Poorly solved information needs • Multiple interpretations – paris hilton • Long tail queries Many of these queries would not be asked by users, who learned over time what search technology can and can not do. – george bush (and I mean the beer brewer in Arizona) • Multimedia search – paris hilton sexy • Imprecise or overly precise searches – jim hendler – pictures of strong adventures people • Searches for descriptions – countries in africa – 34 year old computer scientist living in barcelona – reliable digital camera under 300 dollars
  • 9. Use cases in web search Top-1 entity with structured data Related entities Structured data extracted from HTML
  • 10. Semantics at every step of the IR process bla bla bla? bla bla bla The IR engine The Web Query interpretation q=“bla” * 3 Document processing bla bla bla bla bla bla Indexing Ranking θ(q,d) “bla” Result presentation
  • 11. Usability We also fail at using the technology Sometimes
  • 12. Annotated documents Barack Obama visited Tokyo this Monday as part of an extended Asian trip. He is expected to deliver a speech at the ASEAN conference next Tuesday 20 May 2009 28 May 2009 Barack Obama visited Tokyo this Monday as part of an extended Asian trip. He is expected to deliver a speech at the ASEAN conference next Tuesday
  • 13. Semantic annotations help to generalize… Sports team oakland as bradd pitt movie moneyball trailer movies.yahoo.com oakland as wikipedia.org Movie Actor
  • 14. … and understand user needs what the user wants to do with it moneyball trailer Movie Object of the query
  • 15. Is NLU that complex? ”A child of five would understand this. Send someone to fetch a child of five”. Groucho Marx
  • 16. Applications • Enhanced search – Better query understanding – Better ranking (tail/hard queries) – Better results presentation – Use heavy types, dependencies + WSD • Advisory to employ models to minimize overfitting. (Blanco & Boldi Extending BM25 with multiple query operators. SIGIR 2012) • Recommender systems – Structured data helps cross-domain recommendation • Diversity in search/recommendations • Crazy prototypes! – From Q&A to mining/retrieving heavily annotated information • Even predictions about the future! – Matthews et al, 2010. Searching over time in the NYT. HCIR 2010 • Or systems that return entity-grained answers
  • 17. Other applications • Frequent pattern mining over queries – PrefixSpan algorithm (movies) • Types as items – Film queries are more common than Actor queries • Attributes as items – Trailers and dvd are most commonly searched for new movie releases – Cast and quote queries are most common for older movies • Abandonment – ML model to predict when users abandon a some site in favor of the competition • Combination of attributes, types for past two queries • Tree ensemble ~ set of positive/negative patterns L. Hollink, P. Mika and R. Blanco. Web Usage Mining with Semantic Analysis. WWW 2013
  • 19. How does correlator work? Monty Python Inverted Index (sentence/doc level) Forward Index (entity level) Flying Circus John Cleese Brian
  • 20. Parallel Indexes • Standard index contains only tokens • Parallel indices contain annotations on the tokens – the annotation indices must be aligned with main token index • For example: given the sentence “New York has great pizza” where New York has been annotated as a LOCATION – Token index has five entries (“new”, “york”, “has”, “great”, “pizza”) – The annotation index has five entries (“LOC”, “LOC”, “O”,”O”,”O”) Can optionally encode BIO format (e.g. LOC-B, LOC-I) • To search for the New York location entity, we search for: “token:New ^ entity:LOC token:York ^ entity:LOC”
  • 21. Parallel Indices (II) Doc #3: The last time Peter exercised was in the XXth century. Doc #5: Hope claims that in 1994 she run to Peter Town. Peter  D3:4, D5:9 Town  D5:10 Hope  D5:1 1994  D5:5 … Possible Queries: “Peter AND run” “Peter AND WNS:N_DATE” “(WSJ:CITY ^ *) AND run” “(WSJ:PERSON ^ Hope) AND run” WSJ:PERSON  D3:4, D5:1 WSJ:CITY  D5:9, D5:10 WNS:V_DATE  D5:5 (Bracketing can also be dealt with)
  • 22. Resource Description Framework (RDF) • Each resource (thing, entity) is identified by a URI – Globally unique identifiers – Locators of information • Data is broken down into individual facts – Triples of (subject, predicate, object) • A set of triples (an RDF graph) is published together in an RDF document example:roi “Roi Blanco” type name foaf:Person RDF document
  • 23. Linked Data: interlinked RDF example:roi “Roi Blanco” name foaf:Person sameAs example:roi2 worksWith example:peter type email “pmika@yahoo-inc.com” type Roi’s homepage Yahoo Friend-of-a-Friend ontology
  • 24. Information access in the Semantic Web • Database-style indexing of RDF data – Triple stores – Structural queries (SPARQL) – No ranking – Evaluation focused on efficiency • IR-style indexing of RDF data – Search engines – Keyword queries – Ranking – Evaluation focused on effectiveness • Combined methods – Keyword matching and limited join processing
  • 25. Search over RDF data • Unstructured or hybrid search over RDF data – Supporting end-users • Users who can not express their need in SPARQL – Dealing with large-scale data • Giving up query expressivity for scale – Dealing with heterogeneity • Users who are unaware of the schema of the data • No single schema to the data – Example: 2.6m classes and 33k properties in Billion Triples 2009 • Entity search – Queries where the user is looking for a single entity named or described in the query – e.g. kaz vaporizer, hospice of cincinnati, mst3000
  • 26. Conclusions • Large-scale semantic search should become a commodity soon – Plenty of open source tools for extraction, linking – (soon) and indexing, ranking semantic information • Research challenges ahead – Making all the pieces fit together – Using more fine-grained structured information (think of context, location, device)
  • 27. Architecture overview Doc 1. Download, uncompress, convert (if needed) 2. Sort quads by subject 3. Compute Minimal Perfect Hash (MPH) map map reduce reduce map reduce Index 3. Each mapper reads part of the collection 4. Each reducer builds an index for a subset of the vocabulary 5. Optionally, we also build an archive (forward-index) 5. The sub-indices are merged into a single index 6. Serving and Ranking
  • 28. RDF indexing using MapReduce • Text indexing using MapReduce – Map: parse input into (term, doc) pairs • Pre-processing such as stemming, blacklisting • To support phrase queries values are (doc, position) pairs – Reduce: collect all values for the same key: (term, {doc1,doc2…}), output posting-list • Secondary sort to pre-sort document ids before iteration • RDF indexing using MapReduce – Document is all triples with a given subject • Variations: index also RDF molecules, triples where the URI is an object – Index terms in property-values • Keys are (field, term) pairs • Variation: distinguish values for the same property – Index terms in the subject URI • Variation: index also terms in object URIs
  • 29. Horizontal index structure • One field per position – one for object (token), one for predicates (property), optionally one for context • For each term, store the property on the same position in the property index – Positions are required even without phrase queries • Query engine needs to support fields and the alignment operator  Dictionary is number of unique terms + number of properties  Occurrences is number of tokens * 2
  • 30. Vertical index structure • One field (index) per property • Positions are not required • Query engine needs to support fields  Dictionary is number of unique terms  Occurrences is number of tokens ✗ Number of fields is a problem for merging, query performance • In experiments we index the N most common properties
  • 31. Big data = data • Modern data-sets comprise a mixture of structured and non-structured data – Text, news, blogs – Microformats, rdf – Images – Video – Social media (a mixture too) • Transform unstructured data into structured data • Entity extraction, disambiguation • Provide value over the data – Aggregation (BI) – Search • Scalable semantic search – Power next-generation search, recommendation, analytics etc. – Improvements linear with resources – Lightweight processes, powering interactive real-time experiences
  • 32. Efficiency improvements • r-vertical (reduced-vertical) index – One field per weight vs. one field per property – More efficient for keyword queries but loses the ability to restrict per field – Example: three weight levels • Pre-computation of alignments – Additional term-to-field index – Used to quickly determine which fields contain a term (in any document)
  • 33. Indexing efficiency • Billion Triples 2009 dataset – 249 GB in uncompressed N-Quad – 114 million URIs and 274 million triples with datatype properties – 2.9B / 1.4B occurrences (horiz/vert) • Selected 300 most frequent datatype properties for vertical indexing • Resulting index is 9-10GB in size • Horizontal and vertical indexing using Hadoop – Scale is only limited by number of machines – Number of reducers is a trade-off between speed and number of sub-indices to be merged
  • 34. Run-time efficiency • Measured average execution time (including ranking) – Using 150k queries that lead to a click on Wikipedia – Avg. length 2.2 tokens – Baseline is plain text indexing with BM25 • Results – Some cost for field-based retrieval compared to plain text indexing – AND is always faster than OR • Except in horizontal, where alignment time dominates – r-vertical significantly improves execution time in OR mode AND mode OR mode plain text 46 ms 80 ms horizontal 819 ms 847 ms vertical 97 ms 780 ms r-vertical 78 ms 152 ms
  • 35. Efficient element retrieval • Goal – Given an ad-hoc query, return a list of documents and annotations ranked according to their relevance to the query • Simple Solution – For each document that matches the query, retrieve its annotations and return the ones with the highest counts • Problems – If there are many documents in the result set this will take too long - too many disk seeks, too much data to search through – What if counting isn’t the best method for ranking elements? • Solution – Special compressed data structures designed specifically for annotation retrieval
  • 36. Forward Index • Access metadata and document contents – Length, terms, annotations • Compressed (in memory) forward indexes – Gamma, Delta, Nibble, Zeta codes (power laws) • Retrieving and scoring annotations – Sort terms by frequency • Random access using an extra compressed pointer list (Elias-Fano)