SimpleStrat: Diversifying Language Model Generation with Stratification

Justin Wong, Yury Orlovskiy, Michael Luo, Sanjit A. Seshia, Joseph E. Gonzalez
10/11/2024
cs.CLcs.AI

No official code found. Best implementation: jwong8314/simplestrat (1 star, last commit 2025-12-04).

Abstract

Generating diverse responses from large language models (LLMs) is crucial for applications such as planning/search and synthetic data generation, where diversity provides distinct answers across generations. Prior approaches rely on increasing temperature to increase diversity. However, contrary to popular belief, we show not only does this approach produce lower quality individual generations as temperature increases, but it depends on model's next-token probabilities being similar to the true distribution of answers. We propose SimpleStrat, an alternative approach that uses the language model itself to partition the space into strata. At inference, a random stratum is selected and a sample drawn from within the strata. To measure diversity, we introduce CoverageQA, a dataset of underspecified questions with multiple equally plausible answers, and assess diversity by measuring KL Divergence between the output distribution and uniform distribution over valid ground truth answers. As computing probability per response/solution for proprietary models is infeasible, we measure recall on ground truth solutions. Our evaluation show using SimpleStrat achieves higher recall by 0.05 compared to GPT-4o and 0.36 average reduction in KL Divergence compared to Llama 3.

View on arXivView PDF

Code Implementations(1)

Code base for SimpleStrat: Diversifying Language Model Generation with Stratification

10PythonOct 24, 202510 months ago

Similar Papers

Cite this paper

@article{wong2024simplestrat,
  title  = {SimpleStrat: Diversifying Language Model Generation with Stratification},
  author = {Justin Wong and Yury Orlovskiy and Michael Luo and Sanjit A. Seshia and Joseph E. Gonzalez},
  year   = {2024},
  eprint = {2410.09038},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.09038v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.09038.svg)](https://codeofpaper.com/paper/2410.09038)

Discussion