Definitionadvanced
Expected reciprocal rank
Also called ERR.
The expected value of 1/r for the rank r where a cascade user stops, each document satisfying with a probability set by its grade.
Expected reciprocal rank (ERR) scores a ranking with graded judgments by a model of a user who reads the results from the top. At each rank the user is satisfied with a probability that grows with the grade of the document, and stops there; otherwise the user goes on to the next rank. ERR is the expected value of , where is the rank at which the user stops, and a user who never stops counts 0. Chapelle, Metzler, Zhang and Grinspan defined it in 2009 from the cascade click model. The main difference from nDCG is that the worth of a document depends on the documents above it: a relevant document below a highly relevant one adds little, because most users have already stopped.
Definition
Input. A ranking of distinct documents for a query, with ranks from 1, graded judgments , where a document that is not judged has grade 0, and an optional cutoff . The maximum grade is the top of the judgment scale of the collection, not the highest grade that occurs for the query. Write .
Satisfaction probability. The probability that the document at rank satisfies the user is
So for grade 0, and for the top grade. Any nondecreasing map from grades to with at grade 0 gives a member of the same family. This is the form of Chapelle et al.
The user. The user examines rank 1. At each examined rank , the user is satisfied and stops with probability , and goes on to rank with probability , independent of the other ranks. The user reaches rank with probability and stops there with probability .
The measure.
With no cutoff, . A user who reaches the end of the list without being satisfied adds 0.
Computation. One pass from the top keeps , the probability of reaching the current rank:
This takes time and extra space. The direct form with the product inside the sum takes quadratic time.
No relevant documents. ERR has no normalization, so a query with no relevant document has ERR 0, and the value is defined. Compare nDCG, which is undefined in that case.
Ties. As for every measure that reads ranks, tied scores must be broken by a fixed rule before ERR is computed. This area orders by score descending, then by document id ascending. trec_eval orders tied documents by document number in reverse lexical order.
Properties
Claim 1. .
Proof. The stop events at ranks are disjoint, and their probabilities sum to , the probability that the user stops at some rank. Each term of ERR is that probability times . Each , so the bound is less than 1.
So ERR never reaches 1, not even for a perfect ranking. The best value for a query depends on its judgments, which is why ERR is often reported next to a normalized measure.
Claim 2. The ranking that sorts the judged documents by grade, highest first, has the largest ERR@k among all rankings of documents of the collection.
Proof. First, raising one does not lower ERR. Write , where is the sum of the terms above rank and . Neither , nor depends on , and by the argument of Claim 1, so ERR grows with . So the ranks are best filled with the documents of the highest grades. Next, take adjacent ranks and with satisfaction probabilities and , and let be the probability of reaching rank . The two ranks add in one order and in the other. The difference is , which is at least 0 when . The probability of going past both ranks does not depend on the order, so the ranks below do not change. A ranking that is not sorted has an adjacent pair with , and swapping it does not lower ERR. A finite number of such swaps sorts the list.
Claim 3. If for every relevant document, then ERR is the reciprocal rank of the first relevant document.
Proof. Then for every rank below the first relevant document , and , so the sum has one nonzero term, .
The standard form never has , so ERR on binary judgments is not reciprocal rank. With , a relevant document stops only half of the users who reach it.
Examples and non-examples
The fixed run on the toy collection
Query q1 "sorted array search" has the judgments d1 grade 2, d2 grade 1 and d8 grade 1, on a scale with . The fixed run ranks 1, 6, 8, 2, 4 with the tie rule of this area, so the grades are 2, 0, 1, 1, 0 and the satisfaction probabilities are .
| Rank | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Document | d1 | d6 | d8 | d2 | d4 |
| 0.75 | 0 | 0.25 | 0.25 | 0 | |
| , reach rank | 1 | 0.25 | 0.25 | 0.1875 | 0.140625 |
| , stop at | 0.75 | 0 | 0.0625 | 0.046875 | 0 |
| 0.75 | 0 | 0.020833 | 0.011719 | 0 |
So . With probability the user is never satisfied. At cutoff 3, .
The ideal ranking puts the grades in the order 2, 1, 1. Its ERR is . So the run is close to the best possible value for q1, and the ratio of the two is .
Ties change ERR
trec_eval reads the same scores as the order 6, 1, 8, 4, 2, with grades 0, 2, 1, 0, 1. Then . The tie between d1 and d6 at rank 1 halves the value, because d1, which satisfies most users, moves to rank 2.
The documents above matter
The ranking 6, 4, 8 has only d8 relevant, at rank 3, and . In the fixed run, d8 is also at rank 3 but adds only , because d1 at rank 1 has already satisfied three quarters of the users. In nDCG, a grade 1 document at rank 3 adds the same amount in both rankings.
Binary judgments
If q1 is judged on a binary scale, so that d1, d2 and d8 have grade 1 and , then every relevant document has . The fixed run gets , not the reciprocal rank 1.
Query q4
q4 "quantum circuit" has no relevant document. Every is 0, and ERR is 0.
Non-examples
- ERR with taken per query. If a query has grades up to 1 on a scale up to 2, setting for that query lets each relevant document stop half of the users instead of a quarter, and values of different queries can no longer be compared.
- The expected reciprocal rank of the first relevant document under a random tie order. That is a tie-aware form of reciprocal rank, not ERR.
- Rank-biased precision. Its user goes on with a fixed probability that does not depend on the documents.
Related definitions
- The user model is the cascade click model of Craswell et al., in which the user reads from the top and stops at the first click, with the click replaced by satisfaction. The DBN click model also has a probability of satisfaction after a click, but learns it from logs instead of setting it from the grade.
- Rank-biased precision and nDCG give each rank a weight that does not depend on the other documents. ERR gives rank the weight , which falls faster below a highly relevant document.
- In the C/W/L framework, set the continuation probability at rank to . Then , and the expected total gain is ERR. The C/W/L framework reports the expected rate of gain per document, which is this total divided by the expected depth, so that value is not ERR. Azzopardi, Mackenzie and Moffat (2021) study the relation in a paper titled "ERR is not C/W/L".
- Averaging ERR over the subtopics of a query, each weighted by its probability, gives an intent-aware form for diversity. Alpha-nDCG is another measure of diversity, built on nDCG.
- In average precision, the term of a relevant document is the precision at its rank, which grows with the relevant documents above it. In ERR, the worth of a document falls with the relevant documents above it.
Claims 1 to 3 are proved and hold for every ranking. That ERR agrees with user behaviour better than other measures is a measured result, not a theorem: Chapelle et al. report that it correlates better with click metrics than the other editorial metrics they test. A claim that one system has a higher mean ERR than another needs a paired test over the queries, such as the Wilcoxon signed-rank test or a permutation test.
References
- Olivier Chapelle, Donald Metzler, Ya Zhang and Pierre Grinspan, Expected reciprocal rank for graded relevance, CIKM 2009, pp. 621-630, the cascade user model, the satisfaction probability (2^g - 1)/2^gmax, the definition of ERR as the expected reciprocal of the stop rank, its linear-time computation and the comparison with click metrics
- Nick Craswell, Onno Zoeter, Michael Taylor and Bill Ramsey, An experimental comparison of click position-bias models, WSDM 2008, pp. 87-94, the cascade model, in which the user reads the results from the top and stops after the first click
- Leif Azzopardi, Joel Mackenzie and Alistair Moffat, ERR is not C/W/L, ICTIR 2021, the relation of ERR to the C/W/L framework of user models
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 6HQRSF Edit this page History Report an error Markdown