Algorithm Search⌘K

Modelcore

Binary independence model

Also called BIM, Robertson-Sparck Jones model.

A probabilistic model with binary term occurrence and term independence given relevance, giving the Robertson-Sparck Jones term weight.

The binary independence model describes a document only by which terms it contains, and it assumes that these occurrences are independent random events within the relevant documents and within the non-relevant documents. With the probability ranking principle and Bayes' theorem, ranking by the odds of relevance becomes a sum over the query terms present in the document of one weight for each term, the Robertson-Sparck Jones weight. With judged documents the weight is estimated from a 2 by 2 table of counts, and with no judgments it becomes an idf. The model ignores how often a term occurs, which BM25 adds.

The machine

Events. For a query qq, a document dd is the vector x=(xt)t∈Vx = (x_t)_{t \in V} with xt=1x_t = 1 if term tt occurs in dd and xt=0x_t = 0 if not. Relevance R∈{0,1}R \in \{0, 1\} is a random event. For each term let

pt=P(xt=1∣R=1),ut=P(xt=1∣R=0).p_t = P(x_t = 1 \mid R = 1), \qquad u_t = P(x_t = 1 \mid R = 0).

Assumptions.

  1. Binary independence. Given R=1R = 1, the xtx_t are independent, and the same holds given R=0R = 0: P(x∣R)=∏tP(xt∣R)P(x \mid R) = \prod_t P(x_t \mid R).
  2. Terms outside the query do not help. For t∉qt \notin q, pt=utp_t = u_t.

Derivation. By Bayes' theorem the odds of relevance are

O(R∣x)=P(R=1∣x)P(R=0∣x)=O(R)∏tP(xt∣R=1)P(xt∣R=0).O(R \mid x) = \frac{P(R = 1 \mid x)}{P(R = 0 \mid x)} = O(R) \prod_{t} \frac{P(x_t \mid R = 1)}{P(x_t \mid R = 0)}.

By assumption 2 only the query terms give a factor different from 1. Split them into those present and those absent, and multiply and divide by ∏t∈q∩d(1−pt)/(1−ut)\prod_{t \in q \cap d} (1 - p_t)/(1 - u_t):

O(R∣x)=O(R)∏t∈q1−pt1−ut⋅∏t∈q∩dpt(1−ut)ut(1−pt).O(R \mid x) = O(R) \prod_{t \in q} \frac{1 - p_t}{1 - u_t} \cdot \prod_{t \in q \cap d} \frac{p_t (1 - u_t)}{u_t (1 - p_t)}.

The first two factors are the same for every document. A logarithm is increasing, so the order of the documents is the order of the retrieval status value

RSV(d)=∑t∈q∩dct,ct=ln⁡pt(1−ut)ut(1−pt).\mathrm{RSV}(d) = \sum_{t \in q \cap d} c_t, \qquad c_t = \ln \frac{p_t (1 - u_t)}{u_t (1 - p_t)}.

The weight ctc_t is the log odds ratio of term tt: the log of the odds that tt occurs in a relevant document over the odds that it occurs in a non-relevant one.

Estimates with relevance information. Let NN be the number of documents, ntn_t the number that contain tt, RR the number of known relevant documents and rtr_t the number of those that contain tt. Then pt≈rt/Rp_t \approx r_t/R and ut≈(nt−rt)/(N−R)u_t \approx (n_t - r_t)/(N - R). Adding 0.5 to each of the four cells of the table avoids zeros and gives the Robertson-Sparck Jones weight, with the natural log:

wt=ln⁡(rt+0.5)(N−nt−R+rt+0.5)(nt−rt+0.5)(R−rt+0.5).w_t = \ln \frac{(r_t + 0.5)(N - n_t - R + r_t + 0.5)}{(n_t - r_t + 0.5)(R - r_t + 0.5)}.

Estimates with no relevance information. Croft and Harper (1979) take ptp_t to be the same constant for all query terms and estimate utu_t by nt/Nn_t/N, because almost all documents are not relevant. The weight becomes C+ln⁡((N−nt)/nt)C + \ln((N - n_t)/n_t) with C=ln⁡(p/(1−p))C = \ln(p/(1 - p)). For p=0.5p = 0.5, C=0C = 0. The Robertson-Sparck Jones weight with R=rt=0R = r_t = 0 is the same form with the 0.5 corrections, ln⁡((N−nt+0.5)/(nt+0.5))\ln((N - n_t + 0.5)/(n_t + 0.5)). This is a probabilistic idf. It is 0 when nt=N/2n_t = N/2 and negative when more than half of the documents contain tt.

Example. On the toy collection of the information retrieval pages, N=8N = 8. For q1 = "sorted array search" the judged relevant documents are d1d_1, d2d_2 and d8d_8, so R=3R = 3:

term ntn_t rtr_t weight with R=3R = 3 weight with no judgments
sorted 4 3 ln⁡3.5⋅4.51.5⋅0.5=ln⁡21=3.0445\ln \frac{3.5 \cdot 4.5}{1.5 \cdot 0.5} = \ln 21 = 3.0445 ln⁡4.54.5=0\ln \frac{4.5}{4.5} = 0
array 3 3 ln⁡3.5⋅5.50.5⋅0.5=ln⁡77=4.3438\ln \frac{3.5 \cdot 5.5}{0.5 \cdot 0.5} = \ln 77 = 4.3438 ln⁡5.53.5=0.4520\ln \frac{5.5}{3.5} = 0.4520
search 2 1 ln⁡1.5⋅4.51.5⋅2.5=ln⁡1.8=0.5878\ln \frac{1.5 \cdot 4.5}{1.5 \cdot 2.5} = \ln 1.8 = 0.5878 ln⁡6.52.5=0.9555\ln \frac{6.5}{2.5} = 0.9555

With the judgments, RSV(d1)=3.0445+4.3438+0.5878=7.9761\mathrm{RSV}(d_1) = 3.0445 + 4.3438 + 0.5878 = 7.9761, then d2d_2 and d8d_8 tie at 7.38837.3883 and come in id order, then d4d_4 (3.0445) and d7d_7 (0.5878). All three relevant documents are on top. "Search" gets a small weight because the non-relevant d7d_7 contains it and two of the three relevant documents do not. These weights were fitted to the same judgments they are tested on, so the result is optimistic.

With no judgments the order is d1d_1 (1.4075), d7d_7 (0.9555), d2d_2 and d8d_8 (0.4520, in id order) and d4d_4 (0). Here "sorted" is in exactly half of the documents and adds nothing. The document d2d_2 holds "sorted" twice and gets the same score as d8d_8, because the model sees only presence.

What it counts

  • Parameters. Two probabilities ptp_t and utu_t for each query term, estimated from the counts NN, ntn_t, RR and rtr_t. All other terms are ignored.
  • Score. A sum of one weight for each query term present, a linear function of the binary vector xx restricted to the query terms. Its value is the log odds of relevance up to a constant for the query. The order of documents is what matters, by the probability ranking principle.
  • Cost. Scoring reads the posting lists of the query terms, O(∑t∈qnt)O(\sum_{t \in q} n_t) postings, and needs no term frequencies.

Relation to other models

  • Probability ranking principle. The model is a way to estimate the order of P(R=1∣d)P(R = 1 \mid d), which the principle says to rank by.
  • Naive Bayes. The two assumptions are those of a Bernoulli naive Bayes classifier with the classes relevant and non-relevant and with features restricted to the query terms. The RSV is its log odds up to a constant. Logistic regression fits the same linear form directly, without the independence assumption.
  • Tf-idf. The weight with no relevance information is an idf, which gives the tf-idf idf factor a probabilistic reading (Robertson 2004).
  • Coordination level. With the constant CC of Croft and Harper large compared with the idf part, each extra matching query term counts more than any difference of idf. The order is then first by the number of query terms matched, as in coordination level matching, a step from the Boolean model toward ranking.
  • Relevance feedback. Each new judged document updates RR and rtr_t, and so the weights. This is the probabilistic form of relevance feedback, and taking the top documents of a first search as relevant is pseudo-relevance feedback.
  • Term frequency. The two-Poisson model replaces presence by a hidden eliteness of the document for the term, which leads to the saturating tf of BM25. BM25 keeps the Robertson-Sparck Jones weight as its idf.

Known results in the model

  • Ranking by the RSV is the probability ranking. Under the two assumptions, the derivation above is exact. The order by RSV\mathrm{RSV} is the order by P(R=1∣d)P(R = 1 \mid d), so it is optimal for every utility of the probability ranking principle when the ptp_t and utu_t are the true values.
  • Four weighting functions. Robertson and Sparck Jones (1976) derive four weights, F1 to F4, from two choices of independence assumption and two choices of ordering principle. The weight wtw_t above is F4, the one in common use.
  • The 0.5 corrections. Without them a term with rt=Rr_t = R or rt=0r_t = 0 gets an infinite weight. Adding 0.5 to each cell gives finite weights in all cases.
  • Linked dependence. Cooper (1995) shows that the two independence assumptions, taken together over a whole collection, can contradict each other, and that the derivation needs only the weaker linked dependence assumption: the ratio P(x∣R=1)/P(x∣R=0)P(x \mid R = 1)/P(x \mid R = 0) factors over the terms.
  • Negative weights. With no relevance information, a query term in more than half of the documents gets a negative weight. Engines often clamp it to 0 or use the idf of Lucene's BM25, which stays positive.

References

  1. Stephen E. Robertson and Karen Sparck Jones, Relevance weighting of search terms, Journal of the American Society for Information Science 27(3), 129 to 146, 1976, the relevance weight of a term from the contingency table of relevance against occurrence, the weighting functions F1 to F4 and the estimates with 0.5 added to each cell
  2. W. Bruce Croft and David J. Harper, Using probabilistic models of document retrieval without relevance information, Journal of Documentation 35(4), 285 to 295, 1979, the weight with no relevance information, a constant plus log((N - n)/n), and the initial search that it gives
  3. Christopher D. Manning, Prabhakar Raghavan and Hinrich Schuetze, Introduction to Information Retrieval, Cambridge University Press, 2008, Chapter 11, Section 11.3 (the binary independence model, the retrieval status value and the estimation of the probabilities with and without relevance information)
  4. Stephen Robertson and Hugo Zaragoza, The probabilistic relevance framework, BM25 and beyond, Foundations and Trends in Information Retrieval 3(4), 333 to 389, 2009, the binary independence model and the Robertson-Sparck Jones weight as the first step toward BM25
  5. William S. Cooper, Some inconsistencies and misidentified modeling assumptions in probabilistic information retrieval, ACM Transactions on Information Systems 13(1), 100 to 111, 1995, the independence assumptions of the model and the weaker linked dependence assumption that the derivation needs

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/11RFN8/text.yaml