Skip to content

Correct out-of-range nDCG@10 and guard metric bounds - #37

Merged
radinhamidi merged 1 commit into
mainfrom
fix/scifact-q2d-zs-ndcg-and-metric-range-guard
Jun 19, 2026
Merged

Correct out-of-range nDCG@10 and guard metric bounds#37
radinhamidi merged 1 commit into
mainfrom
fix/scifact-q2d-zs-ndcg-and-metric-range-guard

Conversation

@radinhamidi

Copy link
Copy Markdown
Member

Summary

One result carried an impossible ndcg_cut_10 = 23.0 (ranking metrics are normalized to [0, 1]), silently inflating the method's average and its ranking. This corrects the value and adds a guard so it can't recur.

The corrupt runquery2doc (zs) / gpt-4.1-nano / splade-pp / beir-v1.0.0-scifact, params_hash a5413fcf:

  • Corrected metrics.ndcg_cut_100.7116 (in line with the fs=0.7121 / cot=0.7065 siblings; recall_100=0.9493 was already fine).
  • Recomputed the content-derived run_id (5e651b293bffa080c46db351c9adb090) — run_id hashes the metrics by design, so a result change must change it.
  • Regenerated results.csv + manifest.json via aggregate_runs.py (2270 rows unchanged; new content hash).
  • It was the only out-of-range value across all 2270 rows.

Root-cause guardvalidate() now rejects any metric value outside [0, 1] (_validate_metric_ranges), so a corrupt or mis-scaled score is blocked at validate/aggregate time and in CI. Code-level check (like the absolute-path guard); schema.json is unchanged, so schema_version stays at 1.

Test plan

  • pytest reproducibility/tests/ — 54 passed (3 new: value >1, value <0, bounds OK)
  • python reproducibility/scripts/aggregate_runs.py --check — passes
  • Old run_id and the 23.0 value no longer present in results.csv

🤖 Generated with Claude Code

The query2doc (zs) / gpt-4.1-nano / splade-pp / scifact run carried
ndcg_cut_10 = 23.0 — impossible for a normalized ranking metric, which
silently inflated the method's average. Correct it to 0.7116, recompute the
content-derived run_id, and regenerate results.csv + manifest.json.

Add a validate() guard that rejects any metric value outside [0, 1] so a
corrupt or mis-scaled score can no longer be committed or pass CI. This is a
code-level check (like the absolute-path guard) — schema.json is unchanged, so
schema_version stays at 1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@radinhamidi
radinhamidi merged commit a4c0f49 into main Jun 19, 2026
2 checks passed
@radinhamidi
radinhamidi deleted the fix/scifact-q2d-zs-ndcg-and-metric-range-guard branch June 19, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant