Manuscript Offprint

arXiv:2609.02275

Do Large Language Models Capture the Diversity in their Training Data?

Youqi Wu, Farzan Farnia

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models are trained to model conditional distributions over text, yet it remains inadequately understood whether they capture the full diversity of plausible outputs present in their training data. We study this question through an information-theoretic lens by comparing the conditional entropy of model-generated outputs with that of the corresponding training data. Given paired input-output samples, we use conditional entropy and its matrix-based analogue based on von Neumann entropy to measure output variability beyond what is explained by the conditioning input, without requiring multiple reference outputs for the same prompt. Across LLM families with publicly available training data, including OLMo, Pythia, and GPT-Neo, we consistently find that model-generated outputs exhibit lower conditional entropy than their training data, across different model scales, sequence lengths, and decoding strategies. We observe a similar conditional diversity gap beyond language modeling, including class-conditioned ImageNet generators and text-conditioned models trained on MS-COCO. To address this gap, we propose a post-hoc correction mechanism that generates multiple outputs for each input and reweights them through a matrix-entropy projection, increasing conditional diversity while remaining close to the original model distribution. We prove the concavity of the matrix-based conditional entropy functional, which makes the resulting entropy-constrained projection a convex optimization problem, and develop a scalable mirror-descent algorithm for its implementation. Our results reveal a systematic conditional diversity gap between modern generative models and their training data, and provide an information-theoretic framework for measuring and mitigating this gap.

1 Introduction

Large language models are increasingly used as conditional distribution models: given a prompt, instruction, context, or document, they are expected to produce not only a single plausible completion, but samples from a rich set of valid outputs. The same viewpoint underlies many other conditional generative systems, including text-to-image models, image captioning systems, and class-conditioned image generators [1, 2, 3, 4]. In these settings, the conditioning variable rarely determines a unique output. A prompt may admit multiple correct phrases, reasoning paths, levels of detail, or stylistic choices; an image may admit several faithful captions; and a class label may correspond to a broad range of visual instances. A central question is therefore whether modern conditional generative models capture the full range of outputs supported by the data distribution.

Most existing evaluations do not directly answer this question. Standard language-modeling metrics such as likelihood or perplexity measure average predictive fit, while many generation benchmarks focus on accuracy, alignment, and semantic consistency. For image and multimodal generation, metrics such as CLIPScore [5], MAUVE [6], and conditional Fréchet-type distances [7] provide valuable tools for comparing generated and reference samples. However, a model could still perform well under such metrics while still concentrating its probability mass on a narrower subset of valid outputs. This is important for LLMs and prompt-guided generation, where the goal is not merely to produce one acceptable answer, but to represent the conditional variability present in natural text data.

A direct measurement of conditional output variability is statistically challenging. In many datasets, we observe paired samples (X,Y)(X, Y), where XX is the conditioned variable and YY is the corresponding output, but we do not observe many independent human outputs for the exact same condition. Thus, estimating conditional

*Department of Computer Science and Engineering, The Chinese University of Hong Kong, yqwu24@cse.cuhk.edu.hk †Department of Computer Science and Engineering, The Chinese University of Hong Kong, farnia@cse.cuhk.edu.hk entropy separately for each fixed prompt is usually infeasible. To address this, we study conditional entropy through paired input-output samples. At the classical level, Shannon conditional entropy measures the uncertainty in YY that remains after observing XX. At the kernel level, we use a matrix-based analog built from a product kernel on pairs (X,Y)(X,Y) and subtract the entropy of the conditioning variable. This gives a way to measure output variability beyond the variability already explained by the inputs, without requiring repeated reference outputs for every condition.

Using this viewpoint, we find a consistent conditional output-range gap in modern generative models. Across LLM families with publicly accessible training data, including OLMo [8], Pythia [9], and GPT-Neo [10], we empirically evaluate that model-generated continuations exhibit lower conditional entropy than the corresponding training data. We observe the same phenomenon beyond text, including class-conditioned ImageNet generation and text-conditioned image models trained on MS-COCO. These results suggest that the issue is not specific to one architecture or training approach. Rather, conditional generative models appear to represent a narrowed version of the conditional distribution present in their data, as their conditional entropy underestimates that of the training data.

We formalize this phenomenon using conditional entropy and matrix-based conditional entropy, which extends the recent diversity bias analysis in [11] from unconditional generative models to conditional generative AI and LLM models. The resulting score compares the entropy of the joint input-output distribution with the entropy of the input marginal, thereby isolating the part of the variability attributable to the conditional output law. This formulation will be natural for LLMs and general conditional generation systems, because it evaluates paired samples directly, rather than requiring multiple ground-truth responses for each prompt. It also connects the empirical measurement problem to matrix-based quantum entropy functionals.

On the technical side, we prove that the proposed matrix-based conditional entropy is a concave functional of the joint input-output distribution. This structural property has two consequences. It yields finite-sample monotonicity and underestimation properties analogous to the classical behavior of the classical Shannon entropy. More importantly, the concavity of the matrix-based quantum entropy implies that projecting a generated conditional distribution toward a higher conditional-entropy region can be formulated as a convex optimization problem.

Following the analysis, we propose a post-hoc sample-space reweighting method for LLMs and conditional generators. Given prompts x1,…,xNx_1, \ldots, x_N, we generate and consider multiple outputs yi,1,…,yi,my_{i,1}, \ldots, y_{i,m} for each prompt xix_i and jointly optimize weights over these generated candidates so as to improve the overall conditional variability. The key constraint is that the total weight assigned to each prompt remains fixed, so the input marginal is preserved and only the conditional distribution over generated outputs is adjusted. The projection then finds the closest reweighted empirical distribution whose matrix-based conditional entropy exceeds a target level. In this way, the method does not retrain the model or synthesize new samples; instead, it asks whether the model has already generated valid but underweighted outputs, and redistributes probability mass toward a broader conditional empirical distribution.

For scalability, we develop an efficient mirror-descent implementation over a product of simplices, one simplex for the candidates generated from each condition. This extends exponentiated-gradient reweighting from the unconditional setting to conditional generation while exactly preserving the prompt marginal. Since the joint input-output feature space is a tensor-product space and can be prohibitively high-dimensional, we implement the method using sketched joint features. For finite-dimensional embeddings, we use random projections of Kronecker-product features; for shift-invariant kernels, we use direct joint random Fourier features for the product kernel. These approximations avoid explicitly forming the full tensor-product representation and reduce the cost of each optimization step to depend on the sketch dimension rather than the raw product dimension. The contributions of this work can be summarized as:

  • We formulate the problem of whether LLMs and conditional generative models capture the full range of valid training outputs using conditional entropy and its matrix-based counterpart.

  • We empirically demonstrate a consistent conditional output-range gap across LLMs with publicly available training data, class-conditioned ImageNet and MS-COCO generators.

  • We derive concavity and finite-sample properties of the applied matrix-based conditional entropy functional, and show that entropy-constrained reweighting can be formulated as a convex program.

  • We develop a scalable post-hoc reweighting algorithm based on product-simplex mirror descent and sketched joint features for adjusting conditional output distributions.

References (67)