Enhancing Diversity in Large Language Models via Determinantal Point Processes

Yilei Chen, Souradip Chakraborty, Lorenz Wolf, Ioannis Ch. Paschalidis, Aldo Pacchiano · OpenReview

Abstract

Reinforcement learning (RL) has emerged as a popular method for post-training large language models (LLMs). While improving the model's performance on downstream tasks, it often reduces the model's output diversity, leading to narrow, canonical responses. Existing methods to enhance diversity are limited, either by operating at inference time or by focusing on surface-level differences. We propose a novel training method named DQO (Diversity Quality Optimization) based on determinantal point processes (DPPs) to jointly optimize LLMs for quality and semantic diversity. Our approach samples and embeds a group of responses for each prompt, then uses the determinant of a kernel-based similarity matrix to measure diversity as the volume spanned by the embeddings of these responses. DQO is flexible and can be applied on top of existing RL algorithms. Experiments across instruction-following, summarization, story generation, and reasoning tasks demonstrate that our method substantially improves semantic diversity without sacrificing model quality.

Introduction

Post-training Large Language Models (LLMs) using Reinforcement Learning from Human Feedback (RLHF) or algorithms like Proximal Policy Optimization (PPO) and Group Relative Policy Optimization (GRPO) has become standard practice to align models with human preferences. However, these methods often suffer from mode collapse, where the model converges on a narrow set of "safe" or "canonical" responses to maximize a single reward signal. This lack of diversity hinders creativity in storytelling, limits the exploration of alternative reasoning paths in problem-solving, and reduces the model's overall robustness.

While inference-time techniques like increasing temperature or applying lexical penalties exist, they often fail to capture true semantic diversity and can lead to a degradation in output quality. This paper introduces Diversity Quality Optimization (DQO), a training-time intervention designed to foster semantic variety without compromising performance.

Methodology: Diversity Quality Optimization (DQO)

DQO treats a set of generated responses as a "point process" and leverages the mathematical properties of Determinantal Point Processes (DPPs). The core idea is to measure diversity as the volume spanned by response embeddings in a high-dimensional space.

The DQO training framework, which jointly optimizes for reward and semantic diversity using a Determinantal Point Process (DPP) objective.

The process involves:

  1. Response Sampling: For a given prompt $x$, the policy model generates a group of responses $y_1, \dots, y_k$.
  2. Embedding and Similarity: These responses are mapped to an embedding space. A similarity matrix (Gram matrix) is constructed based on these embeddings.
  3. Determinant as Diversity: The determinant of this matrix represents the volume of the parallelepiped formed by the vectors. If responses are semantically similar, the vectors are nearly linearly dependent, and the volume (diversity score) approaches zero.
  4. Joint Optimization: The training objective combines the standard quality reward with the log-determinant of the similarity matrix. A key insight of DQO is that the reward acts as a scaling factor: to maximize the objective, the model must produce vectors that are both "long" (high quality) and "orthogonal" (semantically diverse).

To ensure training stability, the authors utilize a leave-one-out (loo) gradient estimator and numerical stabilization techniques to handle the high variance of determinant calculations.

Experimental Results

The effectiveness of DQO was evaluated across four diverse domains: reasoning (GSM8K), summarization (CNN-DailyMail), instruction-following (Dolly), and creative writing (CommonGen).

Normalized scores across four task categories, showing DQO's significant gains in diversity while maintaining or improving quality compared to PPO/GRPO baselines.

Key Findings:

  • Improved Pareto Frontier: DQO consistently achieves a superior balance between quality and diversity compared to standard RL baselines.
  • Reasoning (GSM8K): While maintaining a high accuracy (76.3% pass@1), DQO nearly tripled the diversity of reasoning paths compared to standard GRPO, which is crucial for multi-step problem solving.
  • Instruction-Following (Dolly): DQO improved the pass@1 score to 5.92 (vs. 5.65 for PPO) while significantly increasing semantic diversity as measured by LLM-as-a-judge.
  • Semantic vs. Lexical Diversity: By operating in the embedding space rather than on n-gram overlaps, DQO encourages the generation of distinct ideas rather than just different word choices.

Discussion and Limitations

While DQO represents a significant step forward, it is not without challenges. In reasoning tasks with binary "right/wrong" rewards, models can occasionally engage in "reward hacking"—providing a correct answer followed by diverse gibberish to inflate the diversity metric. Future work involves using more sophisticated reward models to mitigate this. Additionally, the method's performance is inherently tied to the quality of the underlying embedding model used to define the semantic space.

In conclusion, DQO provides a robust, flexible framework for training LLMs that are not only accurate but also creative and diverse, effectively expanding the "semantic horizon" of modern AI models.

Summary updated

BibTeX
@inproceedings{chen2025enhancing,
  author = {Yilei Chen and Souradip Chakraborty and Lorenz Wolf and Ioannis Ch. Paschalidis and Aldo Pacchiano},
  title = {{Enhancing Diversity in Large Language Models via Determinantal Point Processes}},
  booktitle = {ARLET @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=v74LJpeUYX},
}
Figure