# The Probabilistic Relevance Framework

#### Introduction

The Probabilistic Relevance Framework (PRF) is a formal framework for document retrieval, grouned in work done in the 1970-1980s, which led to the development of one of the most successful text-retrieval algorithms, *BM25*. In recent years, research in the PRF has yielded new retrieval models capable of taking into account document meta-data (especially structure and link-graph information). This led to one of the most successful Web-search and cororate-search algorithms, *BM25F*.

#### Basic Model

##### Some notation

rank equivalence : $\propto*{q}$ eg. $g() \propto*{q} h()$

relevance $Rel$: $rel,\bar{rel}$ (relevant or not)

document: $d = (tf*{1},\ldots, tf*{|V|})$, where $tf*i$ normally represents the frequency of term $t*i$

query: $q = (qtf*{1},\ldots,qtf*{|V|})$, where $qtf_i$ represents term frequencies in the query or may represent a binary presence or absence feature.

##### Development of Basic Model

We start with the very general PRF, and end up with an explicit document scoring function.
$P(rel|d,q) \propto*{q}\frac{P(rel|d,q)}{P(\bar{rel}|d,q)} = \frac{P(d|rel,q) P(rel|q)}{P(d|\bar{rel},q)P(\bar{rel}|q)}$
$\propto*{q} \frac{P(d|rel,q)}{P(d|\bar{rel},q)} $

$\approx \prod*{i \in V} \frac{P(TF*i = tf*i | rel, q)}{P(TF*i = tf_i| \bar{rel}, q)}$

$\approx \prod*{i \in q} \frac{P(TF*i = tf*i | rel)}{P(TF*i = tf_i| \bar{rel})}$

$\propto*{q} \sum*q \log \frac{P(TF*i = tf*i | rel)}{P(TF*i = tf*i|\bar{rel})}$

Let $U*i(x) = \log \frac{P(TF*i =x|rel)}{P(TF_i =x|\bar{rel})}$, then we have

$=\sum*q U*i (tf_i)$

$= \sum*{q,tf*i>0} U*i(tf*i) + \sum*{q, tf*i=0} U*i(0) - \sum*{q, tf*i>0}U*i(0) + \sum*{q, tf*i>0} U_i(0)$

$= \sum*{q,tf*i>0} (U*i(tf*i) - U*i(0)) + \sum*q U_i(0)$

$\propto*{q} \sum*{q,tf*i>0} (U*i(tf*i) - U*i(0))$

let $W*i(x) = U*i(x) - U*i(0) = \log \frac{P(TF*i = x | rel) P(TF*i =0| \bar{rel})}{P(TF*i=x|\bar{rel})P(TF_i=0|rel)}$

and $w*i = W*i(tf_i)$, we finally have:

$\sum*{q,tf*i>0} w_i$

#### Derived Models

##### The binary independent model

Suppose that $TF*i$ is a binary variable, having only the values zero and one. Now we got new $w*i$:

$w*i^{BIM} = \log \frac{P(t*i|rel)(1- P(t*i|\bar{rel}))}{1-P(t*i|rel)P(t_i|\bar{rel})}$

Let's get into detail about deriving a "relevance" property since above equation is conditional on the relevance property.

Notation
$N$ size of the judged sample

$n*i$ Number of documents in the judged sample containing term $t*i$

$R$ Relevant set size( number of documents judged relevant )

$r*i$ Number of judged relevant docs containing term $t*i$

##### Robertson Sprck Jones weight

$w*i^{RSJ} = \log \frac{(r*i+0.5)(N-R -n*i + r*i +0.5)}{(n*i-r*i+0.5)(R-r_i+0.5)}$

Next, we suppose that some documents, probably a small number, have been retrieved and judged---this is the usual *relevance feedback scenario.*

And, we suppose that we have no relevance information at all(the most usual scenario). In this case, we can only assume that the relevance probability $P(t*i|rel)$ is fixed, but we can continue to use the complement method for the non-relevance probability. All this can be achieved by setting $R=r*i=0$ in the RSJ formula. This resulting fomula is a close approximation to classical $IDF$

$w*i^{IDF} = \log \frac{N-n*i+0.5}{n_i+0.5}$

#### The Eliteness Model

We suppose that for any document-term pair there is a hidden property which we refer to as $eliteness$ This can be interpreted as a form of aboutness: if the term is elite in the document, in some sense the document is about the concept denoted by the term.

##### 2-Poisson Model

New notation: The eliteness random variable $E$ can take two values:

$E$ : $elite$, $\bar{elite}$

We now decompose all the probabilities we want using these tow disjoint events, following this pattern:

$P(\alpha|\beta) = P(\alpha |elite)P(elite|\beta) + P(\alpha | \bar{elite})P(\bar{elite} | \beta)$.

Let $p*{i1} = P(E*i = elite|rel)$ and $p*{i0} = P(E*i = elite|\bar{rel})$

$E*{i1}(tf) = P(TF*i=TF | E*i = elite)$ and $E*{i0}(tf) = P(TF*i=TF | E*i = \bar{elite})$

We can get this : $P(TF*i = tf |rel) = p*{i1} E*{i1}(tf) + (1 - p*{i1} E_{i0}(tf))$

This gives us an equation for our term-weights:

$w*{i}^{elite} = \log \frac{(p*1E*1(tf) + (1-p*1)E*0(tf))(p*0E*1(0)+(1-p*0)E*0(0))}{(p*1E*1(0)+(1-p*1)E*0(0))(p*0E*1(tf)+(1-p*0)E_0(tf))}$

More specifically, we make distributional assumptions about these events. From $Harter$, we assume that the distributions of term frequencies across documents, conditioned on eliteness, are Poisson:

$E*{ie}(tf) \sim Poisson(\lambda*{ie})$ (Poisson with mean $\lambda_{ie}$)

We note the following characterisitics of this model:

The model of topicality is a very simple one -- one word one topic.

There is no attempt to normalise the probabilities across the full unigram model for the document.

The model depends fairly crucially on the notion that all documents are of the same(fixed) length

If we plug the Poisson distributional assumptions into above equation, we can express the term weight as a function of the two means $\lambda_{e}$ and the mixing proportion of elite and non-elite documents in the collection(as well as the observed tf). This is a somewhat messy formula.

We note:
1. $w*{i}^{elite}(0) = 0$
2. $w*{i}^{elite}(tf)$ increases monotonically with $tf$;
3. However, asymptotically approaches a maximum value as $tf \rightarrow \infty$
4. and the asymptotic limit being:

$\lim*{tf\rightarrow\infty} w*i^{elite}(tf) = \log \frac{p*1(1-p*0)}{(1-p*1)p*0} = w_i^{BIM}$

#### BM25

Notation: soft length normlisation: $B = ((1-b) + b\frac{dl}{avdl})$ ,

where $dl = \sum*{i\in V} tf*i$ it's document length,

$avdl$ is the average document length. $b$ is normlisation parameter and setting $b=1$will perform full document-length normalisation

$tf' = \frac{tf}{B}$

$w*{i}^{BM25}(tf) = \frac{tf'}{k*1+tf'} w_i^{RSJ}$

$=\frac{tf}{k*1((1-b) + b\frac{dl}{avdl})+tf} w*i^{RSJ}$

where $k*1$ is a $saturation$ parameter. For high $k*1$, increments in $tf$ continue to contribute significantly to the score, whereas for low $k_1$, the additional contribution of a newly observed occourrence tails off ver rapidly.

#### Reference

"The Probabilistic Relevance Framework BM25 and Beyond" by Stephen Robertson and Hugo Zaragoza

"A probabilistic approach to automatic keyword indexing" S.P.Harter