SimpleStrat: Diversifying Language Model Generation with Stratification

## Abstract

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.

## 1 Introduction.

Large language models (LLMs) are routinely resampled in order to get a wide set of plausible generations. Three key settings where this is important are: 1) improving downstream accuracy with planning or search for agentic tasks (i.e. Tree-of-thought (Yao et al., ), AgentQ (Putta et al., )), 2) estimating prediction uncertainty (Aichberger et al., ), and 3) generating diverse datasets for post-training (Dubey et al., ) and fine-tuning (Dai et al., ). All these use cases rely on the model generating multiple plausible generations for the same prompt when multiple answers exists.

Naively, increasing temperature, a parameter that controllably flattens an LLM’s softmax, can improve an LLM’s generation diversity. However, temperature introduces two problems. First, higher temperatures degrades generation quality. Recent evidence suggests removing temperature scaling is desirable for multi-step reasoning to reduce errors compounding (Zhang et al., ).
This is especially critical in syntax sensitive settings like code generation where low temperatures ($\leq 0.15$) are often used. Second, controlling for temperature does not necessarily improve diversity in the answer space. In Figure 1, we illustrate increasing temperature doesn’t lead to meaningful increase in diversity if the model is excessively confident and suffers from mode collapse. When asked to "Name a US State," the model heavily skews towards answering "California", high temperature only marginally softens the skew while surfacing incorrect answers and hurting instruction following.

Our goal is to improve diversity when resampling LLMs, even in cases of severe mode collapse in next-token probabilities without manual intervention. Our analysis reveals that GPT-4 assigns 87% of its logit weight to "California" when prompted to name a US state. This observed bias can be attributed to the worsening of calibration due to post-training as reported in the GPT-4 tech report (OpenAI et al., ). This stark bias mirrors human cognitive bias, exemplified by the blue-seven phenomenon—where individuals disproportionately select blue and seven when asked to choose a random color and number. To counteract similar biases in human populations, social scientists, particularly in political polling, employ stratified sampling techniques (Simpson, ; Howell, ; Morris, ). We propose adapting this method to address mode collapse in LLMs.

We propose SimpleStrat, a training-free sampling approach to increase diversity. SimpleStrat improves LLM generation diversity without degradation to generation quality while ensuring that an LLM’s outputs are aligned with the true distribution of answers. SimpleStrat consist of three stages: auto-stratification, heuristic estimation, and probabilistic prompting. Even if a language model cannot generate diverse solutions, we find that it can be prompted to identify useful partitions of the solution space based on the user request. We call this process auto-stratification.
In Fig. 1, SimpleStrat identifies two semantically significant strata from user request, "Name a US State": "(East/West) of the Mississippi River" and "(North/South) of the Missouri Compromise Line."

Next, the heuristic estimation computes the joint probabilities across all strata. Back to Fig. 1, SimpleStrat then outputs the probability for all four possible regions in US.
Finally, SimpleStrat samples from the joint probability distribution to augment the original user prompt with the selected stratas.
We note that this approach to diversity is orthogonal to increasing temperature and hence does not affect generation quality.

Figure: Figure 2: SimpleStrat workflow. SimpleStrat employs 3 phases: 1) auto-stratification to identify good dimensions of diversity that divide the solution space into equal partitions, 2) heuristic estimation to estimate the proportion of solutions in each stratum, and 3) probabilistic prompting where a concrete prompt is randomly sampled from the prompt distribution specified by the previous two phases. Critically, diverse resampling comes from both the random choice of prompt as well as the temperature of the LLM decoding.
Refer to caption: x2.png

We evaluate SimpleStrat on underspecified questions, specifically questions that have more than one plausible answer. However, unlike ambiguous questions more widely, an answer to an underspecified question can be easily verified to be a valid without additional context. These questions capture settings where the user is indifferent to the particular answer as long as it’s valid or in settings where we wish to resample to get a set of candidates solutions. We introduce CoverageQA, a benchmark of underspecified questions with on average 28.7 equally plausible answers.

We measure diversity by computing the Kullback-Leibler (KL) Divergence from the response distribution to a uniform distribution over all valid answers. By computing the response distribution using next-token probabilities, we show SimpleStrat samples from a less biased distribution. For proprietary models where we cannot close form express the response distribution, we measure the model’s coverage via recall of ground-truth solutions over 100 samples. On CoverageQA, SimpleStrat leads to 0.36 reduction in KL Divergence on average on Llama 3 models and a consistent 0.05 increase in recall. We show gains on top of temperature scaling leading to improved diversity orthogonal to increasing temperature.

Concretely, our work contributes the following:

- •
CoverageQA dataset of 105 under-specified questions automatically generated from WikiData (Vrandečić & Krötzsch, ) annotated with on average 28.7 valid solutions per question.
- •
We propose SimpleStrat a training-free approach for improving diversity with auto-stratification and probabilistic prompting.
- •
We demonstrate SimpleStrat improves diversity on CoverageQA with 0.36 reduction in KL Divergence on average on Llama 3 models and a consistent 0.05 increase in recall across all temperatures for GPT-4o.

## 2 Related work.

Temperature Scaling.
Going back as far as Platt scaling (Platt, ) and later applied to neural networks (Hinton, ; Guo et al., ), temperature scaling controls the randomness of probability distributions(^1^11Use of temperature parameter goes back at least to Verhulst’s development of logistic regression in response to Malthus’ An Essay on Principle of Population (Malthus, ; Verhulst, ).).
For dataset generation with LLMs,  Chung et al. () extends temperature-based diversity by additionally downsampling previously sampled tokens. To address the decrease in quality, they advocate for human intervention to manually filter out irrelevant diversity and manually fixing wrong answers in QA tasks. We show in our work temperature scaling leaves much to be desired.

Improving Language Model Diversity with Search.
In autoregressive generation, choices over early tokens tend to have more impact on the eventual completion. Beam search ameliorates this bias by allowing for multiple candidates in searching for the probability maximizing completion, Maximum a Posteriori (MAP) Lowerre & Reddy (). At the end of the search, beam search will have multiple candidate solutions encountered during search. Diverse Beam Search (DBS) proposes introducing an auxiliary dissimilarity objective quantifying the diversity among candidates in the beam (Vijayakumar et al., ). Especially on the task of image captioning, DBS shows improvement for discovering higher probability completions and discovering diverse continuations. Our improvements are orthogonal to beam search and our in-context approach corrects for inaccuracies in the modeled likelihoods of candidate solutions.

Other approaches (Samvelyan et al., ; Bradley et al., ) based on MAP-Elites (Mouret & Clune, ) require manual determined dimensions of relevant diversity and discretization of the solution space into equally-sized bins. Diversity is then achieved by mutations and evolutionary methods to cover adjacent bins. This search is potentially slow if the seed set of solutions do not already provide coverage over the solutions space. Our approach does not need seed solutions and avoids manually identifying dimensions of diversity. Instead, we rely solely on capabilities within the model.

In-context Methods to Increase Diversity.
When LLMs were first introduced, LMs were used to augment existing datasets with more diversity (Wei & Zou, ; Ng et al., ; Dai et al., ). As natural language is difficult to guarantee correctness, the space of augmentations is conservatively limited to thesaurus based synonym replacement. More recently, Language Model Crossover proposes presenting a random subset of existing data points to an LLM and ask it to hallucinate more data points that likely came from the same distribution Meyerson et al. (). This is limited combining aspects of existing data points into new generations.
Although these methods address the limitations of using the model’s token probabilities by in-context learning, they are ineffective at generating meaningful diversity. They are limited to either a human identified domains of interest or trivial variations sourced from synonyms or minicking random subsets of the existing dataset.

Applications of Diversity.
As shown by Raventós et al. (), dataset diversity is crucial for model generalization. Below sufficient coverage of the desired task, the model will resort to memorization, but when sufficient diversity is presented it will learn to generalize. As LLMs are increasingly used for generating synthetic data (Dubey et al., ), methods for diversity will be critical. This insight follows from extensive work demonstrating the benefits of data augmentation for bias mitigation (Sharmanska et al., ) and domain adaptation (Huang et al., ; Dunlap et al., ; Trabucco et al., ).

In code and math applications, checking validity efficiently enables more aggressive augmentations. One such augmentation for diversifying the languages supported by the model, data is translated to different natural or programming language (Chen et al., ; Cassano et al., ). In other domains such as images, text-to-image models have been used to do diversify data into uncommon settings. In the setting of diversifying an accumulating dataset, these methods can take advantage of an existing source of variance (for translation) or set of previously generated data points. Our primary focus is on settings where SimpleStrat is unaware of past data samples to support a wider set of applications.

Ambiguous or Underspecified Datasets.
ClariQ (Aliannejadi et al., ), CLAQUA (Xu et al., ), and AmbigQA (Min et al., ) focus on assessing LM’s ability to formulate clarifying questions. These question tend to have only 2 candidate solutions, as there exists a ground truth clarifying question whose answer fully specifies the question. Ambiguous Trivia QA (Kuhn et al., ) also looks at under-specified questions, but assume a user has contextual information that’s hidden. For instance, "Where in England was she born?" or "Who was the first woman to make a solo flight across this ocean?". We distinguish our underspecified question setting in this paper as one where the user is indifferent. In this setting, the given an answer it should be easy to verify the answer is correct without additional hidden context.

Coding datasets like Description2Code (Caballero et al., ), Wiki2SQL (Zhong et al., ), SPIDER (Yu et al., ), code-contest (Li et al., ), Apps (Hendrycks et al., ), and Leetcode Hard Shinn et al. () admit multiple valid answers. However, the space of valid implementations is infinite, making diversity difficult to measure, and good coding practices enforce preferences among valid implementations. We additionally construct CoverageQA to have an exhaustive list of ground-truth answers in order to measure the impact of diversity on coverage.

## 3 Method

### 3.1 Workflow overview

As illustrated in 2, SimpleStrat consist of three stages, 1) auto-stratification, 2) heuristic estimation, and 3) probabilistic prompting. For each unique user prompt, the outputs of the first two stages can be cached to avoid recomputing feed-forwards.

### 3.2 Auto-Stratification

For a given user request, $r_{user}$, we call $S$, the space of valid solutions.
In many settings, the space of potential solutions, $S$ may be naturally partitioned based on geography, parity, or demographics. The partition function, $P:S\rightarrow L$, assigns any solution $s$ from $S$ to a partition label $l_{j}$ in $L$ the set of partition labels. Partition functions are most useful if they’re as balanced as possible. A balanced partition function minimizes $imbalance(P,L)=\max_{l\in L}\left(|\{s\mid P(s)=l\}|\right)-\min_{l\in L}\left
(|\{s\mid P(s)=l\}|\right)$. The goal of auto-stratification is to search for a set of partition functions $\mathbf{P}=\{P_{1},P_{2},...,P_{n}\}$, that are balanced. Traditionally, in settings where there are oft-overlooked or a large or infinite number of valid solutions, stratified sampling can ensure our limited budget of samples covers the space of solutions evenly.

Based on this insight, we prompt the language model to identify promising dimensions of diversity. Concretely, the language model proposes good clarifying questions that will potentially eliminate half of the potential solutions based on the user request. These clarifying questions tend to align with semantically significant differences. In the running example, when asked, "Name a US State," the states can be partitioned based on East or West of the Mississippi River. See App. C for full prompt.

### 3.3 Heuristic estimation

As previously observed in Zou et al. (); Yan et al. (); Halawi et al. (), LLMs can used in forecasting to estimate well-calibrated probabilities of events that have not yet occured.
For forecasting, the model success benefits substantially from having updated news through web search. Although our unnecessary for the offline benchmarks we consider, this may be helpful for accurate estimation depending on the application. However, as our goal is diversity, we stand to benefit even from coarse-grain approximate proportions. We employ a similar reasoning template as Halawi et al. () to estimate the proportion of valid solutions lie within each strata.

In heuristic estimation, we look to estimate the joint distribution for each stratum, $\vec{l}=[l_{1},l_{2},l_{3},...]$.
Formally, we define the weighted-stratification as $\mathcal{W}=(\textbf{P},\rho)$, where $\rho(\vec{l})=Pr_{s\sim S}[P_{1}(s)=l_{1,j},P_{2}(s)=l_{2,j},P_{3}(s)=l_{1,j},
...]$ for P identified in auto-stratification. To improve scalability, we assume the partition functions are independent and multiply the marginal probabilities to get the joint probabilities associated with each stratum.

$$ $\rho(l_{1},l_{2},...,l_{m})=\prod\limits_{i}\rho_{i}(l_{i})$ (1) $$

We ask the LLM for each $l_{j}$, to estimate the marginal proportion of solutions this holds for. As this may not add up to 1, we normalize the estimates to form a proper probability distribution. For simplicity, we focus in this work on settings where all solution in the solution space is equally like. As noted in Sec. 3.2, we encourage the LLM to propose balanced partitions. However, heuristic estimation allow us to support imbalanced partitions by reweighing the sampling to favor stratum with more potential solutions. More details on prompting in App. D. In Fig. 2, the LLM determines the joint probabilities across two stratas, the Mississippi River and the Missouri Compromise Line.

### 3.4 Probabilistic Prompting.

Post heuristic estimation, a set of statum is sampled from the joint probability distribution in Eqn. 1. This implicitly forms a probabilistic prompt, which specifies a distribution over concrete language model prompts. After a prompt is sampled, the LLM is then used to sample from within the stratum. Back to Fig. 2, East and South are sampled from the Mississippi and Missouri strata respectively, augmenting the final prompt with diverse specifications.

Formally, call $\vec{l}$ a stratum defined by choices of $l_{i,j}$ for each $P_{i}$ across all $i$. Call $Prompt$ a function that maps the stratum, $\vec{l}$ to a concrete prompt, $Prompt(\vec{l})$. Intuitively, the probabilities of the prompt distribution is defined by $Pr[Prompt(\vec{l}]=\rho(\vec{l})$. We can then compute the probability of a solution

$$ $Pr[s]=\sum_{\vec{l}}Pr[\text{Prompt}(\vec{l})]*Pr[s\mid\text{Prompt}(\vec{l})] =\sum_{\vec{l}}\rho(\vec{l})*Pr[s\mid\text{Prompt}(\vec{l})]$ (2) $$

The specific language model’s next-token probabilities define $Pr[s\mid\text{Prompt}(\vec{l})]$.

As the probabilistic prompt is human readable form, the user can inspect the properties and the proportions and modify it to adjust for unwanted bias or remove unwanted factors. For instance, when proposing English baby names, we may want the model to propose male vs female names equally often, even though there are more female than male baby names (^2^22As reported in Wilson (), there are 18,993 unique names for girls and 13,959 for boys in 2015 report by Social Security Administration.). This interpretability and controllability is a major advantage of SimpleStrat in practice.

## 4 CoverageQA Dataset

### 4.1 Overview

We wish to evaluate generation diversity in settings where 1) user requests have more than one distinct correct answer, 2) and answers are equally likely, and 3) answers do not require hidden or implicit context to verify. These three properties allow us to measure diversity in the sense of whether the language model will provide coverage over the full solution space when resampled. Unfortunately existing benchmarks discussed in Sec. 2 do not satisfy these properties. We introduce CoverageQA to assess the language model generation diversity. The dataset consists of two splits: CoverageQA-Curated, manually curated naturally underspecified questions, and CoverageQA-Wikipedia, and auto-generated dataset of underspecified questions.

### 4.2 CoverageQA-Wikipedia Approach

To generate CoverageQA-Wikipedia, we leverage the Wikidata knowledge base which contains all relational mappings between entities and properties in Wikipedia. Our generation process starts with an initial item-property pairing and a constraint on the number of correct answers. We then perform a recursive search through Wikidata to find all sets of item-property constraints and their corresponding answers that meet our criteria. These constraints are subsequently transformed into natural language questions using GPT-4.

Consider an initial pairing of the Wikidata item "country" with the property "instance of". We might specify that we want between 20 and 40 valid answers. Our search would then yield a set of all constraints from the knowledge base that fit the initial conditions, such as "instance of country, located in Europe, uses Euro as currency". GPT-4 would convert this into a natural language question like "Name a country located in Europe that uses the Euro as its currency."

This approach has several advantages: 1) it allows us to create a diverse and extensive benchmark that can be easily updated with weekly updates to Wikidata, 2) it allows us to arbitrarily specify the size of the solution space as constraints can be added or removed to form; and 3) this process in principle can curate a large dataset with little manual effort or supervision. In the initial instantiation of CoverageQA dataset, we publish 105 questions across 4 domains, each corresponding to a different initial seed item-property pair. To ensure quality, we employ both automatic filters (e.g., excluding certain generic properties) and manual curation to remove redundant or unsuitable questions.
This dataset can be substantially expanded as we only used 4 domains, but we leave this for future work. For a details on the dataset breakdown and details on the question generation process, please refer to Appendix  A.1.

## 5 Results

### 5.1 Evaluation Setup

For the primary empirical evaluation of SimpleStrat, we use gpt4o-2024-08-06. To obtain true answer distributions and perform divergence from uniform analysis, we use open-source models from the Llama 3 and 3.1 families, specifically the 8B and 70B variants. The inference of these models were run on 8 A100-80GB GPUs. Additionally, we leverage claude-3.5-sonnet-20240620 for baseline evaluations on two datasets: CoverageQA Curated and CoverageQA Wikipedia. For CoverageQA, we used WikiData version from 07-03-2024.

### 5.2 Measuring Diversity

We consider two measures of diversity. For models with accessible softmax next-token probabilities, we compute the probability of each solution in the solution space. We then define distributional diversity as the distributional distance between the response distribution implied by the sampling process and logits and the ground-truth distribution derived from these probabilities. For CoverageQA, the ground-truth distribution is uniform over valid solutions and zero elsewhere. In general, it can be more complex.

In setting where we do not have access to the next-token distribution, we evaluate diversity by resampling responses to CoverageQA 100 times per question. This allows us to empirically observe the diversity in the form of coverage. We call this coverage diversity. To measure coverage, we report the recall ($unique\ valid\ solutions/total\ unique\ valid\ solutions$) on the reference solutions. Note that this is an unconventional measure of recall as it’s over the solution space(^3^33Not to be confused with conventional recall where we might measure how many valid solutions the LLM recognize as valid.). To ensure this doesn’t come at the cost of quality, we also show precision is not reduced.

Figure: Figure 3: Diversity scaled with temperature. We show 100 resamples of "Name one Great Lake in the United States." On the right, we show the result of resampling GPT-4o 100 times per temperature. In contrast to SimpleStrat on the left, GPT-4o at temperature 1.5 still only samples Lake Huron once and never samples Lake Ontario. SimpleStrat improves the diversity across all temperatures.
Refer to caption: x3.png

### 5.3 Qualitative Example

Consider the question "Name one Great Lake in the United States." as shown in Fig. 3. We see that temperature scaling with GPT-4o results in a strong preference/bias for Lake Erie. This is certainly a correct continuation and under the language modeling objective should be incentivized. Increasing the temperature helps sample the next most likely candidate solutions more often. However, even when increasing the temperature past 1 there is still low coverage over the solutions space. Specifically, Huron is only seen once out of 100 samples at 1.5 temperature, and Lake Ontario is never observed. This is undesirable if the data is used to proposing candidate plans, generating test cases, or generating training data. Not only is there insufficient coverage over all possible solutions, but the model consistently has a strong preference for Lake Erie. This undesired biases in generations may lead to problems in downstream use cases.

In Fig. 3, we observe a much more uniform distribution over valid solutions when using SimpleStrat. Notably, we observe full coverage over all 5 Great Lakes. At lower temperatures, there is still a preference of a single lake over the others, in this case Lake Huron. However, this is less pronounced at higher temperatures and is a significant improvement over GPT-4o without SimpleStrat.

Figure: (a) CoverageQA-Curated.
Refer to caption: extracted/5926242/plots/temperature_scaling_recall/big_recall.png

### 5.4 Coverage Diversity on Proprietary Models

We first assess coverage diversity, specifically, the model’s ability to recall all the valid solutions upon resampling. This measure is clearly impacted by temperature as temperature zero or greedy decoding of LLMs leads to a single deterministic result.
We compare the coverage diversity (recall) of SimpleStrat, GPT-4o, and Claude 3.5 Sonnet as a function of temperature. We sweep over temperatures from 0.15 to 1.5. Although not shown in the evaluation, note that SimpleStrat has the advantage of providing diversity even when sampled at temperature zero. SimpleStrat with GPT-4o leads to an improvement to recall across all temperatures as shown in Fig.4. On the CoverageQA-Curated, we see a consistent 0.2 increase in recall over the same base model, GPT-4o. On CoverageQA-Wikipedia, we see as much as 0.05 increase in recall

Our quantitative results are consistent with the Great Lakes example in Fig. 3. Scaling temperature alone does not lead to as much coverage diversity as combining with SimpleStrat. The recall importantly does not come at the expense of quality as measure by precision as shown in App.  B.

Figure: (a) Llama 3.1 8B
Refer to caption: extracted/5926242/plots/kl_divergence_scatter/Meta-Llama-3.1-8B-Instruct.png

### 5.5 Distributional diversity with Llama 3

We use the Llama 3 model family to analyze answer distributional diversity in CoverageQA. Open-source models let us calculate exact expected distributions by examining logits of all valid continuations for a prompt. This is not possible with GPT-4o and Claude 3.5 Sonnet, where reliably estimating the true probabilities would require extensive sampling. Our approach efficiently determines true expected distributions of valid answers for any input, improving analysis accuracy, and overcoming the resource constraints of high count sampling.

For our baseline, we prompt the models and directly compute $Pr[s|Prompt(\vec{l})]$ for each solution, $s$. This is simply the product of the individual next-token probabilities. For SimpleStrat, the probability involves the next-token probability conditioned on the prompt weighted by the probability the prompt is selected. Concretely,
the probability an answer is sampled by SimpleStrat can be computed based on Eqn.2. The next-token probability based response distribution $Pr[s|Prompt(\vec{l})]$ computed just as the baseline, and we do a sum weighted by the joint probabilities assigned in heuristic estimation.
We assign remaining probability density to an "Invalid" category to form a proper distribution.
The probabilistic formulation allows us to easily compute the response distribution of SimpleStrat.

Our ground-truth distribution is a distribution where each valid answer has equal probability, and no invalid answers have probability density. We use Kullback–Leibler (KL) Divergence as the discrepancy metric to measure how much our distribution deviates from a uniform distribution. Across the four models in the Llama 3 family, SimpleStrat achieves an average reduction in KL divergence from uniform of 1.14 compared to the baseline on the curated CoverageQA dataset. For the general CoverageQA dataset, the reduction is 0.36. These results indicate that SimpleStrat produces a response distribution much closer to the ground truth distribution than the baseline method.

Additionally, we analyze the KL divergence on a per-question basis to identify where our method achieves improvement (a more uniform distribution). The scatter plot in Fig  5(b) shows KL divergence values for SimpleStrat (y-axis) versus the baseline (x-axis) for each question in the CoverageQA Wikipedia dataset. Points above the diagonal line represent questions where SimpleStrat outperforms the baseline by yielding a lower KL divergence. The vast majority of points fall on or above this line, indicating that SimpleStrat consistently produces improvement in generating more uniform distributions across the questions in the dataset.

Figure: (a) Llama 3.1 8B.
Refer to caption: extracted/5926242/plots/logprob_histograms_overlayed/llama3.1-8B-comparison/Name_a_US_state_.png

**Table 1: Comparison of Baseline and SimpleStrat Average KL Divergence for Different Models on CoverageQA-Curated and CoverageQA-Wikipedia. Smaller numbers reflect closer alignment to uniform distribution.**
| Model | CoverageQA Curated | CoverageQA Wikipedia |  |  |
| --- | --- | --- | --- | --- |
| Baseline | SimpleStrat | Baseline | SimpleStrat |  |
| Meta-Llama-3-8B-Instruct | 2.78 | 1.74 | 2.75 | 2.47 |
| Meta-Llama-3.1-8B-Instruct | 2.47 | 1.19 | 2.60 | 2.39 |
| Meta-Llama-3-70B-Instruct | 3.24 | 2.17 | 3.28 | 2.73 |
| Meta-Llama-3.1-70B-Instruct | 2.70 | 1.54 | 2.78 | 2.38 |

In Fig. 6, we see an example of the response distribution for Llama 3.1 with and without the correction due to SimpleStrat. The base model distribution is strongly biased towards it’s most desired output. As illustrated in Fig. 1, California is preferred by a long margin. Thus, it’s not surprising that we observed little diversity when by simply increasing temperature. In contrast, SimpleStrat provides a much more uniform distribution. The over represented solutions are adjusted to be lower and the under represented solutions are adjusted to be higher. We note that the distributions are still not perfectly uniform. For more examples, see App. E. Although Fig. 6 shows the larger model has a closer to ideal distribution, the results in Table 1 indicate larger models have on average worse diversity. This may be a result of memorization exacerbated in larger models.

Model versions. Interestingly, Llama 3.1 handles underspecified questions better as it has consistent lower KL Divergence. Although we do not have access to the training methodology, the likely increase in dataset size and more careful model design seems to improve based mode capabilities on underspecified questions.

## 6 Limitations

Although SimpleStrat shows improvement empirically, it is sensitive to the model selecting good meaningful axis in auto-stratification and correct joint probabilities in heuristic estimation. As work on LLMs for forecasting improve, we expect LLMs to produce better estimates especially when given access to external data and data analysis tools. For our prototype, we restricted to studying the model’s intrinsic capabilities. Further, the model may have biases concerning race and gender that may be reflected also in the auto-stratification and heuristic estimation. As such, it is recommended the probabilistic prompt distribution of SimpleStrat is carefully inspected for critical applications. Finally, CoverageQA is a dataset of short responses. Although this make evaluation more practical, we believe SimpleStrat will be especially impactful in settings that require low temperature especially multi-step reasoning as identified by Zhang et al. ().

## 7 Conclusion

In this paper, we propose SimpleStrat which offers an innovative alternative by leveraging the LLM itself to partition the solution space into distinct strata. This process we call auto-stratification. At inference time, a random stratum is selected, and a sample is drawn from within that stratum. This approach achieves better diversity without sacrificing quality as increasing temperature would.

To quantitatively measure diversity, we introduced the CoverageQA dataset, which consists of underspecified questions with multiple equally valid answers. We measure diversity with two metrics: for open-source models, we measure distributional difference with KL Divergence and for proprietary models, we measure coverage over the set of ground-truth solutions. Our rigorous evaluation on both proprietary and open-source LLMs demonstrated that SimpleStrat achieves significantly higher recall and produces answer distributions closer to uniform compared to traditional temperature-based sampling methods.

### Acknowledgement

We thank Anastasios Angelopoulos, Jacob Steinhardt, Brandon Trubucco, Kevin Yang, Parth Asawa, and Alan Zhu for their insightful discussion. Sky Computing Lab is supported by gifts from Accenture, AMD, Anyscale, Google, IBM, Intel, Microsoft, Mohamed Bin Zayed University of Artificial Intelligence, Samsung SDS, SAP, Uber, and VMware.

## Appendix A Appendix

### A.1 CoverageQA Dataset

Generation Procedure

To generate the questions, we manually came up with initial item and property pairings to run the recursive search. We constrain the recursive search to yield between 20-40 possible answers to keep the questions within common and relevant categories. We found that with fewer than 20 answers, the questions become too obvious, while with more than 40, they tend to get too specific and stray from general knowledge. The recursive search first finds all items that satisfy the initial conditions, then iteratively adds properties in steps until either the maximum depth (number of constraints) is reached or the number of answers falls outside the desired range. We blacklist properties that are detrimental to high-quality question generation, such as an item’s presence in a specific database, numeric properties like population, and properties that introduce high ambiguity. We then manually evaluate the generated conditions and answers to ensure they meet our criteria. With an appropriate initial condition, one query can generate hundreds of valid constraints that can later be turned into questions. Finally, we use GPT-4 to convert these constraints into natural language.

## Appendix B F1 Scores

We show F1 scores in Fig. 7 to emphasize that the precision does not change substantially as a result of our method. Precision is calculated over the set of 100 attempts how many are in the ground truth. Recall as mentioned is calculated as how many unique ground truth solutions were observed in the 100 attempts.

Figure: (a) CoverageQA-Curated
Refer to caption: extracted/5926242/plots/temperature_scaling_recall/big_f1_score.png

**Table 2: CoverageQA Domains**
| Domain | Question Count | Average Number of Answers |
| --- | --- | --- |
| General Knowledge (Curated) | 10 | 64.1 |
| US National Parks | 6 | 12.2 |
| Geography Questions | 75 | 27.4 |
| Chemical Elements | 14 | 17.5 |

## Appendix C Auto-stratification Prompt

We provide the full prompt in Tbl. 3. To improve prompt adherence, we provide one in context example in the form of one simulated round of multi-turn conversation, i.e. we provide an example set of reasoning following the template.

**Table 3: Full prompt for Auto-stratification.**
| System Prompt: |
| --- |
| You’re a helpful brainstorming assistant that is careful to consider all factors to a problem. |
| User: |
| I am tasked with the following request:<br>% User Request |
| Help me brainstorm how to respond to the user request by providing a list of True/False properties the solution may or may not have. Use the following step-by-step to come up with good properties:<br>1.<br>If you were playing 20 questions, what’s a good first question to ask that would split the possibilities in half?<br>List at least 5 questions and their corresponding properties.<br>Question: <Description><br>2.<br>Rewrite each question as a True/False property that’s true for one half and false for the other.<br>Question: <Description><br>True/False Property: <Property Description><br>3.<br>For each property, come up with an example that would satisfy the property.<br>Property: <Description><br>Example: <Description><br>Is it a valid answer to the user’s request? <Yes/No><br>4.<br>For each property, come up with an example that would not satisfy the property.<br>Property: <Description><br>Example: <Description><br>Is it a valid answer to the user’s request? <Yes/No><br>5.<br>Does the property mention a candidate answer in it?<br>Property: <Description><br>Does the property mention a candidate answer in it? <Yes/No><br>6.<br>For each property, list whether we should include it or not in the final list of properties. Do not include ones where an example from above is not valid or if it mentions a candidate answer in it.<br>Property: <Description><br>Include in final list? <Yes/No> |
| Final List of True/False Properties:<br>1.<br><Property Description 1><br>2.<br><Property Description 2><br>Ensure all properties are listed are sentences that are either True or False |

## Appendix D Heuristic Estimation Prompt

We first take each partition function from auto-stratification and estimate a starting probability with the prompt in Table 4.
This prompt is heavily inspired by Halawi et al. ().
We then collect all the proportions and pass it through a final Heuristic Estimation prompt to remove redundant properties (negations for instance) and give the model a chance to correct any incorrect probabilities. See Table 5 for full prompt. Finally, we ask the model to select at most 3.

Note that for performance reasons, we estimate the marginal probabilities and make a simplifying assumption of independence. This is not strictly true if one partition function is the negation of the other. This leads potential stratum assigned positive probability but actually the stratum has no solutions. Otherwise, there would be $2^{\text{\# of Partition Functions}}$ strata to estimate probabilities of. Further, LLMs seem less reliable when asked to estimate fine-grained probabilities, whereas most marginal probabilities are by design close to 0.5.

Formally, if $P=\neg Q$, the the stratum $P\wedge Q$ has zero probability, even though we assumed it to be $Pr[P]*Pr[Q]$. We handle approximation error in estimating the true prompt distribution by allowing the model to reply "Invalid" to trigger a resample. With this adjustment, the probabilistic prompt distribution is maintained for this extreme case. This correction however does not ameliorate potential issues with

**Table 4: Prompt for Partition-specific Heuristic Estimation.**
| System Prompt: |
| --- |
| You are an expert superforecaster, familiar with the work of Tetlock and others.<br>Your mission is to generate accurate predictions for forecasting questions.<br>Aggregate the information provided by the user. Make sure to give detailed reasoning. |
| User: |
| I am tasked to estimate the probability that a random solution to "User Request" has the following property "Partitioning Property" |
| Instructions:<br>1.<br>Provide at least 3 reasons why the answer might be no.<br>{ Insert your thoughts }<br>2.<br>Provide at least 3 reasons why the answer might be yes.<br>{ Insert your thoughts }<br>3.<br>Rate the strength of each of the reasons given in the last two responses. Think like a superforecaster (e.g. Nate Silver).<br>{ Insert your rating of the strength of each reason }<br>4.<br>Aggregate your considerations.<br>{ Insert your aggregated considerations }<br>5.<br>Output your answer (a number between 0 and 1) with an asterisk at the beginning and end of the decimal.<br>{ Insert your answer } |

**Table 5: Prompt for Final Heuristic Estimation.**
| System Prompt: |
| --- |
| You are an expert superforecaster, familiar with the work of Tetlock and others.<br>Your mission is to generate accurate predictions for forecasting questions.<br>Aggregate the information provided by the user. Make sure to give detailed reasoning. |
| User: |
| I’m playing a game where my friend has been tasked to: |
| "User Request" |
| I have the following Y/N statements I can ask my friend. I have probabilities that I think it’s true:<br>% Insert numbered list of partitions and proportions.<br>Instructions:<br>1.<br>For each Y/N statement, is it redundant with another statement?<br>Y/N statement: <description><br>Is redundant? <Y/N: Explanation><br>2.<br>Are any of the probabilities in accurate? If it’s sufficiently accurate just report back the same value.<br>Y/N statement: <Description><br>Is accurate? <Y/N: Explanation><br>Probability: <Probability><br>3.<br>Pick at most three statements that are least redundant and pair well together. Prefer ones that are closest to 50% for most information. |
| Final List of True/False Properties:<br>1.<br><Y/N Properties> :: <Probability><br>2.<br><Y/N Properties> :: <Probability> |

## Appendix E Additional Plots: Distributional Analysis with Llama

We provide additional examples in Fig 9 and scatter plots for Llama 3 in Fig 8

Figure: (a) Llama 3 8B
Refer to caption: extracted/5926242/plots/kl_divergence_scatter/Meta-Llama-3-8B-Instruct.png

Figure: (a) Llama 3.1 8B
Refer to caption: extracted/5926242/plots/logprob_histograms_overlayed/llama3.1-8B-comparison/Name_a_country_capital_.png

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: 1. SimpleStrat includes three stages but there is no analysis about how each stage affects the generation performance. What’s the quality of auto-stratification? What if the generated stratification is wrong? Besides, heuristic estimation seems unnecessary: we can always randomly sample a strat and use it for prompting. No ablations provided throughout the paper.
2. In the first stage, we could produce multiple dimensions for the stratification. Does the number of dimensions matter? How would it affect the performance?
3. Apart from the KL divergence and recall, what’s the precision of model’s generation? There is no direct evaluation about the model's quality although the authors claim SimpleStrat doesn’t hurt quality.
4. What’s the unique rate for a model's generation over the 100 samples? i.e. how many unique samples?
5. CoverageQA seems not very practical. What if applying SimpleStrat to more practical tasks, such as reasoning? It’s common to sample multiple responses in resonsing tasks and report pass@K? would SimpleStrat be better in such problems?
soundness: 3
strengths: * The proposal of SimpleStrat, an interesting idea for increasing generation diversity.
* CoverageQA, a simple evaluation benchmark for LLM generation diversity.
summary: This paper presents SimpleStrat to increase the diversity of LLM generation without hurting the quality. SimpleStrat is a prompting method, consisting of three stages: auto-stratification, heuristic estimation, and probabilistic prompting. The rough idea is to first prompt LLM itself to produce conditions that split the generation space into different partitions, and then combine user query with the condition for the final generation such that the output follows a given partition. For evaluation, the authors propose CoverageQA. Experiments show SimpleStrat achieves good performance.
weaknesses: * Lack of ablation
* Evaluation is weak

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: Please see the weaknesses.
soundness: 2
strengths: 1) One of the contribution of this paper is the creation of a dataset CoverageQA for diversity measurement, which can benefits this area as there're not many existing datasets.
2) The proposed method is interesting and leverages LLM itself for diversity improvements. One of the advantages of this idea is that with the improvement of the LLM per se, the generation diversity can also be improved.
3) The proposed approach is evalauted on both open-sourced and proprietary models, and the experimental results show its efficacy in diversity improvements.
summary: Generation diversity of LLMs is an important research areas for several reasons such as better downstream accuracy, generate diverse datasets for post-training, RLHF, etc. Traditional approaches for diversifying include temperature scaling, beam search, in-context learning, etc. However, those methods have their own drawbacks such as lower generation quality, limited diversity improvement, etc. This work proposes a new approach for improving diversity called SimpleStrat. SimpleStrat uses the language model itself for diversity improvement. It includes three stages: 1) auto-stratification, 2) heuristic estimation, 3) probabilistic prompting. Auto-stratification prompts the LM to identify promising dimensions of diversity. Heuristic estimation estimates the joint distribution for each stratum. At probabilistic prompting stage, a set of stratum is sampled and a probabilistic prompt is formed. After a prompt is sampled from the probabilistic prompt, it's used as input into LLM for generation.
To evaluate the proposed approach, CoverageQA dataset is adopted which includes two splits: 1) CoverageQA and CoverageQA-Wikipedia. To measure diversity of the generation, it computes the KL divergence between MAP distribution of answers to a uniform distribution over all valid answers. For models that MAP distribution can't be calculated, it measures the model's coverage via recall of ground-truth solutiosn over 100 samples.
The main contributions of this work include: 1) a dataset of under-specified questions, 2) the SimpleStrat method, 3) the experimental results show that the proposed method improves diversity, specifically 0.36 KL divergence reduction on average and 0.05 increase in recall.
weaknesses: 1) For evaluation, this work mostly focuses on underspecified question, however, it's not clear how this can impacts the model performance on questions with one answer.
2) The experiments consists of one baseline and this baseline is not LLM based. There're several LLM based approach. It would be better to compare the proposed approach with them.
3) How does this approach impact accuracy? This question is not discussed and answered in the work.
4) One question I have for the proposed approach is how applicable it is to other areas besides question answering such as code generation, agents, etc. One relevant question is that [the Figma AI tool keeps generating the same weather app without diversity](https://siliconangle.com/2024/07/02/figma-disables-new-ai-tool-repeatedly-cloned-apples-weather-app/). Is it possible to use the proposed approach for solving this problem?

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. Could you please provide more evidence of lower temperature for SimpleStrat? Please refer to the 3rd point in the weaknesses.
2. Based on my understanding, "coverage diversity" measures the recall of valid solutions, reflecting the stability of LLM generation instead of diversity.  Could you please interpret more of its rational?
3. Based on Figure 3, the answer distribution of SimpleStrat is far from uniform distribution, diveraging from the assumption. This seems to indicate the ineffectiveness of stratified sampling. Could you please provide some clarification?
4. l424: I'm confused about the relationship between "the product of the individual next-token probabilities" and diversity. At least, length-normalization should be used to eliminate the effects of answer lengths.
5. KL divergence only indicates uniformality among all the possible solutions provided by the model, rather than within the whole solution space. This makes it unsuitable to measure the diversity in solution space.
6. This method needs to generate strata dimensions for each prompt.
-
  1. For generations with few tokens, it's not clear if this method is more effective than temperature sampling at the same token cost. 
  2. For generations with many tokens, it's not clear whether an easy dimension partition still exists.
soundness: 2
strengths: 1. The motivation, splitting the answer space into subspace (i.e., strata) along the automatically identified dimensions, is intuitively effective for higher diversity.
2. The diagram and examples clearly illustrate the main concept of the core idea.
summary: This paper introduces SimpleStrat, a training-free sampling method for increased diversity of LLM generation, and validates its effectiveness on a self-constructed dataset named CoverageQA, containing 105 under-specified questions. Both the method and dataset contribute to the research community.
weaknesses: 1. Despite the intuitiveness,  the motivation needs to be verified, at least empirically, for broader impact. Otherwise, this paper is limited to a method and a small dataset without inspiring insights, leading to limited contribution.
2. Despite the verified effectiveness, the proposed method is only verified on a small dataset. The generalization and robustness is not clear. This makes the paper more like a prototype without substantial validation.
3. Despite the drawbacks of temperature sampling appointed by the paper, temperature sampling is still used in SimpleStrat. At least, a lower temperature in SimpleStrat should be demonstrated.
4. The writing still needs to be further polished, like:
-
  1. l046, l124: delete the final period.
  2. l102: grammar error for "verified to be a valid without"
  3. l135: citep for "Lowerre & Reddy (1976)."
  4. l181: grammar error for "the given an answer it"
  5. l196: grammar error for "As illustrated in 2, SimpleStrat consist of three stages"
  6. l218: grammar error for "LLMs can used in"
  7. l337: wrong statement for "On the right"
  8. l351: grammar error for "increasing the temperature past 1 there is"
  9. l236: Now that "For simplicity, we focus in this work on settings where all solution in the solution space is equally like.", Heuristic Estimation is not used in the main experiments, and better to be moved from a separate subsection to a discussion section.

Meta-review: Based on the reviewers' feedback, I recommend not to accept this paper at this time. While the paper presents an interesting approach to improving LLM generation diversity through SimpleStrat, the reviewers identified several evaluation limitations that need to be addressed: the small dataset focused only on underspecified questions, insufficient comparisons with existing LLM-based diversity methods, and concerns about the appropriateness of the evaluation metrics. The reviewers also noted the lack of analysis on diversity-quality tradeoffs and missing ablation studies. Without author response to these methodological concerns, the paper's claims remain insufficiently validated.

Decision: Reject