BERTScore values typically fall within a narrow range (e.g., 0.85 to 0.95 for RoBERTa-large) due to the nature of cosine similarities in contextual embeddings. To make scores more interpretable and map them to a more natural range (e.g., 0 to 1), you can use the rescaling feature available in version 0.3.0 and later.
Rescaling uses a linear transformation: $\hat{X} = \frac{X-Base}{1-Base}$, where Base is a pre-computed lower bound for a specific language and model. This operation preserves the correlation with human judgment (Pearson's $r$ and Kendall's $\tau$).
Requirements:
- You must specify the
lang parameter to use this feature. - The rescaling is applied after the BERTScore is computed.
out = bert_score.score(
cands, refs,
rescale_with_baseline=True, lang="en"
)