# 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 $tfi$ normally represents the frequency of term $ti$
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(TFi = tfi | rel, q)}{P(TFi = tf_i| \bar{rel}, q)}$

$\approx \prod{i \in q} \frac{P(TFi = tfi | rel)}{P(TFi = tf_i| \bar{rel})}$

$\propto{q} \sumq \log \frac{P(TFi = tfi | rel)}{P(TFi = tfi|\bar{rel})}$

Let $Ui(x) = \log \frac{P(TFi =x|rel)}{P(TF_i =x|\bar{rel})}$, then we have

$=\sumq Ui (tf_i)$

$= \sum{q,tfi>0} Ui(tfi) + \sum{q, tfi=0} Ui(0) - \sum{q, tfi>0}Ui(0) + \sum{q, tfi>0} U_i(0)$

$= \sum{q,tfi>0} (Ui(tfi) - Ui(0)) + \sumq U_i(0)$

$\propto{q} \sum{q,tfi>0} (Ui(tfi) - Ui(0))$

let $Wi(x) = Ui(x) - Ui(0) = \log \frac{P(TFi = x | rel) P(TFi =0| \bar{rel})}{P(TFi=x|\bar{rel})P(TF_i=0|rel)}$

and $wi = Wi(tf_i)$, we finally have:

$\sum{q,tfi>0} w_i$

#### Derived Models

##### The binary independent model

Suppose that $TFi$ is a binary variable, having only the values zero and one. Now we got new $wi$:

$wi^{BIM} = \log \frac{P(ti|rel)(1- P(ti|\bar{rel}))}{1-P(ti|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
$ni$ Number of documents in the judged sample containing term $ti$
$R$ Relevant set size( number of documents judged relevant )
$ri$ Number of judged relevant docs containing term $ti$

##### Robertson Sprck Jones weight

$wi^{RSJ} = \log \frac{(ri+0.5)(N-R -ni + ri +0.5)}{(ni-ri+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(ti|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=ri=0$ in the RSJ formula. This resulting fomula is a close approximation to classical $IDF$

$wi^{IDF} = \log \frac{N-ni+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(Ei = elite|rel)$ and $p{i0} = P(Ei = elite|\bar{rel})$

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

We can get this : $P(TFi = 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{(p1E1(tf) + (1-p1)E0(tf))(p0E1(0)+(1-p0)E0(0))}{(p1E1(0)+(1-p1)E0(0))(p0E1(tf)+(1-p0)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:

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

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

3. 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} wi^{elite}(tf) = \log \frac{p1(1-p0)}{(1-p1)p0} = w_i^{BIM}$

#### BM25

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

where $dl = \sum{i\in V} tfi$ 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'}{k1+tf'} w_i^{RSJ}$

$=\frac{tf}{k1((1-b) + b\frac{dl}{avdl})+tf} wi^{RSJ}$

where $k1$ is a $saturation$ parameter. For high $k1$, 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