Abstract
Estimating the Total Variation (TV) distance between high-dimensional discrete distributions is a fundamental challenge in computer science, with applications ranging from LLM evaluation to MCMC verification. Traditional sampling methods face an exponential query complexity barrier, requiring $\Omega(2^n/n)$ samples. This paper, presented at AISTATS 2025, introduces DistEstimate, the first algorithm to achieve polynomial query complexity—$\tilde{O}(n^3/\epsilon^5)$—by leveraging a "subcube conditional" (SUBCOND) sampling model. Empirical evaluations demonstrate that DistEstimate provides up to a $10^7 \times$ speedup over traditional baselines on 70-dimensional problems, making high-dimensional distance estimation computationally feasible.
Introduction: The Curse of Dimensionality
In many domains, it is critical to quantify the difference between two probability distributions $P$ and $Q$. The standard metric for this is Total Variation (TV) distance. However, for high-dimensional domains such as $n$-bit strings $\{0, 1\}^n$, the number of possible outcomes grows exponentially. In the classical sampling model, where one simply draws independent samples, estimating TV distance requires an astronomical number of queries. For $n=70$, this exceeds the number of atoms in a typical macroscopic object, rendering standard estimation impossible.
The SUBCOND Sampling Model
To bypass this exponential lower bound, researchers have turned to conditional sampling. This paper focuses on Subcube Conditional Sampling (SUBCOND). In this model, the algorithm can request a sample from a specific subset of the domain defined by fixing certain bits (e.g., "provide a sample where the first three bits are 101"). This model is particularly relevant for modern machine learning, as it mirrors the token-by-token generation process of autoregressive models like GPT. SUBCOND is more powerful than simple sampling but remains more practical than general conditional models that allow conditioning on arbitrary sets.
The DistEstimate Algorithm
The core contribution, DistEstimate, achieves polynomial complexity through three technical innovations:
- Distribution Taming: To handle rare outcomes, the algorithm transforms $P$ and $Q$ into "tame" versions where no marginal probability falls below a threshold $\Omega(\epsilon/n)$. This ensures efficient sampling without significantly altering the TV distance.
- Chain Rule and Negative Binomials: The probability of a string is decomposed into a product of conditional marginals. The algorithm estimates these marginals by treating sampling as a series of trials until a success occurs, utilizing Negative Binomial properties to bound query counts.
- The Median Trick: To ensure high confidence, the algorithm takes the median of multiple independent runs, a robust technique for boosting reliability.
Empirical Evaluation
The authors evaluated DistEstimate using two state-of-the-art combinatorial samplers: STS (search-based) and CMSGen (conflict-driven). Testing was conducted on scalable random Boolean functions (up to $n=70$) and real-world benchmarks from the ISCAS89 dataset (combinatorial circuits).
On the ISCAS89 benchmarks (up to $n=37$), DistEstimate achieved high accuracy, with a mean absolute difference from ground truth of only 0.09, well within the allowed tolerance ($\epsilon = 0.3$). Most importantly, at $n=70$, the algorithm provided a $10^7 \times$ speedup compared to the theoretical requirements of non-conditional estimators, completing in a practical timeframe where baselines would require $\sim 10^{18}$ queries.
Conclusion and Future Work
DistEstimate represents a significant step forward by providing the first polynomial-query algorithm for high-dimensional TV distance estimation. While the $O(n^3)$ complexity is a major breakthrough, a gap remains compared to the known lower bound of $\Omega(n/\log n)$. Future research may focus on tightening these bounds and optimizing the algorithm's dependence on the tolerance parameter $\epsilon$. Additionally, extending these techniques to large-alphabet hypergrids remains an important open challenge for applications with massive vocabularies.
Summary updated