Query likelihood model

The query likelihood model is a language model used in information retrieval. A language model is constructed for each document in the collection. It is then possible to rank each document by the probability of specific documents given a query. This is interpreted as being the likelihood of a document being relevant given a query.

Calculating the likelihood

Using Bayes' rule, the probability ${\displaystyle P}$ of a document ${\displaystyle d}$, given a query ${\displaystyle q}$ can be written as follows:

${\displaystyle P(d|q)={\frac {P(q|d)P(d)}{P(q)}}}$

Since the probability of the query P(q) is the same for all documents, this can be ignored. Further, it is typical to assume that the probability of documents is uniform. Thus, P(d) is also ignored.

${\displaystyle P(d|q)=P(q|d)}$

Documents are then ranked by the probability that a query is observed as a random sample from the document model. The multinomial unigram language model is commonly used to achieve this. We have:

${\displaystyle P(q|M_{d})=K_{q}\prod _{t\in V}P(t|M_{d})^{tf_{t,q}}}$,where the multinomial coefficient is ${\displaystyle K_{q}=L_{q}!/(tf_{t1,q}!tf_{t2,q}!...tf_{tN,q}!)}$ for query q,

and ${\displaystyle L_{q}=\sum _{1\leq i\leq N}tf_{t_{i},q}}$ is the length of query q given the term frequencies tf in the query vocabulary N.

In practice the multinomial coefficient is usually removed from the calculation. The reason is that it is a constant for a given bag of words (such as all the words from a specific document ${\displaystyle d}$). The language model ${\displaystyle M_{d}}$ should be the true language model calculated from the distribution of words underlying each retrieved document. In practice this language model is unknown, so it is usually approximated by considering each term (unigram) from the retrieved document together with its probability of appearance. So ${\displaystyle P(t|M_{d})}$ is the probability of term ${\displaystyle t}$ being generated by the language model ${\displaystyle M_{d}}$ of document ${\displaystyle d}$. This probability is multiplied for all terms from query ${\displaystyle q}$ to get a rank for document ${\displaystyle d}$ in the interval ${\displaystyle [0,1]}$. The calculation is repeated for all documents to create a ranking of all documents in the document collection.

[1]

References

1. ^ Christopher D. Manning, Prabhakar Raghavan, Hinrich Schütze: An Introduction to Information Retrieval, page 241. Cambridge University Press, 2009