Skip to main content
QUICK REVIEW

[Paper Review] Standardizing the Measurement of Text Diversity: A Tool and a Comparative Analysis of Scores

Chantal Shaib, Govindarajan, Venkata S.|ArXiv.org|Mar 1, 2024
Gender Studies in LanguageSocial Sciences4 citations
TL;DR

This paper proposes a standardized, computationally efficient framework for measuring text diversity in LLM outputs using compression ratios, self-repetition of long n-grams, Self-BLEU, and BERTScore. It finds that compression ratio and self-repetition are strong, low-correlation indicators of repetition, and releases an open-source Python package to enable consistent diversity evaluation across datasets and models.

ABSTRACT

The diversity across outputs generated by LLMs shapes perception of their quality and utility. High lexical diversity is often desirable, but there is no standard method to measure this property. Templated answer structures and ``canned'' responses across different documents are readily noticeable, but difficult to visualize across large corpora. This work aims to standardize measurement of text diversity. Specifically, we empirically investigate the convergent validity of existing scores across English texts, and we release diversity, an open-source Python package for measuring and extracting repetition in text. We also build a platform based on diversity for users to interactively explore repetition in text. We find that fast compression algorithms capture information similar to what is measured by slow-to-compute $n$-gram overlap homogeneity scores. Further, a combination of measures -- compression ratios, self-repetition of long $n$-grams, and Self-BLEU and BERTScore -- are sufficient to report, as they have low mutual correlation with each other.

Motivation & Objective

  • To address the lack of a standardized, reliable metric for measuring repetition and diversity in LLM-generated text.
  • To identify a minimal set of computationally efficient and statistically independent diversity scores that capture key aspects of repetition.
  • To evaluate the performance of these scores across diverse text types, including model-generated summaries, essays, and instruction-tuning datasets.
  • To release an open-source Python package to promote consistency and reproducibility in diversity evaluation across NLP research.

Proposed method

  • Empirically compare 12 diversity scores across multiple LLM-generated English text datasets, including CNN/DM summaries and instruction-tuning data.
  • Use compression ratio (via gzip) as a fast proxy for information content and repetition, measuring both raw text and part-of-speech (POS) sequences.
  • Compute self-repetition of long n-grams (n ≥ 5) to detect exact or near-exact repetition across different outputs.
  • Apply Self-BLEU and BERTScore to assess n-gram and semantic overlap, respectively, and evaluate their correlation with other metrics.
  • Control for text length by truncating or downsampling, and report length alongside all diversity scores to ensure interpretability.
  • Release the `diversity` Python package (PyPI) to enable researchers to compute and compare these scores consistently.
Figure 1: Correlations between text diversity scores on CNN/DM. Compression ratio correlates strongly with most other diversity metrics.
Figure 1: Correlations between text diversity scores on CNN/DM. Compression ratio correlates strongly with most other diversity metrics.

Experimental results

Research questions

  • RQ1Which diversity scores are most effective at capturing repetition in LLM-generated text, and how do they correlate with one another?
  • RQ2Can computationally efficient scores like compression ratio reliably replace slower, more complex metrics such as n-gram homogeneity or BERTScore?
  • RQ3How do diversity scores vary across different types of text, such as model-generated summaries, essays, and instruction-tuning datasets?
  • RQ4To what extent does text length confound diversity measurements, and how can this be mitigated in comparative studies?
  • RQ5Which combination of scores provides the most informative and independent characterization of text diversity?

Key findings

  • Compression ratio of raw text and POS sequences correlates strongly with more complex diversity scores and is computationally efficient, making it a strong candidate for standardization.
  • Self-repetition of long n-grams (n ≥ 5) is a highly interpretable and moderately uncorrelated measure that effectively captures exact repetition across outputs.
  • Self-BLEU shows weak correlation with compression and self-repetition, making it a useful complementary metric despite its computational cost.
  • BERTScore shows minimal variation between human and model-generated text and is poorly correlated with length-adjusted diversity, suggesting limited utility for diversity evaluation.
  • Length is a major confounder: all diversity scores are strongly correlated with text length, necessitating length reporting or normalization for valid comparisons.
  • The Open Assistant instruction dataset exhibits significantly higher diversity than Dolly, Alpaca, and Super-NaturalInstructions, while Unnatural Instructions show extreme repetition, indicating potential data quality issues.
Figure 2: Correlations between diversity metrics, BERTScore, and ROUGE-1. Both reference-based metrics are weakly correlated with CR and Hom. (BERT), and moderately anti-correlated with Self-BLEU.
Figure 2: Correlations between diversity metrics, BERTScore, and ROUGE-1. Both reference-based metrics are weakly correlated with CR and Hom. (BERT), and moderately anti-correlated with Self-BLEU.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.