Slide 1

Slide 1 text

DAT630
 Retrieval Models II. Krisztian Balog | University of Stavanger 11/10/2016 Search Engines, Chapters 7

Slide 2

Slide 2 text

General Scoring Formula Relevance score
 It is computed for each document d in the collection for a given input query q
 
 Documents are returned in decreasing order of this score It is enough to consider terms in the query Term’s weight in the document Term’s weight in the query score ( d, q ) = X t2q wt,d · wt,q

Slide 3

Slide 3 text

Language Models

Slide 4

Slide 4 text

Language Models - Based on the notion of probabilities and processes for generating text

Slide 5

Slide 5 text

Uses - Speech recognition - “I ate a cherry” is a more likely sentence than “Eye eight uh Jerry” - OCR & Handwriting recognition - More probable sentences are more likely correct readings - Machine translation - More likely sentences are probably better translations

Slide 6

Slide 6 text

Uses - Completion prediction - Please turn off your cell _____ - Your program does not ______ - Predictive text input systems can guess what you are typing and give choices on how to complete it

Slide 7

Slide 7 text

Ranking Documents using Language Models - Represent each document as a multinomial probability distribution over terms - Estimate the probability that the query was "generated" by the given document - "How likely is the search query given the language model of the document?"

Slide 8

Slide 8 text

Standard Language Modeling approach - Rank documents d according to their likelihood of being relevant given a query q: P(d|q) P(d|q) = P(q|d)P(d) P(q) / P(q|d)P(d) Document prior
 Probability of the document 
 being relevant to any query Query likelihood
 Probability that query q 
 was “produced” by document d P(q|d) = Y t2q P(t|✓d)ft,q

Slide 9

Slide 9 text

Standard Language Modeling approach (2) Number of times t appears in q Empirical 
 document model
 Collection model 
 Smoothing parameter
 Maximum
 likelihood 
 estimates Document language model
 Multinomial probability distribution over the vocabulary of terms P(t|✓d ) = (1 )P(t|d) + P(t|C) P(q|d) = Y t2q P(t|✓d)ft,q ft,d |d| P d0 ft,d0 P d0 |d0|

Slide 10

Slide 10 text

Language Modeling Estimate a multinomial probability distribution from the text Smooth the distribution with one estimated from the entire collection P(t|✓d ) = (1 )P(t|d) + P(t|C)

Slide 11

Slide 11 text

Example In the town where I was born, Lived a man who sailed to sea, And he told us of his life,
 In the land of submarines, So we sailed on to the sun,
 Till we found the sea green,
 And we lived beneath the waves, In our yellow submarine, We all live in yellow submarine, yellow submarine, yellow submarine, We all live in yellow submarine, yellow submarine, yellow submarine.

Slide 12

Slide 12 text

Empirical document LM 0,00 0,03 0,06 0,08 0,11 0,14 submarine yellow we all live lived sailed sea beneath born found green he his i land life man our so submarines sun till told town us waves where who P(t|d) = ft,d |d|

Slide 13

Slide 13 text

Alternatively...

Slide 14

Slide 14 text

Scoring a query q = {sea, submarine} P(q|d) = P(“sea”|✓d ) · P(“submarine”|✓d )

Slide 15

Slide 15 text

Scoring a query q = {sea, submarine} P(q|d) = P(“sea”|✓d ) · P(“submarine”|✓d ) 0.04 0.0002 0.1 0.9 0.03602 t P(t|d) submarine 0,14 sea 0,04 ... t P(t|C) submarine 0,0001 sea 0,0002 ... (1 )P(“sea”|d) + P(“sea”|C)

Slide 16

Slide 16 text

Scoring a query q = {sea, submarine} P(q|d) = P(“sea”|✓d ) · P(“submarine”|✓d ) 0.14 0.0001 0.1 0.9 0.03602 t P(t|d) submarine 0,14 sea 0,04 ... t P(t|C) submarine 0,0001 sea 0,0002 ... (1 )P(“submarine”|d) + P(“submarine”|C) 0.12601 0.04538

Slide 17

Slide 17 text

Smoothing - Jelinek-Mercer smoothing - Smoothing parameter is - Same amount of smoothing is applied to all documents - Dirichlet smoothing - Smoothing parameter is - Smoothing is inversely proportional to the document length P(t|✓d ) = (1 )P(t|d) + P(t) µ p(t|✓d) = ft,d + µ · p(t) |d| + µ

Slide 18

Slide 18 text

Relation between Smoothing Methods - Jelinek Mercer: - by setting: - Dirichlet: P(t|✓d ) = (1 )P(t|d) + P(t) = µ |d| + µ (1 ) = |d| |d| + µ p(t|✓d) = ft,d + µ · p(t) |d| + µ

Slide 19

Slide 19 text

Practical Considerations - Since we are multiplying small probabilities, it's better to perform computations in the log space P(q|d) = Y t2q P(t|✓d)ft,q log P ( q|d ) = X t2q log P ( t|✓d) · ft,q score ( d, q ) = X t2q wt,d · wt,q

Slide 20

Slide 20 text

Exercise

Slide 21

Slide 21 text

Exercise GitHub: exercises/20161011-sol.xlsx

Slide 22

Slide 22 text

Exercise P(t|✓d ) = (1 )P(t|d) + P(t|C) Document language model computation

Slide 23

Slide 23 text

Exercise P(t|✓d ) = (1 )P(t|d) + P(t|C) Document language model computation

Slide 24

Slide 24 text

Exercise P(t|✓d ) = (1 )P(t|d) + P(t|C) Document language model computation

Slide 25

Slide 25 text

Exercise P(t|✓d ) = (1 )P(t|d) + P(t|C) Document language model computation

Slide 26

Slide 26 text

Exercise P(q="T2 T1"|D2) = P(T2|D2) * P(T1|D2) P(q|d) = Y t2q P(t|✓d)ft,q Scoring a query

Slide 27

Slide 27 text

Fielded Variants

Slide 28

Slide 28 text

Motivation - Documents are composed of multiple fields - E.g., title, body, anchors, etc. - Modeling internal document structure may be beneficial for retrieval

Slide 29

Slide 29 text

Example

Slide 30

Slide 30 text

Unstructured representation PROMISE Winter School 2013 Bridging between Information Retrieval and Databases Bressanone, Italy 4 - 8 February 2013 The aim of the PROMISE Winter School 2013 on "Bridging between Information Retrieval and Databases" is to give participants a grounding in the core topics that constitute the multidisciplinary area of information access and retrieval to unstructured, semistructured, and structured information. The school is a week-long event consisting of guest lectures from invited speakers who are recognized experts in the field. The school is intended for PhD students, Masters students or senior researchers such as post-doctoral researchers form the fields of databases, information retrieval, and related fields. [...]

Slide 31

Slide 31 text

Example Winter School 2013

PROMISE Winter School 2013

Bridging between Information Retrieval and Databases

Bressanone, Italy 4 - 8 February 2013

The aim of the PROMISE Winter School 2013 on "Bridging between Information Retrieval and Databases" is to give participants a grounding in the core topics that constitute the multidisciplinary area of information access and retrieval to unstructured, semistructured, and structured information. The school is a week-long event consisting of guest lectures from invited speakers who are recognized experts in the field. The school is intended for PhD students, Masters students or senior researchers such as post-doctoral researchers form the fields of databases, information retrieval, and related fields.

[...]

Slide 32

Slide 32 text

Fielded representation based on HTML markup title: Winter School 2013 meta: PROMISE, school, PhD, IR, DB, [...]
 PROMISE Winter School 2013, [...] headings: PROMISE Winter School 2013
 Bridging between Information Retrieval and Databases
 Bressanone, Italy 4 - 8 February 2013 body: The aim of the PROMISE Winter School 2013 on "Bridging between
 Information Retrieval and Databases" is to give participants a
 grounding in the core topics that constitute the multidisciplinary
 area of information access and retrieval to unstructured, 
 semistructured, and structured information. The school is a week-
 long event consisting of guest lectures from invited speakers who
 are recognized experts in the field. The school is intended for 
 PhD students, Masters students or senior researchers such as post-
 doctoral researchers form the fields of databases, information
 retrieval, and related fields.


Slide 33

Slide 33 text

In Web Search: Links - Links are a key component of the Web - Important for navigation, but also for search - Both the anchor text and the destination link are used by search engines Example website Anchor text Destination link

Slide 34

Slide 34 text

Anchor Text - Anchor text tends to be short, descriptive, and similar to query text - Usually written by people who are not the authors of the destination page - Can describe a destination page from a different perspective, or emphasize the most important aspect of the page from a community viewpoint

Slide 35

Slide 35 text

Anchor Text - Collection of anchor text in all links pointing to a given page are used as a description of the content of the destination page - I.e., added as an additional document field - Retrieval experiments have shown that anchor text has significant impact on effectiveness for some types of queries - Essential for searches where the user is trying to find a homepage for a particular topic, person, or organization

Slide 36

Slide 36 text

Anchor Text List of winter schools in 2013: I’ll be presenting our work at a winter school in Bressanone, Italy. page1 page2 The PROMISE Winter School in will feature a range of IR lectures by experts from the field. page3

Slide 37

Slide 37 text

Anchor Text List of winter schools in 2013: pageX I’ll be presenting our work at a winter school in Bressanone, Italy. page1 page2 The PROMISE Winter School in will feature a range of IR lectures by experts from the field. page3 "winter school" "information 
 retrieval" "IR lectures"

Slide 38

Slide 38 text

Fielded Document Representation title: Winter School 2013 meta: PROMISE, school, PhD, IR, DB, [...]
 PROMISE Winter School 2013, [...] headings: PROMISE Winter School 2013
 Bridging between Information Retrieval and Databases
 Bressanone, Italy 4 - 8 February 2013 body: The aim of the PROMISE Winter School 2013 on "Bridging between
 Information Retrieval and Databases" is to give participants a
 grounding in the core topics that constitute the multidisciplinary
 area of information access and retrieval to unstructured, 
 semistructured, and structured information. The school is a week-
 long event consisting of guest lectures from invited speakers who
 are recognized experts in the field. [...] anchors: winter school
 information retrieval
 IR lectures Anchor text is added as a separate document field

Slide 39

Slide 39 text

Fielded Extension of Retrieval Models - BM25 => BM25F - LM => Mixture of Language Models (MLM)

Slide 40

Slide 40 text

BM25F - Extension of BM25 incorporating multiple fields - The soft normalization and term frequencies need to be adjusted - Original BM25: score ( d, q ) = X t2q ft,d · (1 + k1) ft,d + k1 · B · idft B = (1 b + b |d| avgdl ) where B is the soft normalization:

Slide 41

Slide 41 text

BM25F score ( d, q ) = X t2q ˜ ft,d k1 + ˜ ft,d · idft ˜ ft,d = X i wi ft,di Bi Combining term frequencies across fields Field weight Soft normalization for field i Bi = (1 bi + bi |di | avgdli ) Parameter b becomes field-specific

Slide 42

Slide 42 text

Mixture of Language Models - Build a separate language model for each field - Take a linear combination of them m X j=1 µj = 1 Field language model
 Smoothed with a collection model built
 from all document representations of the
 same type in the collection Field weights P(t|✓d) = X i µiP(t|✓di )

Slide 43

Slide 43 text

Field Language Model Empirical 
 field model
 Collection field model 
 Smoothing parameter
 Maximum
 likelihood 
 estimates P(t|✓di ) = (1 i)P(t|di) + iP(t|Ci) ft,di |di | P d0 ft,d0 i P d0 |d0 i |

Slide 44

Slide 44 text

Example q = { IR , winter , school } µ = {0.2, 0.1, 0.2, 0.5} fields = { title , meta , headings , body } P ( q|✓d) = P (“IR” |✓d) · P (“winter” |✓d) · P (“school” |✓d) P(“IR”|✓d ) = 0.2 · P(“IR”|✓d title ) + 0.1 · P(“IR”|✓d meta ) + 0.2 · P(“IR”|✓d headings ) + 0.2 · P(“IR”|✓d body ) 0.5

Slide 45

Slide 45 text

Parameter Estimation for Fielded Language Models - Smoothing parameter - Dirichlet smoothing with avg. representation length - Field weights - Heuristically (e.g., proportional to the length of text content in that field) - Empirically (using training queries) - Extensive parameter sweep - Computationally intractable for more than a few fields

Slide 46

Slide 46 text

Exercise

Slide 47

Slide 47 text

Document Importance

Slide 48

Slide 48 text

Motivation - There are query-independent factors determining a documents’ importance - Recency - Credibility - SPAM - …

Slide 49

Slide 49 text

Incorporating Document Importance - Typically a static score, computed at indexing time to influence the ranking - Sometimes called "boost factor" score 0( d, q ) = score ( d ) · score ( d, q ) Query-independent score
 "Static" document score Query-dependent score
 "Dynamic" document score

Slide 50

Slide 50 text

Using Language Models - Language models offer a theoretically sound way of incorporating document importance through document priors P(d|q) = P(q|d)P(d) P(q) / P(q|d)P(d) Document prior log P ( d|q ) / log P ( q|d ) + log P ( d ) - Computation in the log space:

Slide 51

Slide 51 text

Parameter Settings

Slide 52

Slide 52 text

Setting Parameter Values - Retrieval models often contain parameters that must be tuned to get best performance for specific types of data and queries - For experiments: - Use training and test data sets - If less data available, use cross-validation by partitioning the data into K subsets

Slide 53

Slide 53 text

Finding Parameter Values - Many techniques used to find optimal parameter values given training data - Standard problem in machine learning - In IR, often explore the space of possible parameter values by grid search ("brute force") - Perform a sweep over the possible parameter values of each parameter, e.g., from 0 to 1 in 0.1 steps