Scalable In-context Ranking with Generative Models
ELVIA analysis
Independent review pending
The first reported finding concerns “MRR lacks the requested cutoff and empty predictions count as correct”. The current released metric helpers still violate their cutoff and empty-output contracts. Correcting affected scores requires predictions and relevance labels; no numerical change to the paper’s original tables has been established.
Problem 1. MRR lacks the requested cutoff and empty predictions count as correct
MinorEvidence and reasoning
Problem statement
The paper reports MRR@ and P@
Proof
The current evaluation requests untruncated recip_rank and copies that one result into every reported MRR cutoff.
For one query with candidates, only the last relevant, predicting only the first causes unpredicted candidates to be filled with zero scores. The relevant item then contributes to the release’s MRR@ although no relevant item was returned within the cutoff and the correct truncated value is zero. Separately, an empty prediction becomes an empty top-one set; the code’s subset test accepts it against any ground-truth set. Precision@ requires an actual relevant first item, so this empty-output success is false. These are current source behaviors, not reconstructed historical table measurements.
Possible revision
Apply the rank cutoff before reciprocal-rank scoring; return zero for empty predictions; preserve IDs/scores explicitly.
The latest author default head retains both the copied untruncated reciprocal-rank result and empty-set subset check. The original paper explicitly used JAX/TPU, so the later PyTorch evaluator is not assumed to be its historical evaluator.
Problem 2. The later scoring denominator changes document rankings
MinorEvidence and reasoning
Problem statement
The paper normalizes query-to-document attention over document tokens.
Proof
The paper normalizes each head over document tokens.
The current release instead includes instruction/query token mass in each denominator, reweighting heads before aggregation.
For two one-token documents and two heads, let document exponential masses be and with other-token masses and respectively. All values are positive and hence realizable by finite logits. Document-only means are ranking A first; the current all-token means are ranking B first. A single head or equal document-mass fractions across heads preserves ranking, which bounds the counterexample. The change is attributed to the author’s later public normalization commit and may be intentional; it is not established to be an accidental defect.
Possible revision
Use the documented document-token denominator or explicitly describe the alternate scoring variant. Historical table attribution remains unresolved.
The current default head retains the later all-token denominator. The change is historically attributed to the December author commit. Restoring document-only normalization is conditional on seeking the paper’s scoring definition; no claim of author intent or adoption is made.
Problem 3. SDPA ranking logits omit attention scaling
MinorEvidence and reasoning
Problem statement
The SDPA and eager attention backends should return equivalent ranking logits for the same query/key tensors.
Proof
The hidden-output SDPA call receives the correct scaling, but its separately returned ranking logits are plus mask, omitting Set query and key first coordinates with other coordinates zero; the middle two pairs are documents A and B. Correct scaled document exponential sums satisfy ranking B first. Unscaled returned sums satisfy ranking A first. A common positive scaling of individual logits does not preserve a ranking obtained after exponentiation and token aggregation. The hidden-output operation remains correctly scaled; the discrepancy is specifically in the returned score path.
Possible revision
Apply to returned logits under the same convention, then check backend parity.
Current SDPA code retains the missing scale in the independent returned-logit construction. The existing local correction scales that product before adding its mask; it changes no already-correct hidden-output computation and has no demonstrated benchmark result.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
Motivated by these observations, we introduce BlockRank (Blockwise In-context Ranking), a novel method that adapts the attention operation in an LLM by (a) architecturally enforcing the observed inter-document block sparsity, reducing attention complexity from quadratic to linear without loss in performance, and (b) optimizing query-document block relevance for true relevant documents during fine-tuning using an auxiliary contrastive training objective, improving retrieval in attention.
NeurIPS 2025 official proceedings PDF (current publisher bytes, checked 2026-10-21); Abstract, PDF p. 1
Actual review scope
The recorded inspection concerns these source locations: Section 5.1, PDF p. 8; current src/blockrank/utils.py, evaluation metrics lines 352–358 and 412–443; scripts/eval_attn.py, incremental evaluator; Sections 4.2/4.3, PDF pp. 7–8; current src/blockrank/losses.py, document score normalization lines 65–80; December 2025 normalization change; Section 4.2, PDF p. 7; current blockrank_std_attention.py, SDPA return-score construction lines 640–645.