Retrieval models II. IN4325 Information Retrieval

Similar documents
Ranked Retrieval (2)

RETRIEVAL MODELS. Dr. Gjergji Kasneci Introduction to Information Retrieval WS

PV211: Introduction to Information Retrieval

Language Models. Hongning Wang

Language Models. Web Search. LM Jelinek-Mercer Smoothing and LM Dirichlet Smoothing. Slides based on the books: 13

Language Models. CS6200: Information Retrieval. Slides by: Jesse Anderton

Information Retrieval Basic IR models. Luca Bondi

University of Illinois at Urbana-Champaign. Midterm Examination

Information Retrieval


A Study of Smoothing Methods for Language Models Applied to Information Retrieval

Latent Semantic Analysis. Hongning Wang

Chap 2: Classical models for information retrieval

Language Models and Smoothing Methods for Collections with Large Variation in Document Length. 2 Models

INFO 4300 / CS4300 Information Retrieval. slides adapted from Hinrich Schütze s, linked from

Chapter 10: Information Retrieval. See corresponding chapter in Manning&Schütze

CS 646 (Fall 2016) Homework 3

INFO 4300 / CS4300 Information Retrieval. slides adapted from Hinrich Schütze s, linked from

Language as a Stochastic Process

Midterm Examination Practice

INFO 630 / CS 674 Lecture Notes

Behavioral Data Mining. Lecture 2

Probabilistic Information Retrieval

Natural Language Processing. Statistical Inference: n-grams

ChengXiang ( Cheng ) Zhai Department of Computer Science University of Illinois at Urbana-Champaign

Information Retrieval

Language Models, Smoothing, and IDF Weighting

Lecture 13: More uses of Language Models

Boolean and Vector Space Retrieval Models

Boolean and Vector Space Retrieval Models CS 290N Some of slides from R. Mooney (UTexas), J. Ghosh (UT ECE), D. Lee (USTHK).

Lecture 3: Probabilistic Retrieval Models

Information Retrieval and Web Search Engines

Information Retrieval and Organisation

1 Information retrieval fundamentals

A REVIEW ARTICLE ON NAIVE BAYES CLASSIFIER WITH VARIOUS SMOOTHING TECHNIQUES

Natural Language Processing. Topics in Information Retrieval. Updated 5/10

Language Modelling: Smoothing and Model Complexity. COMP-599 Sept 14, 2016

Retrieval by Content. Part 2: Text Retrieval Term Frequency and Inverse Document Frequency. Srihari: CSE 626 1

Lecture 9: Probabilistic IR The Binary Independence Model and Okapi BM25

Cross-Lingual Language Modeling for Automatic Speech Recogntion

IR Models: The Probabilistic Model. Lecture 8

Modern Information Retrieval

Study Notes on the Latent Dirichlet Allocation

Machine Learning

Probabilistic Language Modeling

CS630 Representing and Accessing Digital Information Lecture 6: Feb 14, 2006

Machine Learning for natural language processing

Bayes Theorem & Naïve Bayes. (some slides adapted from slides by Massimo Poesio, adapted from slides by Chris Manning)

Latent Semantic Analysis. Hongning Wang

Machine Learning: Assignment 1

CS 572: Information Retrieval

Foundations of Natural Language Processing Lecture 5 More smoothing and the Noisy Channel Model

Comparing Relevance Feedback Techniques on German News Articles

CS276A Text Information Retrieval, Mining, and Exploitation. Lecture 4 15 Oct 2002

Empirical Methods in Natural Language Processing Lecture 10a More smoothing and the Noisy Channel Model

Text Mining. Dr. Yanjun Li. Associate Professor. Department of Computer and Information Sciences Fordham University

Modeling Environment

A Risk Minimization Framework for Information Retrieval

Homework 6: Image Completion using Mixture of Bernoullis

Text Categorization CSE 454. (Based on slides by Dan Weld, Tom Mitchell, and others)

Machine Learning for natural language processing

A Study of the Dirichlet Priors for Term Frequency Normalisation

Classification: Naïve Bayes. Nathan Schneider (slides adapted from Chris Dyer, Noah Smith, et al.) ENLP 19 September 2016

Be able to define the following terms and answer basic questions about them:

Outline for today. Information Retrieval. Cosine similarity between query and document. tf-idf weighting

9/12/17. Types of learning. Modeling data. Supervised learning: Classification. Supervised learning: Regression. Unsupervised learning: Clustering

CS 188: Artificial Intelligence Spring Today

Vector Space Scoring Introduction to Information Retrieval INF 141 Donald J. Patterson

Generative Models for Discrete Data

INFO 4300 / CS4300 Information Retrieval. slides adapted from Hinrich Schütze s, linked from

Document and Topic Models: plsa and LDA

Variable Latent Semantic Indexing

Scoring (Vector Space Model) CE-324: Modern Information Retrieval Sharif University of Technology

Natural Language Processing SoSe Words and Language Model

1 Probabilities. 1.1 Basics 1 PROBABILITIES

Language Modeling. Introduction to N-grams. Many Slides are adapted from slides by Dan Jurafsky

Why Language Models and Inverse Document Frequency for Information Retrieval?

Probabilistic Field Mapping for Product Search

Information Retrieval and Topic Models. Mausam (Based on slides of W. Arms, Dan Jurafsky, Thomas Hofmann, Ata Kaban, Chris Manning, Melanie Martin)

Language Modeling. Introduction to N-grams. Many Slides are adapted from slides by Dan Jurafsky

Fall CS646: Information Retrieval. Lecture 6 Boolean Search and Vector Space Model. Jiepu Jiang University of Massachusetts Amherst 2016/09/26

Knowledge Discovery and Data Mining 1 (VO) ( )

CS4705. Probability Review and Naïve Bayes. Slides from Dragomir Radev

Information Retrieval and Web Search

Scoring (Vector Space Model) CE-324: Modern Information Retrieval Sharif University of Technology

Pivoted Length Normalization I. Summary idf II. Review

Computational Cognitive Science

Classification Algorithms

1 Probabilities. 1.1 Basics 1 PROBABILITIES

Bayesian Networks. Motivation

Probability Review Lecturer: Ji Liu Thank Jerry Zhu for sharing his slides

N-grams. Motivation. Simple n-grams. Smoothing. Backoff. N-grams L545. Dept. of Linguistics, Indiana University Spring / 24

Classification & Information Theory Lecture #8

Lecture 2: N-gram. Kai-Wei Chang University of Virginia Couse webpage:

Web Information Retrieval Dipl.-Inf. Christoph Carl Kling

What is Text mining? To discover the useful patterns/contents from the large amount of data that can be structured or unstructured.

Topic Models. Brandon Malone. February 20, Latent Dirichlet Allocation Success Stories Wrap-up

Scoring (Vector Space Model) CE-324: Modern Information Retrieval Sharif University of Technology

PROBABILISTIC LATENT SEMANTIC ANALYSIS

Learning Bayesian Networks (part 1) Goals for the lecture

Transcription:

Retrieval models II IN4325 Information Retrieval 1

Assignment 1 Deadline Wednesday means as long as it is Wednesday you are still on time In practice, any time before I make it to the office on Thursday (~8am) is okay Amazon #instances still limited, please keep to 2-3 instances per run with m1.xlarge 15GB memory, 8 EC2 compute units the same as 8x m1.small Between 2-6 jobs ran yesterday at any time Hadoop is difficult to learn, but well worth it LinkedIn: do a job search on Hadoop or Big data 2

Assignment I public class CategoryPerPageMapper extends Mapper<Object, Text, Text, Text> { public void map(object key, Text value, Context context) throws Exception { SAXBuilder builder = new SAXBuilder(); Pattern catpattern = Pattern.compile("\\[\\[[cC]ategory:.*?]]"); Text emptytext = new Text(""); } } try { } String xml = value.tostring(); Reader in = new StringReader(xml); String content =""; Text title = new Text(); Document doc = builder.build(in); 3

Assignment I public class CategoryPerPageMapper extends Mapper<Object, Text, Text, Text> { SAXBuilder builder = new SAXBuilder(); Pattern catpattern = Pattern.compile("\\[\\[[cC]ategory:.*?]]"); Text emptytext = new Text(""); } public void map(object key, Text value, Context context) throws Exception { try { String xml = value.tostring(); Reader in = new StringReader(xml); String content =""; Text title = new Text(); Document doc = builder.build(in); } } 4

Assignment I Data-Intensive Text Processing with MapReduce by Jimmy Lin et al Highly recommended reading ~170 pages full of useful knowledge A lot of information about design patterns in MapReduce No cookbook (no source code) 5

Last time Term weighting strategies Vector space model Pivoted document length normalization 6

Today A look at relevance feedback The cluster hypothesis A first look at probabilistic models Language modeling 7

Vector space model In one slide A vector space model for automatic indexing. A classic paper by G. Salton et al. from 1975. tf idf t,d = tf t,d " idf t cos retrieval by A classic information retrieval model Corpus: a set of vectors in a vector space with one dimension for each term S(Q,D): cosine similarity between query and document vector D 1 = {cat,eats} D 2 = {dog} D 3 = {dog,eats,cat} 0.6 0.4 D 4 = {cat,cat} eats 0.2 0 0 dog 1 0.8 0.6 0.4 0.2 0 1 0.8 0.5 1 cat 1.5 2 8

The problem of synonymy Synonymy: different terms with the same meaning synset Users try to combat these situations by adding terms they see in the retrieved documents to the query WordNet 3.1 http://wordnet.princeton.edu/ 9

Automatic query reformulation independent of the user/results Word sense disambiguation Query expansion: additional query terms derived from a thesaurus or WordNet King 1968 (King 1968), (Martin Luther King), (Martin Luther King jr.) Query expansion through automatic thesaurus generation Query reformulation by spelling correction Martin Luter King Martin Luther King 10

Automatic query reformulation wrt. the user/results Given an initial set of results, relevance feedback can be Obtained explicitly/interactively (ask the user) +/- voting on the top results Inferred (observe the user) How long does the user spend on viewing document X? What is his eye movement on the result page? Assumed (observe the top results) Also called blind feedback, pseudo-relevance feedback The system takes the top returned results and assumes all of them to be relevant 11

Basic relevance feedback loop evolving information needs served user +- query feedback retrieval engine results top-retrieved results iterative refinement Idea: users do not know the corpus (difficult to come up with all possible query reformulations), easy though for the user to decide if a given document is relevant 12

Rocchio algorithm An algorithm to take advantage of relevance feedback Incorporates relevance feedback into the vector space model query space relevant vs. non-relevant Optimal query 13

Rocchio algorithm Theory Goal: query vector with max. similarity to the relevant documents and min. similarity to the non-relevant documents Cosine similarity based: q = argmax[sim( q,c r ) sim( q,c nr r )] q cosθ q = 1 C r " d j # 1 d j C r C nr " d j C nr d j Optimal query is the vector difference between centroids of the relevant and non-relevant documents 14

Rocchio algorithm Developed 1971 Given: a query and some knowledge about relevant/nonrelevant documents q m = q 0 + " 1 D r $ d j % & d j #D r 1 D nr $ d j #D nr d j original query known (non-)relevant documents Model parameters:, ", # 15

Rocchio algorithm Q: what are good weights for Find similar pages? Given: a query and some knowledge about relevant/nonrelevant documents q m = q 0 + " 1 D r $ d j % & d j #D r 1 D nr $ d j #D nr d j Higher alpha: large influence of original query Higher beta: large influence of the rel docs Higher gamma: go away from non-rel docs Q: should the weights change over time? X terms are added to the expanded query 16

Rocchio algorithm Graphically Due to the subtraction we may end up with negative term weights; ignore those. Initial query q 0 relevant vs. non-relevant revised query q m Use revised query for retrieval 17

Effects of relevance feedback S 4 S 5 Improves precision and recall precision = # rel. retrieved # retrieved recall = # rel. retrieved # relevant corpus Most important for recall Positive feedback more valuable than negative feedback (why?) γ<β Common values: = 1.0, " = 0.75, # = 0.15 Often only positive feedback: γ=0 P@10 R=5, Recall 0.4 0.8 0.3 0.6 18

Rocchio algorithm Empirical evaluation: Buckley et al. 1994 [7] What influence does Rocchio have on the effectiveness of a system? TREC routing task evaluation One long standing information need and new documents appear continuously, hundreds of positive qrels Query is updated depending on user feedback Effects studied of the #known relevant documents and #terms added to the query the more known relevant documents the better the more terms added to the query the better 19

Relevance feedback Issues unclear where to move to in the query space If the initial query performs poorly, an expanded version is likely to perform poorly too, even with relevance feedback Misspellings Cross-language retrieval (document vectors in other languages are not nearby) Total mismatch of searcher s vocabulary and collection vocabulary Relevance feedback can only work, if the cluster hypothesis holds 20

Cluster hypothesis Keith van Rijsbergen [2] Closely associated documents tend to be relevant to the same requests. Basic assumption of IR systems: relevant documents are more similar to each other than they are to non-relevant documents association between all document pairs (R-R), (R-NR) relevant docs (R) non-relevant docs (NR) 21

Cluster hypothesis Keith van Rijsbergen [2] Plot the relative frequency against the strength of association R-NR R-NR rel. freq. R-R rel. freq. R-R association association good separation high R-R association poor separation 22

Cluster hypothesis Keith van Rijsbergen [2] Clustering methods should Produce a stable clustering: no sudden changes when items are added Be tolerant to errors: small errors should lead to small changes in clustering Be independent of the initial item ordering Clustering fails Subsets of documents have very different important terms (Burma vs. Myanmar, TREC vs. CLEF) Queries that are inherently disjunctive (there is no document that contains all terms) Polysemy semantic approach: link both terms to the same concept in Wikipedia 23

Relevance feedback & users Not popular with users (4% on Excite search engine, 2000) Explicit feedback is difficut to get (makes interaction with the search interface cumbersome) Users get annoyed if after a feedback round the results do not (seemingly) get better Efficiency issues The longer the query, the longer it takes to process it Use top weighted query terms only, though according to Buckley [7], the more terms the better Up to 4000 terms per query 24

Pseudo-relevance feedback Blind relevance feedback No user Proxy for relevance judgments: assume top k documents to be relevant, same computation otherwise Works well in situations where many relevant documents appear in the top-k If the query performs well, pseudo-relevance feedback improves it further If the initial results are poor, they remain poor 25

Query expansion Users explicitly provide extra terms (instead of feedback on documents) Thesaurus-based expansion for the user No user input E.g. PubMed automatically expands the query 26

Query expansion Thesauri Can be built manually (time, money, people) Can be built automatically (co-occurrence statistics, large-scale corpora, processing power) Query reformulations based on log data Exploits manual data (*your* reformulation ideas) What about long-tail queries? 27

Hearst patterns Hearst [8] IS-A relations pluto Use simple patterns to decide on taxonomic relations asteroid planetoid celestial body natural object Pluto must be a planet 28

Hearst patterns Hearst [8] NP 0 such as {NP 1,NP 2,, (and or)} NP n American cars such as Chevrolet, Pontiac Such NP as {NP, }* {(or and)} NP such colors as red or orange NP {, NP}* {,} or other NP NP {, NP}* {,} and other NP NP {,} including {NP,}* {or and} NP NP {,} especially {NP,}* {or and} NP Bootstrapping the discovery of new patterns 1. Use standard patterns to find entity pairs 2. Where else do these pairs co-occur and with what terms? 29

A new type of retrieval models 30

Probabilistic models Binary independence model 2-Poisson model Language modeling * 31

Basic probabilities P(A, B) = P(A B)P(B) = P(B A)P(A) joint probability cond. probability chain rule P(A B) = P(B A) P(A) P(B) Bayes Theorem P(B) = P(A, B) + P(A, B) partition rule 32

Probabilistic models in IR uncertain understanding of information need Information need query query representation matching uncertain guess of relevance documents document representation P(D Q) = P(Q D) P(D) P(Q) central equation to language modeling 33

Probabilistic models in IR Probability models have a sounder theoretical foundation (reasoning under uncertainty) than boolean or vector space models And they usually perform better Documents are ranked according to their probability of being relevant, they are ranked accoring to P(D Q) Many models exist We start with language modeling 34

Language modeling Ponte & Croft, 1998. P(D Q) = P(Q D) P(D) P(Q) Idea: rank the documents by the likelihood of the query according to the language model CSKA If we throw all terms into a bag and randomly draw terms, for which document is the probability greater of drawing CSKA? Pontus Wernbloom's last-minute volley earned a draw to keep CSKA Moscow in the hunt in their last-16 Champions League match against Real Madrid. Real had looked set to return to Spain with a lead at the tie's halfway stage, but paid for their wastefulness. Cristiano Ronaldo fired under Sergei Chepchugov to open the scoring but fluffed a fine 84th-minute chance. CSKA had rarely threatened but Wernbloom crashed home with virtually the game's final kick to snatch a draw. Greece has avoided a nightmare scenario by agreeing to a 130bn euros ( 110bn; $170bn) bailout deal, Finance Minister Evangelos Venizelos has said. He said the deal was probably the most important in Greece's post-war history. The cabinet was meeting to discuss how to pass the reforms stipulated by international lenders, which include huge spending cuts and beefed-up monitoring by eurozone officials. Trade unions have called strikes and protests for Wednesday. 35

Language modeling Query Q is generated by a probabilistic model based on document D Pontus Wernbloom's last-minute volley earned a draw to keep CSKA Moscow in the hunt in their last-16 Champions League match against Real Madrid. Real had looked set to return to Spain with a lead at the tie's halfway stage, but paid for their wastefulness. Cristiano Ronaldo fired under Sergei Chepchugov to open the scoring but fluffed a fine 84th-minute chance. CSKA had rarely threatened but Wernbloom crashed home with virtually the game's final kick to snatch a draw. posterior likelihood prior P(D Q) P(Q D) " P(D) Goal Hard Relatively easy Ignore for now P(Q)has no use to 0.0617 the 0.0493 a 0.0493 s 0.0370 but 0.0370 in 0.0246 their 0.0246 with 0.0246 wernbloom 0.0246 real 0.0246 had 0.0246 draw 0.0246 cska 0.0246 moscow 0.0123 Maximum likelihood estimate 36

Language modeling uniform P(D Q) P(Q D) " P(D) Unigram (multinomial) language model: i P(Q D) = P(q i D) Assuming term independence makes the problem more tractable Problem reduced to estimating P(q i D) term frequencies What about the IDF component? (none in LM) 37

Language modeling Smoothing i P(Q D) = P(q i D) Q = {CSKA, Moscow,Greece} P(Q D) = P(CSKA D)P(Moscow D)P(Greece D) P(Q D) = 0.0246 " 0.0123" 0 P(Q D) = 0 Smoothing methods smooth the document s language model (maximum likelihood prob. distribution) to avoid terms with zero probability 38

Language modeling Smoothing 0.06 maximum likelihood smoothed (JM) 0.05 P(term ID) 0.04 0.03 0.02 Smoothing removes Some prob. Mass From the original ML Distribution and gives It to the zero terms Non-zero probability 0.01 0 10 20 30 40 50 60 70 80 90 100 term ID 39

Language modeling Smoothing Smoothing methods consider 2 distributions Model P seen (t D) for terms occurring in the document Model P unseen (t D) for unseen terms not in the document log P(Q D) = log P(q i D) c(w; D) count of word w in D i i:c(q i :D)>0 i:c(q i; D)=0 = log P seen (q i D) + log P unseen (q i D) i:c(q i D)>0 = log P seen(q i D) P unseen (q i D) + log P unseen(q i D) i + i:c(q i :D)>0 i:(q i ;D)>0 log P unseen (q i D) log P unseen (q i D) 40

Language modeling Smoothing P unseen (w) is typically proportional of w P unseen (q i D) = d P(q i ) to the general frequency document dependent constant collection language model (previous slide) i:c(q i D)>0 log P(Q D) = log P seen(q i D) i:c(q i D)>0 P unseen (q i D) + log P (q D) unseen i i i = log P seen(q i D) " d P(q i ) + nlog" + log P(q ) d i term weight query length doc. independent prob. mass to unseen words 41

Language modeling Smoothing log P(Q D) log P seen(q i D) # " d P(q i ) + nlog" d i:c(q i D)>0 What happens to Similar to IDF P(q i ) if the query term is a stopword? nlog d : product of a document dependent constant and the query lengh Longer documents should receive less smoothing (greater penalty if a query term is missing) Similar to document length normalization 42

Language modeling Smoothing How to smooth P(w D) in practice? We look at 3 ideas (there are more) P ml (w D) = w c(w; D) c(w; D) General idea: discount probabilities of seen words, assign extra probability mass to unseen words with a fallback model (the collection language model) P(w D) = " P smoothed (w D) if word w is seen # $ d P(w ) otherwise all probabilities must sum to one. Laplace smoothing: simplest approach Add one count to every word P laplace (w D) = w c(w; D) +1 ( c(w; D) +1 ) 43

Language modeling Smoothing Jelineck-Mercer (JM) smoothing Linear interpolation between ML and collection LM P (w D) = (1" )P ml (w D) + P(w ), #(0,1) parameter controls amount of smoothing Term-dependent Jelineck-Mercer smoothing P w (w D) = (1" w )P ml (w D) + w P(w ) Different terms are smoothed to different degrees 44

Language modeling Smoothing Dirichlet smoothing * What is the effect of the denominator when D =100 and D =1000? P µ (w D) = c(w; D) + µp(w ) c(w; D) + µ w, usually µ > 100 The longer the document, the less smoothing is applied Absolute discounting subtract constant from counts P (w D) = max(c(w; D) ",0) c(w; D) # w + $ P(w ), %(0,1) and $ = D unique D all 45

Assignment II Retrieval experiments You will get a number of queries to run on the Wikipedia corpus (training data) You have to implement the vector space model + 1 modification (term normalization, language modeling, your own ideas) I make sure the output format and everything else is clear We will run a benchmark between the groups 46

Sources Introduction to Information Retrieval. Manning et al. 2008 Information retrieval. Keith van Rijsbergen, 1979. Managing gigabytes, Witten et al. 1999. The probability ranking principle in IR, S.E. Robertson, 1977 A study of smoothing methods for language models applied to ad hoc information retrieval. Zhai & Lafferty. 2001. The importance of prior probabilities for entry page search. Kraaij et al. 2002. The effect of adding relevance information in a relevance feedback environment. Buckley et al. 1994 Automatic acquisition of hyponyms from large text corpora. MA Hearst. 1992. 47