CS 276 A Text Information Retrieval Mining and

  • Slides: 47
Download presentation
CS 276 A Text Information Retrieval, Mining, and Exploitation Lecture 6 22 Oct 2002

CS 276 A Text Information Retrieval, Mining, and Exploitation Lecture 6 22 Oct 2002

This week’s topics n Classical probabilistic retrieval model n n n Bayesian networks for

This week’s topics n Classical probabilistic retrieval model n n n Bayesian networks for text retrieval Language model approach to IR n n Probability ranking principle, etc. An important emphasis in recent work Tuesday Thursday Probabilistic methods are one of the oldest but also one of the currently hottest topics in IR. n Traditionally: neat ideas, but they’ve never won on performance. It may be different now.

Why probabilities in IR? User Information Need Query Representation How to match? Documents Document

Why probabilities in IR? User Information Need Query Representation How to match? Documents Document Representation Key: system’s model of querydoc proximity In traditional IR systems, matching between each document and query is attempted in the very semantically imprecise space of index terms

The document ranking problem n n Collection of documents User issues a query A

The document ranking problem n n Collection of documents User issues a query A list of documents needs to be returned Ranking method is core of an IR system: n n n In what order do we present documents to the user? We want the “best” document to be first, second best second, etc…. Idea: Rank by probability of relevance of the document w. r. t. information need

Why use probabilities? n Information Retrieval deals with uncertain information n Infer whether a

Why use probabilities? n Information Retrieval deals with uncertain information n Infer whether a document is relevant to a user’s information need (imperfectly expressed by a query) Probability theory seems the most natural way to quantify uncertainty The classical probabilistic IR approach attempts to model precisely this: n P(relevant|documenti, query)

Why use probabilities? Standard IR techniques n Empirical for most part n n success

Why use probabilities? Standard IR techniques n Empirical for most part n n success measured by experimental results Probabilistic IR n Probability Ranking Principle n Few properties provable n Sometimes you want to analyze properties of methods n Probabilistic Inference n n provable “minimization of risk” “justify” your decision Nice theory n Performance benefits unclear

Recall a few probability basics n Bayes’ Rule Prior Posterior n Odds:

Recall a few probability basics n Bayes’ Rule Prior Posterior n Odds:

The Probability Ranking Principle “If a reference retrieval system's response to each request is

The Probability Ranking Principle “If a reference retrieval system's response to each request is a ranking of the documents in the collection in order of decreasing probability of relevance to the user who submitted the request, where the probabilities are estimated as accurately as possible on the basis of whatever data have been made available to the system for this purpose, the overall effectiveness of the system to its user will be the best that is obtainable on the basis of those data. ” n [1960 s/1970 s] S. Robertson, W. S. Cooper, M. E. Maron; van Rijsbergen (1979: 113); Manning & Schütze (1999: 538)

Probability Ranking Principle Let x be a document in the collection. Let R represent

Probability Ranking Principle Let x be a document in the collection. Let R represent relevance of a document w. r. t. given (fixed) query and let NR represent non-relevance. R={0, 1} vs. NR/R Need to find p(R|x) - probability that a document x is relevant. p(R), p(NR) - prior probability of retrieving a (non) relevant document p(x|R), p(x|NR) - probability that if a relevant (non-relevant) document is retrieved, it is x.

Probability Ranking Principle n n Simple case: no selection costs or other utility concerns

Probability Ranking Principle n n Simple case: no selection costs or other utility concerns Bayes’ Decision Rule n x is relevant iff p(R|x) > p(NR|x) n PRP in action: Rank all documents by p(R|x) n Theorem: n n Using the PRP is optimal, in that it minimizes the loss (Bayes risk) under 1/0 loss Provable if all probabilities correct, etc.

Probability Ranking Principle n More complex case: retrieval costs. n C - cost of

Probability Ranking Principle n More complex case: retrieval costs. n C - cost of retrieval of relevant document n C’ - cost of retrieval of non-relevant n n document let d be a document Probability Ranking Principle: if for all d’ not yet retrieved, then d is the next document to be retrieved n We won’t further consider loss/utility from now on

Probability Ranking Principle n How do we compute all those probabilities? n n n

Probability Ranking Principle n How do we compute all those probabilities? n n n Do not know exact probabilities, have to use estimates Binary Independence Retrieval (BIR) is simplest model Questionable assumptions n “Relevance” of each document is independent of relevance of other documents. n n n Really, it’s bad to keep on returning duplicates Boolean model of relevance That one has a single step information need n Seeing a range of results might let user refine query

Probabilistic Retrieval Strategy n Estimate how terms contribute to relevance n How do tf,

Probabilistic Retrieval Strategy n Estimate how terms contribute to relevance n How do tf, df, and length influence your judgments about document relevance? (Okapi) n Combine to find document relevance probability n Order documents by decreasing probability

Binary Independence Model n n Traditionally used in conjunction with PRP “Binary” = Boolean:

Binary Independence Model n n Traditionally used in conjunction with PRP “Binary” = Boolean: documents are represented as binary vectors of terms: n n iff term i is present in document x. n “Independence”: terms occur in documents independently Different documents can be modeled as same vector n Bernoulli Naive Bayes model (cf. text categorization!) n

Binary Independence Model n n Queries: binary vectors of terms Given query q, n

Binary Independence Model n n Queries: binary vectors of terms Given query q, n for each document d need to compute p(R|q, d). n replace with computing p(R|q, x) where x is vector representing d Interested only in ranking Will use odds and Bayes’ Rule:

Binary Independence Model Constant for each query • Using Independence Assumption: • So :

Binary Independence Model Constant for each query • Using Independence Assumption: • So : Needs estimation

Binary Independence Model • Since xi is either 0 or 1: • Let •

Binary Independence Model • Since xi is either 0 or 1: • Let • Assume, for all terms not occurring in the query (qi=0) Then. . . This can be changed (for query expansion)

Binary Independence Model All matching terms Non-matching query terms All query terms

Binary Independence Model All matching terms Non-matching query terms All query terms

Binary Independence Model Constant for each query • Retrieval Status Value: Only quantity to

Binary Independence Model Constant for each query • Retrieval Status Value: Only quantity to be estimated for rankings

Binary Independence Model • All boils down to computing RSV. Linear Discriminant Function So,

Binary Independence Model • All boils down to computing RSV. Linear Discriminant Function So, how do we compute ci’s from our data ?

Binary Independence Model • Estimating RSV coefficients. • For each term i look at

Binary Independence Model • Estimating RSV coefficients. • For each term i look at the following table: • Estimates: Log odds ratio. Add 0. 5 to every expression

Estimation – key challenge n n If non-relevant documents are approximated by whole collection,

Estimation – key challenge n n If non-relevant documents are approximated by whole collection, then ri is n/N and n log (1– ri)/ri = log (N– n)/n ≈ log N/n = IDF! pi (probability of occurrence in relevant documents) can be estimated in various ways: n from relevant documents if know some n n n Relevance weighting can be used in feedback loop constant (Croft and Harper combination match) – then just get idf weighting of terms proportional to probability of occurrence in collection n more accurately, to log of this (Greiff, SIGIR 1998)

Removing term independence n n n In general, index terms aren’t independent Dependencies can

Removing term independence n n n In general, index terms aren’t independent Dependencies can be complex van Rijsbergen (1979) proposed simple tree dependencies n n n Cf. Friedman and Goldszmidt’s Tree Augmented Naive Bayes (AAAI 13, 1996) Each term dependent on one other Estimation problems held back success of this model

PRP and BIR n n Getting reasonable approximations of probabilities is possible. Requires restrictive

PRP and BIR n n Getting reasonable approximations of probabilities is possible. Requires restrictive assumptions: n term independence n terms not in query don’t affect the outcome n boolean representation of documents/queries/relevance n document relevance values are independent Some of these assumptions can be removed Problem: either require partial relevance information or only can derive inferior term weights

Bayesian Networks for Text Retrieval n Standard probabilistic model assumes you can’t estimate P(R|D,

Bayesian Networks for Text Retrieval n Standard probabilistic model assumes you can’t estimate P(R|D, Q) n n n Instead assume independence and use P(D|R) But maybe you can with a Bayesian network* What is a Bayesian network? n n A directed acyclic graph Nodes n Events or Variables n n n Links n Assume values. For our purposes, all Boolean model direct dependencies between nodes

Bayesian Networks for Text Retrieval a, b, c - propositions (events). • Bayesian networks

Bayesian Networks for Text Retrieval a, b, c - propositions (events). • Bayesian networks model causal relations between events a b p(a) c p(c|ab) for all values for a, b, c p(b) Conditional dependence • Running Bayesian Nets: • Given probability distributions for roots and conditional probabilities can compute apriori probability of any instance • Fixing assumptions (e. g. , b was observed) will cause recomputation of probabilities For more information see: R. G. Cowell, A. P. Dawid, S. L. Lauritzen, and D. J. Spiegelhalter. 1999. Probabilistic Networks and Expert Systems. Springer Verlag. J. Pearl. 1988. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan-Kaufman.

Toy Example Finals (f) No Sleep (n) Project Due (d) Gloom (g) Triple Latte

Toy Example Finals (f) No Sleep (n) Project Due (d) Gloom (g) Triple Latte (t)

Links as dependencies n Conditional Probability Table = Link Matrix n Attached to each

Links as dependencies n Conditional Probability Table = Link Matrix n Attached to each node n n Nodes with no parent get a “prior probability” n n Give influences of parents on that node. e. g. , f, d. interior node : conditional probability of all combinations of values of its parents n e. g. , n, g, t.

Independence Assumption n Variables not connected by a link: no direct conditioning. Joint probability

Independence Assumption n Variables not connected by a link: no direct conditioning. Joint probability - obtained from link matrices. See examples on next slide.

Independence Assumption Finals (f) No Sleep (n) Project Due (d) Gloom (g) • Independence

Independence Assumption Finals (f) No Sleep (n) Project Due (d) Gloom (g) • Independence assumption: P(t|g f)=P(t|g) • Joint probability P(f d n g t) =P(f) P(d) P(n|f) P(g|f d) P(t|g) Triple Latte (t)

Chained inference n n Evidence - a node takes on some value Inference n

Chained inference n n Evidence - a node takes on some value Inference n Compute belief (probabilities) of other nodes n n conditioned on the known evidence n Two kinds of inference: Diagnostic and n General network: NP-hard Predictive Computational complexity n n polytree networks are easily tractable much other work on efficient exact and approximate Bayesian network inference

Diagnostic Inference n n Propagate beliefs through parents of a node Inference rule a

Diagnostic Inference n n Propagate beliefs through parents of a node Inference rule a bi c

Diagnostic inference Finals (f) No Sleep (n) Evidence: n=true Belief: P(f|n)=? Project Due (d)

Diagnostic inference Finals (f) No Sleep (n) Evidence: n=true Belief: P(f|n)=? Project Due (d) Gloom (g) Triple Latte (t)

Diagnostic inference Normalize

Diagnostic inference Normalize

Predictive Inference n n Compute belief of child nodes of evidence Inference rule a

Predictive Inference n n Compute belief of child nodes of evidence Inference rule a bi c

Model for Text Retrieval n Goal n n Given a user’s information need (evidence),

Model for Text Retrieval n Goal n n Given a user’s information need (evidence), find probability a doc satisfies need Retrieval model n n Model docs in a document network Model information need in a query network

Bayesian Nets for IR: Idea Document Network di -documents d 1 d 2 ti.

Bayesian Nets for IR: Idea Document Network di -documents d 1 d 2 ti. Large, - document but representations t 1 t 2 ri. Compute - “concepts” once for each document collection r 1 r 2 r 3 c 1 c 2 q 1 dn tn rk ci - query concepts cm Small, compute once for every query qi - high-level concepts q 2 Query Network I I - goal node

Bayesian Nets for IR: Roadmap n n Construct Document Network (once !) For each

Bayesian Nets for IR: Roadmap n n Construct Document Network (once !) For each query n n Construct best Query Network Attach it to Document Network Find subset of di’s which maximizes the probability value of node I (best subset). Retrieve these di’s as the answer to query.

Bayesian nets for text retrieval Documents d 1 r 1 d 2 r 3

Bayesian nets for text retrieval Documents d 1 r 1 d 2 r 3 Terms r 2 c 1 c 2 c 3 q 1 Document Network Concepts q 2 Query operators (AND/OR/NOT) i Information need Query Network

Link matrices and probabilities n n Prior doc probability P(d) = 1/n P (r|

Link matrices and probabilities n n Prior doc probability P(d) = 1/n P (r| d ) n n within-document term frequency tf idf - based n P (c| r) n n n 1 -to-1 thesaurus P(q|c): canonical forms of query operators n Always use things like AND and NOT – never store a full CPT* *conditional probability table

Example Macbeth Hamlet reason trouble OR double two NOT User query Document Network Query

Example Macbeth Hamlet reason trouble OR double two NOT User query Document Network Query Network

Extensions n n Prior probs don’t have to be 1/n. “User information need” doesn’t

Extensions n n Prior probs don’t have to be 1/n. “User information need” doesn’t have to be a query - can be words typed, in docs read, any combination … Phrases, inter-document links Link matrices can be modified over time. n n User feedback. The promise of “personalization”

Computational details n n n Document network built at indexing time Query network built/scored

Computational details n n n Document network built at indexing time Query network built/scored at query time Representation: n n n Link matrices from docs to any single term are like the postings entry for that term Canonical link matrices are efficient to store and compute Attach evidence only at roots of network n Can do single pass from roots to leaves

Exercise n Consider ranking docs for a 1 -term query. What is the difference

Exercise n Consider ranking docs for a 1 -term query. What is the difference between n n A cosine-based vector-space ranking where each doc has tf idf components, normalized; A Bayes net in which the link matrices on the docs-to-term links are normalized tf idf?

Bayes Nets in IR n Flexible ways of combining term weights, which can generalize

Bayes Nets in IR n Flexible ways of combining term weights, which can generalize previous approaches n n Boolean model Binary independence model Probabilistic models with weaker assumptions Efficient large-scale implementation n In. Query text retrieval system from U Mass n Turtle and Croft (1990) [Commercial version defunct? ] n Need approximations to avoid intractable inference Need to estimate all the probabilities by some means (whether more or less ad hoc) n Much new Bayes net technology yet to be applied? n

Resources S. E. Roberson and K. Spärck Jones. 1976. Relevance Weighting of Search Terms.

Resources S. E. Roberson and K. Spärck Jones. 1976. Relevance Weighting of Search Terms. Journal of the American Society for Information Sciences 27(3): 129– 146. C. J. van Rijsbergen. 1979. Information Retrieval. 2 nd ed. London: Butterworths, chapter 6. [Most details of math] http: //www. dcs. gla. ac. uk/Keith/Preface. html N. Fuhr. 1992. Probabilistic Models in Information Retrieval. The Computer Journal, 35(3), 243– 255. [Easiest read, with BNs] F. Crestani, M. Lalmas, C. J. van Rijsbergen, and I. Campbell. 1998. Is This Document Relevant? . . . Probably: A Survey of Probabilistic Models in Information Retrieval. ACM Computing Surveys 30(4): 528– 552. http: //www. acm. org/pubs/citations/journals/surveys/1998 -30 -4/p 528 -crestani/ [Adds very little material that isn’t in van Rijsbergen or Fuhr – indeed it sometimes copies them with few changes]

Resources H. R. Turtle and W. B. Croft. 1990. Inference Networks for Document Retrieval.

Resources H. R. Turtle and W. B. Croft. 1990. Inference Networks for Document Retrieval. Proc. ACM SIGIR: 1 -24. E. Charniak. Bayesian nets without tears. AI Magazine 12(4): 50 -63 (1991). http: //www. aaai. org/Library/Magazine/Vol 12/12 -04/vol 12 -04. html D. Heckerman. 1995. A Tutorial on Learning with Bayesian Networks. Microsoft Technical Report MSR-TR-95 -06 http: //www. research. microsoft. com/~heckerman/ N. Fuhr. 2000. Probabilistic Datalog: Implementing Logical Information Retrieval for Advanced Applications. Journal of the American Society for Information Science 51(2): 95– 110. R. K. Belew. 2001. Finding Out About: A Cognitive Perspective on Search Engine Technology and the WWW. Cambridge UP 2001. MIR 2. 5. 4, 2. 8