Total Variation Distance Estimation in Autoregressive Models
Abstract
Estimating the total variation distance between two autoregressive language model distributions is addressed with improved query complexities under sample, logit, and noisy logit access, and validated by comparing SGLang and vLLM serving identical weights.
Modern LLM deployments use a number of implementation choices and inference optimizations (e.g., batching, custom kernels, and 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-n autoregressive distributions to additive error varepsilon, under three access models. (1) Under sample access, we use O(n^2 K/varepsilon^2) queries, where K is the maximum support of the next-token distribution. This improves upon the O(n^3 m/varepsilon^5)-query estimator of Meel et al. (2025), where m geq K is the total size of the token alphabet. (2) Under logit access, we use O(n/varepsilon^2) queries, and this is tight. (3) Under noisy logit access, we smoothly interpolate between the above two guarantees: if probability values are given to relative error σ, we use O((n+n^2σ^2)/varepsilon^2) queries. We complement our theoretical results with an empirical evaluation of our algorithms, for example measuring the distance between SGLang and vLLM serving identical weights. Our experiments highlight the robustness and practicality of estimating the total variation distance, which remains estimable where the KL divergence is infinite. Our code is available at https://github.com/XunZhiyang/llm-tv-estimation.
Get this paper in your agent:
hf papers read 2607.19510 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper