# When Greedy Is Sorting: Exact and Certified Ideal Rankings for Novelty Metrics

ChainMerge computes exact ideal rankings for novelty metrics when intents do not overlap

Kehan Liu, Zhaoyun Chen, Xianquan Yan · arXiv · 2026-11-7

- **Problem** The ideal ranking that normalizes novelty metrics like α-nDCG is NP-hard, so evaluators use a greedy rule that rescans every remaining document at each rank.
- **Method** ChainMerge scores each intent's sorted documents in advance, then merges them with a heap, picking the largest score at each rank instead of rescanning all candidates.
- **Results** On 198 TREC queries, an LP certifies 189 greedy denominators as globally optimal.

## Why the ideal denominator is slow to compute

Novelty metrics such as α-nDCG divide a list's score by an ideal denominator, the best gain any ordering of the candidates could reach. That denominator is hard because a document's gain depends on the documents already placed for the same intent.

Each pick rescans every unchosen candidate at each rank, which the source labels a quadratic greedy approximation. Researchers call this procedure marginal greedy, and pyndeval and ir\_measures inherit the same routine. The cost of this rule is Θ(nK), so the work grows with both the pool size and the cutoff.

Greedy still rescans everything after each pick, even though a pick from one group doesn't change the gains in other groups.

The authors define row support as the number of intents for which a document has positive gain.

## Turning the greedy rule into fixed chain scores

Once each intent group is sorted, every candidate's place in the greedy sequence can be scored in advance. The greedy choice then becomes a merge of sorted lists instead of a search repeated at every rank. The authors expected this to make the exact ideal cheap, because allocating a fixed budget across decreasing marginal returns has a classical merge solution.

For α-DCG, the virtual score of the r-th member of a group is its r-th largest gain multiplied by (1−α) to the power r−1. With q = 1−α, the paper writes this as b^α\_{g,r} = a\_{g,r} q^{r−1}, with the convention that 0 to the power 0 is 1. The r-th member keeps only the fraction q to the power r−1 of its gain, because its r−1 earlier intent members already cover it.

Since q is at most one, each chain of virtual scores can only shrink along the group.

Written out, the score is b^ERR\_{g,r} = p\_g s\_{g,r} times the product over h below r of (1−s\_{g,h}). That product is what the cascade model adds, so the chains could have stopped being nonincreasing. The authors still show that these ERR-IA chains are nonincreasing, because b^ERR\_{g,r+1} is at most b^ERR\_{g,r}.

The argument is exchange-based: swapping adjacent inversions within an intent never lowers the objective. So an optimum takes a prefix of each group in decreasing score order, and Lemma 1 then applies to the chains. Lemma 1 says that sorting all items by their chain weights and taking the first K is optimal under nonincreasing discounts.

## How ChainMerge runs and what it costs

ChainMerge starts from a stable partition that splits the globally ordered list into one array per intent, appending each document in list order. Each chain then holds its documents in gain order, and the merge needs only the head of every chain at any moment. Algorithm 1 keeps a max-heap that stores one entry per chain head, a triple of virtual score, group and position.

At each rank the algorithm pops the largest virtual score, outputs that candidate, and pushes the next member of the same chain. Because the virtual scores of each chain never increase, the heap always sees the true next-best candidate in every group.

From materialized chains, the merge takes O(G+K log G) time with O(G) extra memory. From a globally preordered list, including the stable partition, it takes O(n+K log G) time, against Θ(nK) for marginal greedy. Unsorted groups instead require O(n log n) preprocessing before the merge can start. With binary judgments each chain is the geometric sequence 1, q, q², ...

cut after n\_g terms, so the exact α-IDCG depends only on the group counts. Those group counts can be accumulated while the judgments are read, so the count-only path avoids building any chain.

## Why intent overlap makes the problem hard

Overlap breaks the chain picture, because selecting a document that covers several intents advances several chains at once. When a document covers several intents, neither static virtual scores nor Lemma 1 applies, so the merge has no fixed order to follow. The authors reduce Independent Set on cubic graphs to binary α-DCG, with vertices as documents and edges as intents.

Each edge's intent is covered by its two endpoint documents, so every document has three intents and every intent occurs in two documents. If both endpoints of an edge are ranked, the later endpoint contributes 1 minus α instead of one. The authors prove the hardness for every fixed α in (0, 1\], so the reduction holds across that whole range.

The case α = 0 is excluded, because redundancy then disappears and the objective becomes modular. History dependence alone doesn't make ideal novelty ranking hard, so the hardness comes from documents covering several intents.

Greedy also fails once documents overlap, and a three-document example is enough to show it. With two documents and K = 2, greedy can't fail, because the shared contributions cancel in the comparison. The example uses α = 0.5, d1 = 1 and d2 = 1/log2 3, with intents x and y of weight 1 and intents z and w of weight 0.8. Greedy takes document A first and reaches about 2.820, while the ranking (B, C) reaches about 2.936.

In that figure's example, greedy ends 0.12 below the optimal ranking, so overlapping queries need certificates rather than an exactness guarantee.

Because exact optimization is NP-hard under overlap, the authors bound the optimum with a polynomial-size LP instead.

## Bounding the optimum with a prefix LP

Exact optimization under intent overlap is NP-hard, so the authors bound the optimum with a polynomial-size LP instead. Each intent's coverage is described by the concave geometric function h\_g(r) = w\_g times the sum of q^j for j from 0 to r minus 1, with diminishing returns for repeated coverage. Linear interpolation between integer points gives a concave function whose segment slopes are w\_g q^r, so its hypograph is an intersection of tangent halfspaces.

The LP uses fractional memberships x\_it, where each prefix t has exactly t units of membership. Nesting constraints keep each document inside every longer prefix once it enters, and the tangent constraints cap each coverage gain u\_gt. The LP has O(nK + GK) variables, and the authors note that the coefficient encoding stays polynomial for rational inputs.

Theorem 4 states that the LP value upper-bounds the optimum for any binary overlap, so any feasible ranking gets a certificate of its optimality gap. The proof embeds each integral ranking as a feasible LP point, so the LP maximum cannot fall below any ranking's value. Integral nested prefixes define a ranking whose value equals the LP objective, so a strict gap requires fractional memberships in every LP optimum.

A second certificate needs no LP solver and keeps one retained intent phi(i) for each positive document. The deleted gains for each intent are sorted, and their discount-weighted sum forms a residual added to the exact ChainMerge optimum of the projected instance. The projection bound holds for every choice of retained intent, so minimizing over that choice can only tighten the certificate.

Proposition 1 extends the envelope to graded count-based decay by replacing the tangents with sorted incident gains.

## Do the exact and certified results hold on the data?

On the 20 TREC queries with row support one, ChainMerge matched marginal greedy on every ERR-IA objective. ChainMerge was 7.2 times faster than marginal greedy at the median on those queries. The authors also ran ChainMerge against exhaustive enumeration on 3,000 generated α-DCG instances and 3,000 generated ERR-IA instances. ChainMerge attained the exhaustive optimum on every one of those generated instances.

In the official TREC Web 2009–2012 judgments, 64.8% of 22,084 positive documents serve a single intent. Only 20 of 198 complete queries satisfy row support one throughout, so the document-level share doesn't carry over to queries. The exact path therefore applies directly to those 20 queries, and the remaining queries need overlap certificates.

![Figure 3: Official TREC Web 2009–2012 diversity judgments. (a) Share of positive documents (light) and of complete queries (dark) with row support one. (b) Sta…](https://refivu.com/papers/9b4b9b8b-a010-4b63-a252-f0cf3a6a3f15/figures/figure-5e2b7ed5959395dc6445f64347c8288c.png?thumb=512)

**Figure 3** : Official TREC Web 2009–2012 diversity judgments. (a) Share of positive documents (light) and of complete queries (dark) with row support one. (b) Status of each com- plete query’s 𝛼-IDCG denominator at 𝐾 = min(20,𝑛). It is exact by ChainMerge, certified optimal by the prefix LP, or left with a positive certified gap. Labels give query counts, and Tables 2 and 3 list the exact values.

[Original paper](https://arxiv.org/abs/2611.10576v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

On 26,700 sampled overlapping pools with exact subset-DP optima, marginal greedy is strictly suboptimal on 168 instances, or 0.63%.

On the 198 complete TREC queries, the prefix LP certifies 189 greedy denominators as globally optimal. That set includes all 20 row-support-one queries and 169 overlapping ones. The mean certified gap is 0.0213% across all queries, and the largest is 1.65%.

## Runtime on MIND-small and leaderboard checks

On the full MIND-small pool of 65,238 candidates, the speed gap between ChainMerge and marginal greedy is large at every cutoff tested. The count-only path runs 2,250 to 25,427 times faster than binary marginal greedy. Figure 4b plots these speedups against the cutoff, with circles for the category grouping and squares for the subcategory grouping.

![Figure 4: Runtime on MIND-small, as medians of three runs. (a) Graded𝛼-DCG with the subcategory grouping (𝐺 = 270) at 𝐾 = 100 over six candidate-pool sizes. (b…](https://refivu.com/papers/9b4b9b8b-a010-4b63-a252-f0cf3a6a3f15/figures/figure-c433e749039438624fd33d5827148c88.png?thumb=512)

**Figure 4** : Runtime on MIND-small, as medians of three runs. (a) Graded𝛼-DCG with the subcategory grouping (𝐺 = 270) at 𝐾 = 100 over six candidate-pool sizes. (b) Speedup on the full pool of 65,238 candidates, for graded ChainMerge over graded marginal greedy (solid) and for the count-only 𝛼-IDCG path over binary marginal greedy (dashed). Circles mark the cate- gory grouping (𝐺 = 18) and squares the subcategory grouping (𝐺 = 270), as in (a). Table 4 lists the timings.

[Original paper](https://arxiv.org/abs/2611.10576v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kehan Liu, Zhaoyun Chen, Xianquan Yan · When Greedy Is Sorting: Exact and Certified Ideal Rankings for Novelty Metrics · Original paper figure · Extracted the figure area from page 8 of the original PDF.

The authors also checked whether exact denominators would change published leaderboard orders. Per-query run scores aren't published, so the authors bound each query's effect conservatively. For each query, the exact denominator lies between the greedy denominator L and the prefix-LP upper bound U, so replacing L lowers a query score by at most λ = U/L − 1.

Two runs keep their order when their intervals are disjoint, so the published order survives every score consistent with the certificates.

The authors computed the exact certificate arithmetic with SoPlex 8.0.3 in rational mode, and HiGHS supplied the numerical solve times.

## Where the exact and certified guarantees stop

The exact path stops at row support one, and it covers only part of the TREC data. The remaining queries therefore depend on certificates rather than on exact computation.

Equality between the LP value and a feasible value proves global optimality. When the certified gap is nonzero, the optimal ranking stays unresolved. Overlapping ERR-IA isn't covered by this certificate.

That bound certifies the denominators, but it doesn't hand the evaluator an exact ideal ranking.

## Paper info

- **Authors**: Kehan Liu, Zhaoyun Chen, Xianquan Yan
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-7
- **Added**: 2026-11-10
- **Updated**: 2026-11-7
- **Version**: v1
- **arXiv**: 2611.10576
- **Category**: cs.IR
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.10576v1) · [PDF ↗](https://arxiv.org/pdf/2611.10576v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

The ideal ranking that normalizes novelty metrics is NP-hard to compute in general, so widely used $α$-nDCG evaluators approximate its denominator with a greedy rule that rescans every remaining document at each rank. We identify a regime in which this ideal ranking is exact and cheap for both $α$-DCG and intent-aware expected reciprocal rank (ERR-IA). When each document is positively judged for at most one intent, each metric reduces to the classical allocation of a fixed budget across chains of decreasing marginal gains. A metric-specific virtual-score transformation followed by a multiway merge, which we call ChainMerge, returns the globally optimal top-$K$ ranking in $O(G+K\\log G)$ time from $G$ preordered intent groups, or in $O(n+K\\log G)$ time from $n$ globally preordered candidates, instead of the $Θ(nK)$ of the greedy rule. When intent judgments overlap, exact $α$-DCG optimization is NP-hard under the standard logarithmic discount and $α=0.5$, even when every document has three intents and every intent occurs in two documents. For arbitrary overlap, a polynomial-size LP over nested ranking prefixes upper-bounds the ideal score and certifies the optimality gap of any feasible ranking. In the official TREC Web 2009-2012 judgments, 64.8% of positive documents serve a single intent, yet only 20 of 198 complete queries do so throughout. Beyond this exact regime, the LP certifies 189 of the 198 greedy denominators as globally optimal, and the resulting score intervals preserve the winner in all eight matched comparison groups. On 65,238 MIND-small candidates, ChainMerge returns identical optimal objectives 17-1,011 times faster than the greedy rule. For $α$-DCG, these results trace the hardness of the ideal ranking to intent overlap.

## Quote from the paper

Kehan Liu, Zhaoyun Chen, Xianquan Yan (2026). When Greedy Is Sorting: Exact and Certified Ideal Rankings for Novelty Metrics. arXiv:2611.10576v1. https://arxiv.org/abs/2611.10576v1

**BibTeX**

```
@misc{liu2026when,
  title = {{When Greedy Is Sorting: Exact and Certified Ideal Rankings for Novelty Metrics}},
  author = {Kehan Liu and Zhaoyun Chen and Xianquan Yan},
  year = {2026},
  eprint = {2611.10576},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.10576v1}
}
```

## Other paper commentary

- [Close and Sort: Exact Maximum-Likelihood Aggregation of Cyclic Rank-Two Preferences](https://refivu.com/en/papers/3e86e3b9-1d2d-4f03-9a7d-c923ae11dc85-close-and-sort-exact-maximum-likelihood-aggregation-of.md)
- [Unsupervised Dense Information Retrieval with Contrastive Learning](https://refivu.com/en/papers/2fbce187-1a33-4d74-941c-36d004c9a79b-unsupervised-dense-information-retrieval-with-contrastive.md)
- [Dense Passage Retrieval for Open-Domain Question Answering](https://refivu.com/en/papers/c44c51e1-e59a-4cb6-8e94-20a4b572abc0-dense-passage-retrieval-for-open-domain-question-answering.md)
- [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://refivu.com/en/papers/569bb9ab-8345-4766-a539-e7ffb7b1754e-retrieval-augmented-generation-for-knowledge-intensive-nlp.md)
- [EchoSpec: Training Search Agents to Weigh Evidence Above Echoes](https://refivu.com/en/papers/22f39cf0-d41a-4695-8d6b-0d26df622012-echospec-training-search-agents-to-weigh-evidence-above.md)
- [UniGraph: A Unified Graph-based Index for Dynamic Hybrid Dense-Sparse Vector Retrieval](https://refivu.com/en/papers/a5ee1bb8-7883-49ee-91f4-322d407f8039-unigraph-a-unified-graph-based-index-for-dynamic.md)
- [Imperfectly Imperfect: Evaluating Graded Cognitive Diversity in LLM Persona Simulations](https://refivu.com/en/papers/2a630784-93c8-4318-8368-838f443309f1-imperfectly-imperfect-evaluating-graded-cognitive-diversity.md)
- [Seeing Isn't Enough: Unlocking Visual Reasoning by Bridging the Reasoning-Access Gap with TIGER](https://refivu.com/en/papers/c32fbf94-4cbb-401d-b218-b88905246194-seeing-isn-t-enough-unlocking-visual-reasoning-by.md)
- [UniLatent: Cross-Embodiment Transfer via Latent Observation Alignment](https://refivu.com/en/papers/34df7b13-6a07-47d8-9c0b-3ed84c8d1337-unilatent-cross-embodiment-transfer-via-latent-observation.md)
- [REFORM-3D: A Representation-Centric Evaluation Framework for 3D Medical Vision Foundation Models](https://refivu.com/en/papers/09c21d02-07bb-40da-a845-16862c6f9fbb-reform-3d-a-representation-centric-evaluation-framework-for.md)
- [fNIRSAtlas: A Large-Scale Benchmark for Functional Near-Infrared Spectroscopy Classification](https://refivu.com/en/papers/737a86b6-67d3-493d-ba06-3a82812f1ecd-fnirsatlas-a-large-scale-benchmark-for-functional-near.md)
- [Done Is Not Correct: Measuring Silent Failures and Self-Verification Calibration When LLM Agents Take CAD Actions](https://refivu.com/en/papers/55faa4f4-f2a8-47b8-b8cf-58bed596872c-done-is-not-correct-measuring-silent-failures-and.md)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/9b4b9b8b-a010-4b63-a252-f0cf3a6a3f15-when-greedy-is-sorting-exact-and-certified-ideal)
