Algorithm Search⌘K

Definitionresearch

Inferred average precision

Also called infAP.

Estimates average precision from a uniform random sample of the judgment pool. It equals AP under complete judgments and is close to it in expectation, but not exactly unbiased.

Inferred average precision (infAP) estimates the average precision of a run when only a random sample of the judgment pool has been judged. It reads AP as an expected value: pick a relevant document at random, then pick a document at or above it at random, and ask whether that document is relevant. For each judged relevant document, infAP estimates the precision at its rank from the judged documents above it, counts documents outside the pool as not relevant, and averages the estimates. Yilmaz and Aslam proposed it in 2006. With complete judgments it equals AP. With a sample it is built to be close to AP in expectation when the judged documents are a uniform random sample of the pool, but it is a ratio of random quantities and is not exactly unbiased.

Definition

Input. A ranking d1,…,dnd_1, \ldots, d_n for a query, a pool PP of documents, and a set S⊆PS \subseteq P of judged documents, each judged relevant or not relevant. The sample SS is drawn uniformly at random from PP. Every ranked document is in one of four classes: not in the pool, in the pool but not judged, judged relevant, judged not relevant.

Counts above rank kk. For a judged relevant document at rank kk, let pkp_k be the number of pool documents above rank kk, and rkr_k and uku_k the numbers of documents above rank kk judged relevant and judged not relevant.

Estimated precision at rank kk. For k=1k = 1 the estimate is 1. For k≥2k \ge 2,

P^k=1k+k−1k⋅pkk−1⋅rk+εrk+uk+2ε,\hat{P}_k = \frac{1}{k} + \frac{k - 1}{k} \cdot \frac{p_k}{k - 1} \cdot \frac{r_k + \varepsilon}{r_k + u_k + 2\varepsilon} ,

where ε\varepsilon is a small positive constant. Read it as the random experiment: with probability 1/k1/k the picked document is the relevant document itself; otherwise it is one of the k−1k - 1 above. Of those, a document outside the pool counts as not relevant, and a document in the pool is relevant with the rate seen among the judged documents above, rk/(rk+uk)r_k/(r_k + u_k). The constant ε\varepsilon keeps the ratio defined when nothing above is judged, and then the ratio is 1/21/2.

The measure. Let RSR_S be the number of judged relevant documents of the query. Then

infAP=1RS∑judged relevant dkP^k.\mathrm{infAP} = \frac{1}{R_S} \sum_{\text{judged relevant } d_k} \hat{P}_k .

Judged relevant documents that the run does not retrieve add 0 to the sum, as in AP. If no sampled document is relevant, RS=0R_S = 0 and infAP is undefined. trec_eval computes this formula in file m_infap.c, with the four classes of documents read from the judgments file.

Properties

Claim 1. If every pool document is judged and every relevant document is in the pool, then infAP tends to AP as ε→0\varepsilon \to 0.

Proof. With S=PS = P, every pool document above rank kk is judged, so rk+uk=pkr_k + u_k = p_k, and the ratio tends to rk/pkr_k/p_k. Then P^k\hat{P}_k tends to 1/k+(1/k)rk=(rk+1)/k1/k + (1/k) r_k = (r_k + 1)/k, which is the precision at rank kk, since the documents outside the pool are not relevant. For k=1k = 1 both are 1. RSR_S is the number of relevant documents RR. So infAP tends to the mean of the precisions at the relevant documents, with the unretrieved ones as 0, which is AP. □\square

Claim 2. infAP is not an unbiased estimator of AP in general.

Proof. The example below has a pool of five documents and a sample of size 3. The mean of infAP over the ten equally likely samples is 0.7542, and AP is 0.8056. □\square

The causes are easy to name. infAP divides by RSR_S, which is random, so it is a ratio of random sums. The rate rk/(rk+uk)r_k/(r_k + u_k) is estimated from few documents near the top. A small sample can contain no relevant document, and then infAP is undefined. See estimator bias. Yilmaz and Aslam report experiments on TREC data in which the estimates stay close to AP at moderate sample rates; that is a measured property, not a theorem.

Examples and non-examples

The fixed run on the toy collection

Query q1 "sorted array search" has the relevant documents d1, d2 and d8. The fixed run ranks 1, 6, 8, 2, 4 with the tie rule of this area, and its AP is 29/36=0.805629/36 = 0.8056. Let the pool be the five ranked documents, and judge a uniform random sample of them.

With the sample {2,4,6}\{2, 4, 6\}, the only judged relevant document is d2 at rank 4. Above it are the pool documents d1, d6 and d8, so p4=3p_4 = 3, and of them only d6 is judged, as not relevant, so r4=0r_4 = 0 and u4=1u_4 = 1. Then P^4=1/4+(3/4)(3/3)⋅ε/(1+2ε)≈0.25\hat{P}_4 = 1/4 + (3/4)(3/3) \cdot \varepsilon/(1 + 2\varepsilon) \approx 0.25, and infAP is 0.25. The sample happened to judge the one document above d2 that is not relevant.

With the sample {8}\{8\}, d8 at rank 3 has two pool documents above, d1 and d6, neither judged. The ratio is 1/21/2, and P^3=1/3+(2/3)(2/2)(1/2)=2/3\hat{P}_3 = 1/3 + (2/3)(2/2)(1/2) = 2/3.

The values of infAP for all ten samples of size 3:

Sample {1,2,4} {1,2,6} {1,2,8} {1,4,6} {1,4,8} {1,6,8} {2,4,6} {2,4,8} {2,6,8} {4,6,8}
infAP 1 0.8125 1 1 1 0.8333 0.25 0.8333 0.4792 0.3333

The mean over the samples, for each sample size mm, leaving out the samples with no relevant document:

mm 1 2 3 4 5
Undefined samples 2 of 5 1 of 10 0 0 0
Mean infAP 0.7639 0.7454 0.7542 0.7861 0.8056

The mean is below AP for every partial sample, and it reaches AP only with full judgments.

Documents outside the pool

Rank 3, 1, 9, 6, 8, 2, 4, 5 with the relevant documents 1, 8, 2 and 5, the pool {1, 2, 3, 4, 5, 6, 8} and d9 outside the pool, so d9 counts as not relevant. AP is 0.475. The mean infAP over all samples of size 2 to 7 is 0.4738, 0.4613, 0.4669, 0.4740, 0.4762 and 0.4750. Here the estimate is close to AP but not monotone in the sample size.

Non-examples

  • AP computed on the judged documents only, with the documents that are not judged removed from the ranking. That is condensed-list AP. It uses no model of the sample and tends to give higher values when many documents are not judged.
  • AP with every document that is not judged counted as not relevant. That is the standard trec_eval measure map on incomplete judgments, which tends to fall as the sample gets smaller.
  • infAP on a sample that is not uniform, such as the top documents of each run. The rate rk/(rk+uk)r_k/(r_k + u_k) then estimates the wrong quantity. For a sample with known but different rates per part of the pool, use the stratified form xinfAP.
  • Bpref handles incomplete judgments by comparing judged relevant and judged not relevant documents, and estimates no other measure.
  • xinfAP of Yilmaz, Kanoulas and Aslam extends infAP to stratified samples, with each part of the pool sampled at its own rate, and the same paper gives an inferred form of NDCG. Weighting each judged document by the inverse of its sampling rate is the idea of the Horvitz-Thompson estimator.
  • The minimal test collection method picks the documents to judge in order to decide which of two runs is better, instead of sampling them at random.
  • Rank-biased precision reports a residual that bounds the effect of the documents that are not judged.

Claims 1 and 2 are proved. That infAP ranks systems in nearly the same order as AP with full judgments at moderate sample rates is a measured result on TREC collections, not a property that holds for every query.

References

  1. Emine Yilmaz and Javed A. Aslam, Estimating average precision with incomplete and imperfect judgments, CIKM 2006, pp. 102-111, average precision as the expected outcome of a random experiment, and the estimate of the expected precision at each relevant document from a random sample of the pool (inferred AP)
  2. Emine Yilmaz and Javed A. Aslam, Estimating average precision when judgments are incomplete, Knowledge and Information Systems 16(2), 2008, pp. 173-211, induced AP, subcollection AP and inferred AP, which equal AP under complete judgments and are statistical estimates when a random subset of the pool is judged
  3. Emine Yilmaz, Evangelos Kanoulas and Javed A. Aslam, A simple and efficient sampling method for estimating AP and NDCG, SIGIR 2008, the extension of inferred AP from uniform samples to stratified samples with different sampling rates (xinfAP), and the inferred form of NDCG
  4. trec_eval, the TREC evaluation program by Chris Buckley, maintained by NIST, file m_infap.c (the measure infAP; documents are unpooled, pooled but not judged, judged relevant or judged not relevant; the term of each judged relevant document, with a small constant INFAP_EPSILON, and the division by the number of relevant documents)

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.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/A8X4ZP/text.yaml