Exploring Precision and Recall to assess the quality and diversity of LLMs
Florian Le Bronnec, Alexandre Verine, Benjamin Negrevergne, Yann Chevaleyre, Alexandre Allauzen
TL;DR
This work introduces a distribution-based evaluation framework for open-ended text generation by adapting Precision and Recall from image generation to NLP, comparing model outputs against a reference distribution without requiring aligned corpora. It defines Precision as the probability that model outputs fall within the reference support, and Recall as the probability that the reference support is covered by the model, both estimated in a latent space via $k$-NN after PCA. The authors demonstrate that separating quality (Precision) and diversity (Recall) yields clearer insights than single-metric baselines, revealing a trade-off influenced by instruction-tuning and model size across tasks like WebText, biographies, and creative writing. They show that instruction-tuned models are more precise but less diverse, larger models tend to be more diverse, and that in-context prompts can boost diversity for chat-style models, albeit with plateau effects. The framework extends the distribution-based NLP evaluation toolkit, enabling nuanced assessments of open-ended generation and offering practical guidance for model development, with code and data released for reproducibility and broader adoption.
Abstract
We introduce a novel evaluation framework for Large Language Models (LLMs) such as \textsc{Llama-2} and \textsc{Mistral}, focusing on importing Precision and Recall metrics from image generation to text generation. This approach allows for a nuanced assessment of the quality and diversity of generated text without the need for aligned corpora. By conducting a comprehensive evaluation of state-of-the-art language models, the study reveals new insights into their performance on open-ended generation tasks, which are not adequately captured by traditional benchmarks. The findings highlight a trade-off between the quality and diversity of generated samples, particularly when models are fine-tuned on instruction dataset or with human feedback. This work extends the toolkit for distribution-based NLP evaluation, offering insights into the practical capabilities and challenges that current LLMs face in generating diverse and high-quality text. We release our code and data.
