Smooth-BLEU bug fixed#1
Open
Aktsvigun wants to merge 2 commits into
Open
Conversation
AlexGidiotis
requested changes
Jul 6, 2022
AlexGidiotis
left a comment
Owner
There was a problem hiding this comment.
@Aktsvigun nice work 🚀 Could we add a unit test for this function under test/test_bleuvar.py?
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.
Alexios, hi once again!
I guess I've found a bottleneck in the current implementation. Namely, the smoothing method is not the ideal at the moment. It still cuts the values for sentences of less than 4 tokens (please see the attached image 1). This results in unreasonably high BLEUVar scores for short sentences even when the model is confident about the instance (even when the results are constant across 20 MC runs, we get the minimum of 0.468 for two-token summaries).
This is especially aggravated for AESLC dataset, where the summaries are extremely short (please see the distribution of lengths of golden summaries after tokenization in image 2). To be precise, 49.5% of summaries from train sample are of length less than 4 tokens after tokenization - which means that the current implementation of BLEUVar scores calculation is highly biased towards short summaries).
This PR request aims at fixing this bug.
Kind,
Akim Tsvigun