Embedding based measures improve text data diversity assessment
Measuring Data Diversity with Embeddings: A Taxonomy and Benchmark for Diversity Measures
Computation and LanguageMachine Learning
Summary
Measuring how diverse a set of texts is can be tricky, but diversity matters a lot for making better language models and test collections. The authors studied 21 different ways to measure diversity based on text embeddings, which are numerical summaries of the text. They created a benchmark to test these measures and found that while a popular method is often used, some others do a better job of capturing different aspects of diversity. Their work helps people pick the right measure for evaluating or selecting diverse text datasets.
What this means in practice
- •For data engineers: Improve selection of training text data by choosing better diversity measures to increase model robustness and coverage.
- •For test set designers: Use superior diversity metrics to create more balanced and comprehensive evaluation datasets for language models.
Authors
Cantao Su, Anna Wegmann, Esther Ploeger, Dong Nguyen
Abstract
Diversity is a critical property of text corpora, with direct implications for training data curation, test set design, and model generalization. However, its measurement remains fragmented and poorly understood. Existing embedding-based diversity measures vary widely in how they are computed and can yield substantially different diversity scores on the same data, yet no systematic comparison of their empirical behaviour exists. We make two contributions toward addressing this gap. First, we present a taxonomy of 21 embedding-based diversity measures, organizing them into four families based on their underlying computations. Second, we introduce EmbDivBench, a benchmark that evaluates these measures along three conceptually distinct components (variety, balance and disparity) on both simulated and natural text data. Although Mean Pairwise Distance is the most commonly used measure, our experiments show that it is outperformed by several alternatives on the three diversity components, with Graph Entropy being the best choice overall. Lastly, we distil these findings into practical recommendations for diversity measure selection.