Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Fix wer_summary reporting WER=0.0 when all scored references are empty - #3102

Open
Virtuoso461 wants to merge 8 commits into
speechbrain:mainfrom
Virtuoso461:fix/wer-summary-empty-references
Open

Virtuoso461 wants to merge 8 commits into
speechbrain:mainfrom
Virtuoso461:fix/wer-summary-empty-references

Conversation

@Virtuoso461

Copy link
Copy Markdown

Fixes #3090

What does this PR do?

wer_summary reported WER = 0.0 whenever every scored reference was empty (num_scored_tokens == 0), discarding the accumulated edits. Insertion-only hypotheses against empty references (e.g. hallucination scoring on a non-speech/silence set, or a normalizer/manifest bug emptying the references) looked like perfect transcriptions to any logic that reads WER only — including checkpoint selection, LR annealing and early stopping in recipes.

The issue proposes two options; this PR takes option 2:

WER = 100.0 * num_edits / max(1, num_scored_tokens)

because it matches the existing utterance-level convention in wer_details_by_utterance (same file), and it keeps the no-error case at 0.0 (option 1, nan, would also change the empty-ref/empty-hyp case from 0.0 to nan and break downstream comparisons).

Tests

Added test_wer_summary_all_empty_references to tests/unittests/test_edit_distance.py:

  • all-empty references + 3 insertions → WER == 300.0 (was 0.0; fails on unpatched tree)
  • all-empty references + no edits → still 0.0
  • regular mixed case → unchanged

Full file: 5 passed.

pplantinga and others added 8 commits October 11, 2026 16:10
…tected (speechbrain#3080)

Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
…lename (speechbrain#3093)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
… and min_count (speechbrain#3095)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
…peechbrain#3087)

Signed-off-by: li-lizhe <147392333@qq.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
Co-authored-by: Peter Plantinga <plantinga.peter@protonmail.com>
When every scored reference is empty (num_scored_tokens == 0), wer_summary
unconditionally reported WER = 0.0, discarding accumulated edits: pure
insertion hypotheses against empty references looked like perfect
transcriptions, which misleads checkpoint selection / early stopping that
read WER only.

Use 100.0 * num_edits / max(1, num_scored_tokens), matching the
utterance-level convention in wer_details_by_utterance. No-error cases
still report 0.0.

Fixes speechbrain#3090
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.

6 participants