Quality-Diversity through AI Feedback

Herbie Bradley, Andrew Dai, Hannah Benita Teufel, Jenny Zhang, Koen Oostermeijer, Marco Bellagente, Jeff Clune, Kenneth Stanley, Gregory Schott, Joel Lehman

TL;DR

QDAIF (Quality-Diversity through AI Feedback) is a novel framework that enables AI to independently explore creative spaces—such as story writing or poetry—by utilizing Large Language Models (LLMs) as both the "creator" and the "critic." By automating the evaluation of subjective traits like genre, tone, and quality, QDAIF generates a diverse library of high-quality outputs that far exceed the variety produced by standard prompting techniques.

The Problem: Evaluating Subjective Quality and Diversity

In traditional machine learning, optimization typically focuses on finding a single "best" answer. However, in creative fields like writing, design, or architecture, users rarely want just one answer; they prefer a diverse menu of high-quality options.

The field of Quality-Diversity (QD) search was designed specifically for this purpose, aiming to populate an "archive" of solutions that are both high-performing and fundamentally distinct from one another. Historically, QD has been limited to domains where quality and diversity can be defined mathematically (e.g., a robot's speed and its weight). It has struggled with qualitative domains like creative writing because there is no simple formula to quantify "how much of a horror story is this?" or "how poetic is this prose?"

This paper addresses this "evaluation bottleneck" by replacing hand-coded mathematical heuristics with natural language AI feedback.

Methods: Combining MAP-Elites with LLMs

The authors combine a classic QD algorithm called MAP-Elites with the generative capabilities of LLMs. The process operates in a continuous loop:

  1. Initialization: The system starts with a few "seed" examples (e.g., three short opinions about vegetables).
  2. Mutation (LMX): The system selects a successful text from its archive and uses an LLM to create a variation. This step employs Language Model Crossover (LMX), where the model is shown existing examples and prompted to generate something "near" or "inspired" by them.
  3. AI Feedback (The Critic): A separate (or the same) LLM acts as the evaluator. It is prompted to:
  4. Rate Quality: "On a scale of 1-10, how well-written is this?"
    • Categorize Diversity: "Is this story a romance or a horror? Does it have a happy or tragic ending?"
  5. Archive Update: If the newly generated text is evaluated as better than the existing entry in its specific "bin" (e.g., the "Horror with a Happy Ending" bin), it replaces the old one.

A key technical innovation introduced here is non-uniform binning. Because LLM confidence scores (logits) are not linear—meaning the jump from 0.9 to 0.99 is much more significant than from 0.5 to 0.6—the authors utilize custom-sized bins to better align the AI's internal probability distributions with human perception.

Key Insights

  • The LLM as a "Fuzzy" Metric: The most significant insight is that modern LLMs are capable enough to serve as the "fitness function" for evolutionary algorithms. They can quantify nuances that were previously considered un-quantifiable.
  • Diversity Prevents Stagnation: Standard "Quality-Only" optimization often gets stuck in a loop, repeating the same high-scoring phrases. By forcing the model to find diverse high-quality samples, QDAIF discovers more creative and interesting content (e.g., a story about a spy turning into a monster versus a standard "stabbed in the back" plot).
  • The "Reward Hacking" Threshold: The authors observed a fascinating phenomenon regarding alignment. AI and human ratings correlate well up to a point, but at the extreme high end of AI confidence (e.g., 0.995+), the correlation drops. The model essentially learns to "hack" the evaluator by using specific phrases the critic favors, even if the actual quality decreases.

Key Results

The paper evaluates the method across four distinct domains: Opinions, Short Stories, Poetry, and Coding (Python sorting algorithms).

  • Superior Coverage: In the Poetry domain, QDAIF achieved a QD score (a measure combining quality and archive coverage) of 130, compared to just 76 for random sampling.
  • Human Alignment: Human evaluators agreed with the AI's diversity categorizations 73% to 82% of the time, suggesting that AI feedback is a reliable proxy for human judgment in these subjective tasks.
  • Creative Coding: When tasked with writing sorting algorithms without using the sort() keyword, standard prompting almost exclusively produced "Bubble Sort." QDAIF, however, successfully evolved a wide variety of algorithms, including Quick Sort, Insertion Sort, and Merge Sort, by explicitly seeking diversity in code structure.
Comparison of QDAIF and Baseline archives for Short Stories

As seen in the Short Stories domain, QDAIF successfully fills a much larger portion of the specified search space (Genre vs. Ending) with high-quality, distinct narratives compared to the baseline.

Limitations and Future Work

  • Reward Hacking: As noted, models can sometimes prioritize "pleasing the evaluator" over genuine creative quality. The authors suggest using ensembles of different AI models or Reinforcement Learning from Human Feedback (RLHF) to mitigate this issue.
  • Fixed Axes: Currently, a human must still define the axes of diversity (e.g., specifying a desire for diversity in genre). A major future step is Autonomous QD, where the AI analyzes a pool of outputs and independently discovers which dimensions (like "perspective" or "setting") would be interesting to explore.
  • Multimodal Expansion: The authors view QDAIF as a recipe that could easily be extended to image generation, 3D modeling, or music, where "quality" is equally subjective and diversity is highly valued.

Summary updated

BibTeX
@inproceedings{bradley2024quality,
  author = {Herbie Bradley and Andrew Dai and Hannah Benita Teufel and Jenny Zhang and Koen Oostermeijer and Marco Bellagente and Jeff Clune and Kenneth Stanley and Gregory Schott and Joel Lehman},
  title = {{Quality-Diversity through AI Feedback}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=owokKCrGYr},
}
Figure