Repository navigation
fix: state the WER/CER caps in every published POSEIDON formula (#291) - #294
Merged
Merged
Conversation
The composite caps WER and CER at 1.0 before use while the artifact columns publish the raw values, and the formula was documented without the caps — so for any row whose WER or CER exceeds 1 (ordinary insertion behaviour) the published poseidon_score could not be arrived at from the wer, cer and semantic_similarity printed beside it. The computation is deliberately unchanged: capping the published columns would misreport WER/CER themselves and shift wer_mean/cer_mean (unlike out-of-range cosine similarity, a WER of 6.67 is a real measurement, not noise — which is why the #107 clamp-at-computation convention fits similarity but not the error rates), and uncapping the composite would change every affected published score. Instead the formula now carries the caps everywhere it is stated — the calculate_poseidon_score docstring, docs/FAQ.md, benchmark/README.md (with a new bullet in the metric-ranges convention section naming both sides of the convention), and the PoseidonScorer docstring — so a published score is checkable against its published parts. Regression tests pin the documented formula to the computation, including the issue's exact row.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #291.
calculate_poseidon_scorecaps WER and CER at 1.0 before use while the artifact columns publish the raw values, and every statement of the formula (metrics.pydocstring,docs/FAQ.md,benchmark/README.md) omitted the caps — so for any row with WER or CER above 1, recomputing from the published components gave a different number than the published score (the issue's row: −3.30 by the documented formula vs 0.033 in the artifact).Direction taken (the call the issue left to maintainers)
The computation is unchanged; the documentation now states the real formula. The other two directions both damage something:
wer/cercolumns (the literal [Bug] Three scoring paths disagree on missing metrics, and semantic similarity is clamped in one place but averaged raw in another #107 treatment) would misreport the error rates themselves and shiftwer_mean/cer_meanon the leaderboard. The [Bug] Three scoring paths disagree on missing metrics, and semantic similarity is clamped in one place but averaged raw in another #107 clamp-at-computation convention fits cosine similarity because out-of-range cosine is numerical noise; a WER of 6.67 from insertions is a real measurement.With the caps stated in the formula, a published
poseidon_scoreis checkable against the components printed beside it — the property the issue asks for.Changes
calculate_poseidon_scoredocstring: formula rewritten asw_wer·(1 − min(WER, 1)) + w_cer·(1 − min(CER, 1)) + w_sem·Similarity, clamped to [0, 1], with the raw-columns/capped-composite convention and its rationale spelled out; a comment at the cap lines marks them as part of the published formula.benchmark/README.md: the "Missing values and metric ranges" convention section gains a bullet stating both sides — columns raw, composite capped — and the exact recomputation formula.docs/FAQ.md: the POSEIDON row of the metric table carries the capped formula and the raw-columns note.PoseidonScorerdocstring: one sentence on the same convention.Testing
TestPublishedScoreIsCheckableintests/unit/test_metrics.py: the issue's exact row (WER 6.67, CER 7.77, sim 0.0739, weights 0.35/0.20/0.45) equals both the artifact value it observed (0.45 × sim) and the now-documented formula applied to the raw components; a parametrized grid (perfect, ordinary, floor, WER-overshoot, CER-overshoot, the issue's row) pins the computation to the documented formula; an in-range row confirms no ordinary score moves.test_metrics.py+test_scorer.py: 39 passed.ruff check,ruff format --check,ty checkclean.