Okapi BM25

Okapi BM25

In information retrieval, Okapi BM25 is a ranking function used by search engines to rank matching documents according to their relevance to a given search query. It is based on the probabilistic retrieval framework developed in the 1970s and 1980s by Stephen E. Robertson, Karen Spärck Jones, and others.

The name of the actual ranking function is BM25. To set the right context, however, it usually referred to as "Okapi BM25", since the Okapi information retrieval system, implemented at London's City University in the 1980s and 1990s, was the first system to implement this function.

BM25, and its newer variants, e.g. BM25F (a version of BM25 that can take document structure and anchor text into account), represent state-of-the-art TF-IDF-like retrieval functions used in document retrieval, such as Web search.

Contents

The ranking function

BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document, regardless of the inter-relationship between the query terms within a document (e.g., their relative proximity). It is not a single function, but actually a whole family of scoring functions, with slightly different components and parameters. One of the most prominent instantiations of the function is as follows.

Given a query Q, containing keywords q1,...,qn, the BM25 score of a document D is:

 \text{score}(D,Q) = \sum_{i=1}^{n} \text{IDF}(q_i) \cdot \frac{f(q_i, D) \cdot (k_1 + 1)}{f(q_i, D) + k_1 \cdot (1 - b + b \cdot \frac{|D|}{\text{avgdl}})},

where f(qi,D) is qi's term frequency in the document D, | D | is the length of the document D in words, and avgdl is the average document length in the text collection from which documents are drawn. k1 and b are free parameters, usually chosen, in absence of an advanced optimization, as k_1 \in [1.2,2.0] and b = 0.75[1]. IDF(qi) is the IDF (inverse document frequency) weight of the query term qi. It is usually computed as:

\text{IDF}(q_i) = \log \frac{N - n(q_i) + 0.5}{n(q_i) + 0.5},

where N is the total number of documents in the collection, and n(qi) is the number of documents containing qi.

There are several interpretations for IDF and slight variations on its formula. In the original BM25 derivation, the IDF component is derived from the Binary Independence Model.

Please note that the above formula for IDF shows potentially major drawbacks when using it for terms appearing in more than half of the corpus documents. These terms' IDF is negative, so for any two almost-identical documents, one which contains the term and one which does not contain it, the latter will possibly get a larger score. This means that terms appearing in more than half of the corpus will provide negative contributions to the final document score. This is often an undesirable behavior, so many real-world applications would deal with this IDF formula in a different way:

  • Each summand can be given a floor of 0, to trim out common terms;
  • The IDF function can be given a floor of a constant \epsilon, to avoid common terms being ignored at all;
  • The IDF function can be replaced with a similarly shaped one which is non-negative, or strictly positive to avoid terms being ignored at all.

IDF Information Theoretic Interpretation

Here is an interpretation from information theory. Suppose a query term q appears in n(q) documents. Then a randomly picked document D will contain the term with probability \frac{n(q)}{N} (where N is again the cardinality of the set of documents in the collection). Therefore, the information content of the message "D contains q" is:

-\log \frac{n(q)}{N} = \log \frac{N}{n(q)}.

Now suppose we have two query terms q1 and q2. If the two terms occur in documents entirely independently of each other, then the probability of seeing both q1 and q2 in a randomly picked document D is:

\frac{n(q_1)}{N} \cdot \frac{n(q_2)}{N},

and the information content of such an event is:

\sum_{i=1}^{2} \log \frac{N}{n(q_i)}.

With a small variation, this is exactly what is expressed by the IDF component of BM25.

Modifications

  • At the extreme values of the coefficient b BM25 turns into ranking functions known as BM11 (for b = 1) and BM15 (for b = 0).[2]
  • BM25F[3] is a modification of BM25 in which the document is considered to be composed from several fields (such as headlines, main text, anchor text) with possibly different degrees of importance.

Footnotes

  1. ^ Christopher D. Manning, Prabhakar Raghavan, Hinrich Schütze. An Introduction to Information Retrieval, Cambridge University Press, 2009, p. 233.
  2. ^ http://xapian.org/docs/bm25.html
  3. ^ Hugo Zaragoza, Nick Craswell, Michael Taylor, Suchi Saria, and Stephen Robertson. Microsoft Cambridge at TREC-13: Web and HARD tracks. In Proceedings of TREC-2004.

References

  • Stephen E. Robertson, Steve Walker, Susan Jones, Micheline Hancock-Beaulieu, and Mike Gatford. Okapi at TREC-3. In Proceedings of the Third Text REtrieval Conference (TREC 1994). Gaithersburg, USA, November 1994.
  • Stephen E. Robertson, Steve Walker, and Micheline Hancock-Beaulieu. Okapi at TREC-7. In Proceedings of the Seventh Text REtrieval Conference. Gaithersburg, USA, November 1998.
  • Karen Spärck Jones, Steve Walker, and Stephen E. Robertson. A Probabilistic Model of Information Retrieval: Development and Comparative Experiments (parts 1 and 2). Information Processing and Management, 36(6):779-840. 2000.

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Okapi BM25 — es una función de ranking utilizada en Recuperación de información para la asignación de relevancia a los documentos en un buscador, dicho de otra forma, es una función que nos permite ordenar por relevancia los documentos que contienen las… …   Wikipedia Español

  • Okapi BM25 — est une méthode de pondération utilisée en recherche d information. Elle est une application du modèle probabiliste de pertinence. Voir aussi TF IDF Modèle probabiliste Références …   Wikipédia en Français

  • Okapi BM25 — В информационном поиске, Okapi BM25  функция ранжирования, используемая поисковыми системами для упорядочивания документов по их релевантности данному поисковому запросу. Она основывается на вероятностной модели, разработанной в 1970 х и… …   Википедия

  • Okapi (disambiguation) — Okapi may refer to: De Havilland Okapi, a British two seat day bomber of the 1910s built by de Havilland Okapi, a giraffid artiodactyl mammal native to the Ituri Rainforest in central Africa Okapi (knife), a lockback or slipjoint knife originally …   Wikipedia

  • Information retrieval — This article is about information retrieval in general. For the fictional government department, see Brazil (film). Information retrieval (IR) is the area of study concerned with searching for documents, for information within documents, and for… …   Wikipedia

  • SQL Server Full Text Search — is an inexact string matching technology for SQL Server. It is a powerful and fast way of referencing the contents of almost any character based column on SQL Server 2000, SQL Server 2005, and SQL Server 2008 . Full text indexes must be populated …   Wikipedia

  • TF-IDF — Le TF IDF (de l anglais Term Frequency Inverse Document Frequency) est une méthode de pondération souvent utilisée en recherche d information et en particulier dans la fouille de textes. Cette mesure statistique permet d évaluer l importance d un …   Wikipédia en Français

  • Modelo de espacio vectorial — Se conoce como modelo de espacio vectorial a un modelo algebraico utilizado para filtrado, recuperación, indexado y cálculo de relevancia de información. Representa documentos en lenguaje natural de una manera formal mediante el uso de vectores… …   Wikipedia Español

  • Modèle probabiliste de pertinence — Le modèle probabiliste de pertinence est une méthode probabiliste de représentation du contenu d un document, proposée en 1976 par Robertson et Jones[1]. Elle est utilisée en recherche d information pour exprimer une estimation de la probabilité… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”