Skip to main content
QUICK REVIEW

[Paper Review] Exploring Precision and Recall to assess the quality and diversity of LLMs

Florian Le Bronnec, Alexandre Vérine|arXiv (Cornell University)|Feb 16, 2024
Wikis in Education and CollaborationSocial Sciences3 citations
TL;DR

This paper adapts Precision and Recall metrics—originally for image generation—to evaluate the quality and diversity of text generated by large language models (LLMs) like Llama-2 and Mistral. By comparing the model's output distribution to a reference distribution without requiring aligned human references, the method reveals a key trade-off: fine-tuning with human feedback boosts generation quality (higher Precision) but reduces output diversity (lower Recall).

ABSTRACT

We introduce a novel evaluation framework for Large Language Models (LLMs) such as extsc{Llama-2} and extsc{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.

Motivation & Objective

  • To address the limitations of traditional, reference-based evaluation methods for open-ended LLM generation.
  • To develop a distribution-based evaluation framework that does not rely on human-annotated reference corpora.
  • To provide a nuanced assessment of LLMs across both quality (Precision) and diversity (Recall) in text generation.
  • To investigate the impact of human feedback fine-tuning on the balance between quality and diversity in LLM outputs.
  • To extend distribution-based metrics like MAUVE by introducing Precision and Recall for more interpretable and actionable insights.

Proposed method

  • Model the LLM's output as a distribution Q and the reference dataset (e.g., WebText) as a distribution P.
  • Compute Precision as the fraction of Q’s samples that are close to P, measuring how relevant or high-quality the generated text is.
  • Compute Recall as the fraction of P’s samples that are covered by Q, measuring the diversity of the model’s output.
  • Use embedding-based similarity (e.g., sentence-BERT) to define 'closeness' between samples for both metrics.
  • Apply the metrics to zero-shot and instruction-fine-tuned LLMs (e.g., Llama-2, Mistral) on open-ended biographical generation tasks.
  • Report results with error ellipses to show statistical uncertainty, enabling comparison across models.
Figure 1: Precision and Recall of various models on generating the WebText dataset, with the 2 standard deviation error ellipsis. Chat and pre-trained models different behaviors are clearly captured by our metrics.
Figure 1: Precision and Recall of various models on generating the WebText dataset, with the 2 standard deviation error ellipsis. Chat and pre-trained models different behaviors are clearly captured by our metrics.

Experimental results

Research questions

  • RQ1How can Precision and Recall be meaningfully adapted from image generation to text generation in LLMs?
  • RQ2To what extent do state-of-the-art LLMs like Llama-2 and Mistral achieve high-quality and diverse outputs on open-ended generation tasks?
  • RQ3What is the impact of human feedback fine-tuning on the trade-off between generation quality and diversity?
  • RQ4How do Precision and Recall compare to existing distribution-based metrics like MAUVE in capturing model behavior?
  • RQ5Can Precision and Recall detect specific failure modes such as repetition or low-quality hallucinations in LLM outputs?

Key findings

  • Fine-tuning LLMs with human feedback significantly improves Precision, indicating higher-quality and more relevant outputs.
  • However, this improvement comes at the cost of reduced Recall, indicating a notable decline in output diversity.
  • Mistral Instruct v0.2 exhibits extremely low Recall (near zero) on biographical generation, generating the same biography repeatedly despite high diversity in the reference set.
  • Llama-2-7b shows high Recall but low Precision, indicating diverse outputs that are often factually or contextually inaccurate.
  • The trade-off between Precision and Recall is empirically quantified and visualized, revealing a clear performance frontier across models.
  • The proposed framework successfully identifies model-specific failure modes—such as repetition (low Recall) or low-quality generation (low Precision)—that are not captured by standard benchmarks.
(a) $Q_{1}$ . P $\approx 0.95$ , R $\approx 0$ .
(a) $Q_{1}$ . P $\approx 0.95$ , R $\approx 0$ .

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.