acceptodds
Published as a conference paper at NeurIPS 2026

Total Variation Distance Estimation in Autoregressive Models

Eric Price, Kevin Tian, Zhiyang Xun, Yusong Zhu

Abstract

Modern LLM deployments use a number of implementation choices and inference optimizations (e.g., batching, custom kernels, quantization) on top of fixed weights, so two engines serving "the same model" can produce meaningfully different distributions. We study the problem of estimating the total variation (TV) distance between two length- autoregressive distributions to additive error , under three access models: 1. Under *sample* access, we use queries, where is the maximum support of the next-token distribution. 2. Under *logit* access, we use queries, and this is tight. 3. Under *noisy logit* access, we can smoothly interpolate between the above two: if probability values are given to relative error, we use queries. We complement our theoretical results with an empirical evaluation of our algorithms, for example measuring the distance between sglang and vllm on standard settings. Our experiments highlight the robustness and practicality of estimating the total variation distance, compared to existing alternatives such as KL divergence.

Keywords:
Sydney

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_fVRHOpenReview ↗
Rating
4
Clarity
3
Confidence
2
Originality
3
Quality
3
Significance
3
Read review
Summary

This work addresses estimating Total Variation (TV) distance between probability distributions, particularly in the context of large language models (LLMs). The claims of the paper highlight contributions such as the introduction of a noisy prefix logit oracle, which unifies exact prefix logit and sampling queries into a single framework, and the application of multilevel Monte Carlo methods for variance reduction.

Strengths and weaknesses

I find this submission to be a rigorous contribution to distributional analysis in LLMs.

The work’s primary strength lies in its introduction of the noisy prefix logit oracle, which unifies exact prefix logit and sampling queries into a single framework, enabling robust estimation of TV distance under realistic noise conditions. The proposed logit-based algorithm achieves optimal query complexity, leveraging full distributional outputs for prefixes to outperform sampling-based methods. This approach is further validated through practical applications, such as auditing LLMs to detect distributional discrepancies in real-world scenarios. The paper also bridges theoretical guarantees (e.g., tight lower bounds for oracle complexity) with practical relevance, addressing challenges like sparsity in next-token distributions (captured by the K factor).

Questions

-Given that the theoretical analysis in the paper assumes a binary alphabet for lower-bound proofs, how does this framework extend to subword-based logits in modern large language models (LLMs), which operate over open, high-dimensional alphabets? Is this a valid concern, and how might the authors address the discrepancy between the binary-alphabet assumption and the practical subword setting, not by theory, but in real use-case?

-How should we apply the proposed noisy prefix logit oracle ensuring robustness to real-world LLM implementation artifacts (e.g., batching, precision errors, and non-deterministic logits)?

Limitations

The work acknowledges several limitations and potential weaknesses. First, it explicitly states that the theoretical bounds under sampler access are not tight, leaving this as an open question for future research. This suggests that while the proposed algorithm achieves optimal query complexity under prefix logit oracles, its performance guarantees may be weaker in practical settings where sampling is the primary access method.

Additionally, the analysis assumes a binary alphabet for the lower bound proof, which may not generalize to more complex or high-dimensional distributional scenarios. The paper also notes that the K factor (related to sparsity in the support) can be large for real-world models like Qwen, potentially limiting the method’s efficiency for models with extensive vocabularies.

Finally, while experiments validate the approach on autoregressive models, the authors do not address broader societal impacts, focusing instead on technical contributions.

Paper formatting concerns

None

Final justification

Give all the discussions, I will keep my score.

1 comment

Thank you for your positive feedback and clarifying questions. We address your concerns here, and will incorporate this discussion into our revision.

Q1 & L2: The lower-bound proof only considers a binary alphabet and may not apply to general alphabets.

Our lower bound applies to arbitrary ∣Σ∣|\Sigma| via a small modification of the hard distribution in Appendix B.2. In particular, for ∣Σ∣>2|\Sigma| > 2, we can take two distinguished symbols in Σ\Sigma and treat them as {0,1}\{0, 1\} in the construction, and place zero probability mass on any string containing any other symbol. Notably, our upper bound in Theorem 2 is independent of ∣Σ∣|\Sigma|, so even our lower bound for ∣Σ∣=2|\Sigma| = 2 case shows the upper bound is unimprovable.

Q2: How should we apply the noisy oracle ensuring robustness to real-world LLM implementation artifacts?

From a theoretical perspective, our algorithm can handle any unbiased and independent noise satisfying the bounded relative-variance condition. In practice, one can first use a small number of pilot queries to estimate the noise level, and then run our algorithm with the corresponding schedule. Our method is designed precisely to be robust to nondeterministic logits, so this artifact is naturally covered by our model.

As you mentioned, real-world LLM implementation bring a lot of artifacts: precision errors introduced by quantization may systematically change the output distribution; different batching configurations may induce a systematic distribution shift. These are exactly the motivating use cases we listed in the paper! In these cases, given they are actually different output distributions, we shouldn't pursue robustness across different configurations; instead, the resulting distributional difference is exactly what our TV estimator aims to measure.

One caveat is that the unbiasedness and independence of the noise may be broken in real-world deployed LLM systems: for example, the softmax sampler could have an implicit bias, or the system may change based on load, which will vary over the course of the day. These aren't "supposed" to matter, but they can. Measuring whether they do seems to require more specialized cause-specific probing, which we leave to future work. Here we can give a generic measurement of variation over all causes that respect independence.

L3: The factor of KK may limit the method’s efficiency for models with large vocabularies.

We want to clarify that KK is the maximum support size of a prefix-conditional distribution, not the vocabulary size mm. A larger mm does not by itself imply a larger KK. In practice, the support size of prefix-conditional distributions is typically controlled by a user-specified parameter kk, e.g., the model cards for Qwen3.5, Phi-4-reasoning, Gemma 4, and Hugging Face Transformers all recommend k≈50k \approx 50 or less. While nondeterminism may make K>kK > k, our experiments in Appendix D.5 show that it is well below 2k2k in practice. In all cases, KK is substantially smaller than mm, e.g., a factor of ≈104\approx 10 ^ 4 for Qwen3. Notably, the mK\frac m K factor savings that our Theorem 1 enjoys over the prior work [MKP25] appears inherent to their approach, see discussion in Footnote 1.

Reviewer_z6HrOpenReview ↗
Rating
4
Clarity
2
Confidence
3
Originality
3
Quality
2
Significance
3
Read review
Summary

The paper studies additive estimation of total variation distance between two length-n autoregressive distributions. The motivation is that two LLM serving stacks may implement the same model weights but still induce different output distributions. The paper considers prefix sampling, exact prefix logit access, and noisy prefix distribution access. It gives improved query bounds under sampling access, a tight O(n/ϵ2)O(n/ϵ^2) result under exact logits, and a noisy-access estimator based on a TV mixture identity and multilevel Monte Carlo. The experiments include a synthetic validation and one vLLM--sglang comparison on Qwen3-0.6B.

Strengths and weaknesses

The problem is important and the TV-distance framing is well motivated. KL is fragile under support mismatch, so studying TV for autoregressive model comparison is a sensible direction. The access-model hierarchy is also useful, and the exact-logit result is clean.

The theoretical contribution is the strongest part of the paper. The likelihood-ratio estimator under logit access is simple but effective, and the matching lower bound makes the result more satisfying. The noisy-access estimator is also interesting; the use of a mixture representation and MLMC is a reasonable way to control the cost of estimating trajectory-level discrepancies.

However, the paper currently feels underdeveloped as a full NeurIPS submission. The abstract reads more like a list of theorem statements than a polished abstract, and the main paper ends after the experiments without a conclusion. This makes the submission feel incomplete: there is no final synthesis of what was learned, when the method should or should not be used, or what the practical takeaway is.

Questions
  1. How robust is the noisy-access estimator to biased or correlated repeated probability estimates? Can the authors provide either theory or stress tests for this case?

  2. How sensitive is the vLLM--sglang TV estimate to prompt, model size, top-k, temperature, precision, and repeat count?

Limitations

yes

Paper formatting concerns

The absence of a conclusion is normally not a formal formatting violation, but it does make the paper feel unfinished.

Final justification

The authors have adequately addressed several of my technical questions and concerns in their rebuttal. Overall, I am fairly confident in my assessment, and I note that the meta-review feedback is positive. Taking these considerations together, I have decided to raise my rating to Borderline Accept while continuing to follow the rebuttal discussion closely.

Reviewer_FFVhOpenReview ↗
Rating
5
Clarity
4
Confidence
2
Originality
3
Quality
4
Significance
3
Read review
Summary

The paper is about estimating total variation distance (TV) between 2 autoregressive models. The main research question is to estimate TV between autogressive models with error tolerance ϵ\epsilon with sufficiently high probability. To do that, the paper proposes 3 access models for autoregressive models: sample access, logit access, and noisy logit access. Among the three, noisy logit access is the most general model, taking the other two as sub-cases. To study complexity of estimating TV, the paper uses query complexity. The upper bound (for query complexity) is obtained for the noisy logit model (which generalizes for sample access model) and the logit access model. Proof techniques/strategies (for the noisy logit model) include studying TV under an alternative formula, repeated sampling (making sure that variance doesn't blow up), variance reduction (using a multilevel Monte Carlo variance reduction scheme). Result is that the paper obtains an upper bound of n+n2σ2ϵ2\frac{n + n^2 \sigma^2}{\epsilon^2} (in query complexity) for the noisy logit access model, where ϵ\epsilon is the error tolerance, and σ\sigma is the variance-bounding variable. With this, the paper obtains an upper bound (in query complexity) for the sampling access model better than the best known upper bound (for the same model) by a factor of nn. On the other hand, the paper obtains the query complexity lower bound of nϵ2\frac{n}{\epsilon^2} by construction, better than the best known lower bound of nlog⁡n\frac{n}{\log n}. This lower bound matches the upper bound for the logit access model (so the result for the logit access model is tight).

Strengths and weaknesses

The paper proposes interesting and reasonable access models (especially the noisy logit access model) for autoregressive models. The paper is written consisely, with clear intuitions in the main body before giving full proofs in the appendix. Some proofs that I followed seem reasonable and contain a fair amount of details. The paper is a nice addition to the literature in the topic. The techniques that the paper use are fairly standard, though.

Questions
  1. Line 97-98: you write "The main caveat is that we need independence across samples." Can you clarify why this is a caveat? Isn't it normal for different samples to be independent of one another? From what I understand, say an autoregressive model (named A) receives X (a string of tokens) as an input. If you sample once, say you obtain a token in the alphabet (say t) with probability p. If you sample a second time, then the probability to obtain the letter t is still p, right? So, independence is a reasonable assumption, right?
  2. Table 1: it's a little unclear to me what is the scope of your achievement proving the lower bound of nϵ2\frac{n}{\epsilon^2}. Are the techniques used before elsewhere, or did you come up with novel techniques? You did not emphasize the lower bound a lot in the abstract, so I kind of assume the whole time that it's less important than your upper bound results.
  3. Line 136: you say that some previous work "consider essentially the same sampler oracle" as yours. What do you mean exactly by "essentially"? Can you elaborate more on differences between your sampler oracle and other paper's, if any?
  4. Line 201-202: what does the "⋅\cdot" in "π(⋅∣X1:i=x1:i)\pi(\cdot \mid X_{1:i} = x_{1:i})" mean? I think it means a single random token in the alphabet. Is that right?
  5. Line 641: it's unclear to me why π^r≪π\hat\pi_r \ll \pi.
Limitations

I don't see the paper addressing limitations. I have nothing to suggest.

Paper formatting concerns

I don't see any issues so far.

Final justification

The paper is viewed positively overall, and no major issues are raised. Therefore, I don't change my decision of Accept.

1 comment

We thank the reviewer for their positive assessment of our paper and for raising these thoughtful questions. We address the reviewer's main concerns, and all references follow the same naming convention from our paper.

Q1: Why do we describe independence as a caveat?

From a theoretical perspective, we think it's a very reasonable assumption. But as a practical matter, there are a number of ways in which deployed LLM systems may violate the independence assumption. For example: (1) the system may change based on load, which will vary over the course of the day; (2) cache hits and misses may have distinct behavior; (3) the other requests in the same batch may slightly interfere with the response. These aren't "supposed" to matter, but they can. Measuring whether they do seems to require more specialized cause-specific probing which we leave to future work. Here we can give a generic measurement of variation over all causes that respect independence.

Q2: Scope of achievement for the lower bound?

Our construction, i.e., reduction to a Bayesian parameter estimation problem (the bias of a hidden coin), was based on techniques introduced in the prior work [CR14]. As the framework is relatively standard (although our specific construction is new), and upper bounds are more actionable for practitioners, we de-emphasized this result in the abstract. We will add a sentence clarifying the novelty scope when the lower bound is first introduced.

Q3: Why do we say “essentially” the same in Line 136?

Thank you for raising this question: our phrasing was unclear and we will modify the language to be less ambiguous. The works [MKP25, BCP+24] considered subcube conditioning, where an arbitrary subset of coordinates may be conditioned on (as opposed to prefixes only, as in our paper). This is a stronger oracle, corresponding to any-order autoregressive models, as opposed to left-to-right models. We used the word “essentially” because although [MKP25, BCP+24, Ada25] are formulated under stronger oracle-access models, their upper-bound algorithms can be directly instantiated in the left-to-right autoregressive setting with no extra cost.

Q4: What does “⋅\cdot” mean in π(⋅∣X1:i=x1:i)\pi(\cdot \mid X _ {1:i}=x _ {1:i})?

Here, the dot is a placeholder for the outcome. The expression

π(⋅∣X1:i=x1:i)\pi(\cdot \mid X _ {1:i}=x _ {1:i})

denotes the full conditional distribution of the (i+1)(i+1)-th token given the prefix x1:ix _ {1:i}, i.e., as the placeholder ⋅\cdot varies over each symbol in Σ\Sigma.

Q5: Why does π^r≪π\widehat{\pi} _ r \ll \pi hold in Line 641?

In probability theory, the notation π^r≪π\widehat{\pi} _ r \ll \pi means that, for every x∈Σnx \in \Sigma ^ n, π(x)=0  ⟹  π^r(x)=0.\pi(x)=0 \implies \widehat{\pi} _ r(x)=0. Recall that π(x)=∏i=1nπ(xi∣x1:i−1).\pi(x) =\prod _ {i=1} ^ n \pi(x _ i \mid x _ {1:i-1}). Therefore, if π(x)=0\pi(x)=0, there exists some i∈[n]i \in [n] such that π(xi∣x1:i−1)=0.\pi(x _ i \mid x _ {1:i-1})=0. By the unbiasedness of the noisy oracle,

\right] = \pi(x _ i \mid x _ {1:i-1}) = 0.$$ Since the oracle output is a probability vector and is therefore nonnegative, a coordinate with expectation zero must itself equal zero almost surely. Its empirical average is consequently also zero almost surely, so the corresponding factor in $\widehat{\pi} _ r(x)$ is zero. Hence, $\widehat{\pi} _ r(x)=0$, proving that $\widehat{\pi} _ r \ll \pi$. We will add more details on this argument in the proof of Lemma 6.

Comments on the paper

1 comment
Meta-review

The paper is viewed positively overall, and the reviewers find the proposed access models and accompanying theoretical results technically sound and interesting. In particular, the noisy logit access model, the likelihood-ratio estimator and matching lower bound, and the estimator for the noisy-access setting are appreciated. The reviewers are satisfied with the authors' rebuttal, and the remaining concerns are primarily presentational and can be addressed in the final version. Overall, the paper makes a valuable contribution to the literature on access models for autoregressive models, and the consensus is to accept.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.