Normalized Discounted Cumulative Gain

Abbreviation: nDCG. Also known as: DCG, discounted cumulative gain.

A score for a ranked list that adds the graded relevance of results with lower positions discounted, divided by the best score possible. It runs from 0 to 1.

Synthetic dataExamples on this page use synthetic data created for illustration.

Definition

nDCG scores a ranked list by adding up the graded relevance of its results with lower positions discounted, then dividing by the best score possible for the same results. It runs from 0 to 1 and rewards putting the most relevant items first.

In plain terms

People read from the top, so a good result at position 1 is worth more than the same result at position 5. DCG captures that: each result’s grade is divided by log₂(position + 1). Dividing the total by the DCG of the ideal ordering of the same results gives a number between 0 and 1 that can be compared across queries.

It needs graded judgments (see Relevance Judgments) and a cutoff, such as the top 5 or 10; scores at different cutoffs are different measures.

Example

Five results for one query, with grades 0 to 3 (3 is best). Discounts at positions 1 to 5: 1, 0.63, 0.5, 0.43, 0.39.

RankingGrades by positionDCG@5Ideal DCG@5nDCG@5
A: best result first3, 2, 0, 1, 04.694.760.985
B: same results, other order0, 3, 2, 0, 13.284.760.689

The ideal order for these results is 3, 2, 1, 0, 0. Precision at 3 is identical for A and B, yet nDCG separates them clearly.

Common misunderstandings

  • “nDCG of 0.8 means 80% of the results are right.” It is a position-weighted score of graded relevance, not a percentage correct.
  • “Scores from different cutoffs or grading scales can be compared.” The cutoff and the gain scale are part of the definition.
  • “It needs no human judgments.” It needs grades; they have to come from somewhere, usually people.

References

  1. Kalervo Järvelin, Jaana Kekäläinen. Cumulated Gain-Based Evaluation of IR Techniques . ACM Transactions on Information Systems, 2002. DOI: 10.1145/582415.582418
  2. Mark Sanderson. Test Collection Based Evaluation of Information Retrieval Systems . Foundations and Trends in Information Retrieval, 2010. DOI: 10.1561/1500000009