23
Language Models for Information Retrieval Andy Luong and Nikita Sudan

Language Models for Information Retrieval

Embed Size (px)

DESCRIPTION

Language Models for Information Retrieval. Andy Luong and Nikita Sudan. Outline. Language Model Types of Language Models Query Likelihood Model Smoothing Evaluation Comparison with other approaches. Language Model. - PowerPoint PPT Presentation

Citation preview

Page 1: Language Models for Information Retrieval

Language Models for Information RetrievalAndy Luong and Nikita Sudan

Page 2: Language Models for Information Retrieval

Outline Language Model Types of Language Models Query Likelihood Model Smoothing Evaluation Comparison with other approaches

Page 3: Language Models for Information Retrieval

Language Model A language model is a function that puts

a probability measure over strings drawn from some vocabulary.

Page 4: Language Models for Information Retrieval

Language Models

P(q|Md) instead of P(R=1|q,d)

Page 5: Language Models for Information Retrieval

Example Doc1: “frog said that toad likes frog” Doc2: “toad likes frog”

frog said that toad likes STOP

M1 1/6 1/6 1/6 .2

M2 1/3 0 0 1/3 .2

1/3 1/6

1/3

Page 6: Language Models for Information Retrieval

Example Continuedq = “frog likes toad”

P(q | M1) = (1/3)*(1/6)*(1/6)*0.8*0.8*0.2

P(q | M2) = (1/3)*(1/3)*(1/3)*0.8*0.8*0.2

P(q | M1) < P (S | M2)

frog said that toad likes STOP

M1 1/3 1/6 1/6 1/6 1/6 .2

M2 1/3 0 0 1/3 1/3 .2

Page 7: Language Models for Information Retrieval

Types of Language Models

CHAIN RULE

UNIGRAM LM

BIGRAM LM

Page 8: Language Models for Information Retrieval

Multinomial distribution

M is the size of the term vocabulary

Order Constraint Frequency

Page 9: Language Models for Information Retrieval

Query Likelihood Model

Page 10: Language Models for Information Retrieval

Query Likelihood ModelInfer LM for each documentEstimate P(q | Md(i))Rank documents based on

probabilities

Page 11: Language Models for Information Retrieval

MLE

Page 12: Language Models for Information Retrieval

Smoothing Basic Intuition

New word or unseen word in the document

P( t | Md ) = 0 Zero probabilities will make P ( q | Md) = 0

Why else should we smooth?

Page 13: Language Models for Information Retrieval

Smoothing ContinuedNon-occurring term

Probability Bound

Linear Interpolation Language Model

Page 14: Language Models for Information Retrieval

Example Doc1: “frog said that toad likes frog” Doc2: “toad likes frog”

frog said that toad likes

M1 1/3 1/6 1/6 1/6 1/6

M2 1/3 0 0 1/3 1/3

C 1/3 1/9 1/9 2/9 2/9

Page 15: Language Models for Information Retrieval

Example Continuedq = “frog said” λ = ½

P(q | M1) = [(1/3 + 1/3)*(1/2)] * [(1/6 + 1/9)*(1/2)]

= .046

P(q | M2) = [(1/3 + 1/3)*(1/2)] * [(0 + 1/9)*(1/2)] = .018

P(q | M1) > P (q | M2)

Page 16: Language Models for Information Retrieval

Evaluation Precision = (relevant documents ∩

retrieved documents)/ retrieved documents

Recall = (relevant documents ∩ retrieved documents)/ relevant documents

Page 17: Language Models for Information Retrieval

Tf-Idf The importance increases proportionally

to the number of times a word appears in the document but is offset by the frequency of the word in the corpus.

Page 18: Language Models for Information Retrieval

Ponte and Croft’s Experiments

Page 19: Language Models for Information Retrieval

Pros and Cons “Mathematically precise, conceptually

simple, computationally tractable and intuitively appealing.”

Relevancy is not captured

Page 20: Language Models for Information Retrieval

Query vs. Document Model

(a) Query Likelihood (b) Document Likelihood (c) Model Comparison

Page 21: Language Models for Information Retrieval

KL divergence

Page 22: Language Models for Information Retrieval

Thank you.

Page 23: Language Models for Information Retrieval

Questions?