NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Testing k-Modal Distributions: Optimal Algorithms via Reductions

Constantinos Daskalakis, Ilias Diakonikolas, Rocco A. Servedio, Gregory Valiant, Paul Valiant

TL;DR

This paper introduces a novel reduction-based framework to efficiently test and estimate distances between k-modal probability distributions. The authors achieve near-optimal sample complexity for these tasks, significantly improving upon prior work, by cleverly reducing the problem on large domains to a similar problem on much smaller domains.

What Problem Does This Paper Address?

The paper tackles fundamental problems in statistical inference: specifically, identity testing (determining if two distributions are the same) and L1 distance estimation (quantifying how different two distributions are). The challenge is to do this efficiently, meaning with as few samples as possible, when the distributions have a specific structure: they are k-modal. A k-modal distribution is one that has at most k "peaks" or "modes." While these distributions are common in real-world data (e.g., measurements of heights, chemical concentrations), existing algorithms for general distributions require a large number of samples, often impractical. The authors aim to leverage the k-modal structure to develop significantly faster algorithms. They consider four specific scenarios: testing identity or estimating distance when the second distribution is either explicitly known or also accessed via samples.

Methods

The core innovation is a reduction-based approach. The authors show that testing k-modal distributions over a large domain of size $n$ can be transformed into testing general distributions over a much smaller domain of size $l = O(k \log n / \epsilon^2)$. This transformation involves creating a "flat decomposition" of the large domain into a smaller number of intervals.

  1. Oblivious Decomposition (for Monotone Distributions): For the simpler case of monotone distributions (k=0), they use a pre-defined partition of the domain that guarantees the "flattened" distribution (where mass within each interval is averaged) is close to the original distribution. This allows them to reduce the problem on $[n]$ to a problem on $O(\log n / \epsilon)$ elements.
  2. Construct-Flat-Decomposition (for k-Modal Distributions): For general k-modal distributions, this is more complex. The algorithm first draws samples to estimate the distribution. It then greedily partitions the domain into "atomic" intervals. These intervals are then classified as "negligible" (low mass), "heavy points" (single points with significant mass), or "moderate" (significant mass, far from uniform). The "heavy" and "negligible" intervals are handled directly. For "moderate" intervals, the algorithm guesses their orientation (increasing, decreasing, or uniform-like) and uses the monotone decomposition (or its dual) if the guess is non-uniform. This procedure, with high probability, yields a partition that allows reduction to a smaller domain of size $O(k \log n / \epsilon^2)$.
  3. Reduction to General Distribution Testing: Once the k-modal problem is reduced to a problem on a smaller domain $[l]$, the authors leverage existing, albeit computationally intensive, algorithms for testing general distributions over $[l]$.
  4. Lower Bounds: Complementary to their algorithmic results, they also establish lower bounds by transforming known lower-bound instances for general distributions into k-modal distribution instances on larger domains, demonstrating the near-optimality of their algorithms.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • The Power of Reductions: The paper highlights how reducing a problem on a structured, large domain to a problem on a general, small domain can be a powerful algorithmic paradigm. This is a key conceptual contribution.
  • Domain Shrinking for Structure: The core idea is that the structural property (k-modality) allows us to "shrink" the effective domain size from $n$ to $O(k \log n / \epsilon^2)$ for testing purposes. This is a significant improvement over the $O(n^{2/3})$ or $O(n)$ sample complexities for general distributions.
  • Monotone Distributions as Building Blocks: The algorithms for k-modal distributions heavily rely on the techniques developed for monotone distributions, showcasing a hierarchical approach.
  • Oblivious vs. Sample-Based Decomposition: The contrast between the "oblivious" decomposition for monotone distributions (no samples needed for partitioning) and the sample-dependent decomposition for k-modal distributions is crucial.

Key Results

The paper provides algorithms and matching lower bounds for four problems:

  • Testing identity (q known): Sample complexity $O((k \log n / \epsilon^2)^{1/2} \cdot \text{polylogs})$.
  • Testing identity (q unknown): Sample complexity $O((k \log n / \epsilon^2)^{2/3} \cdot \text{polylogs})$.
  • Estimating L1 distance (q known): Sample complexity $O((k \log n / \epsilon^2) \cdot \text{polylogs})$.
  • Estimating L1 distance (q unknown): Sample complexity $O((k \log n / \epsilon^2) \cdot \text{polylogs})$.

These bounds are optimal up to polylogarithmic factors in $n$ and $k$, and polynomial factors in $1/\epsilon$. This is a significant improvement over previous results, which required $O((\log n)^3)$ samples for monotone/unimodal distributions. The algorithms run in poly-logarithmic time in $n$ and $k$.

Limitations and Future Work

  • Sample Complexity for Decomposition: The CONSTRUCT-FLAT-DECOMPOSITION algorithm for k-modal distributions requires $O(k^2 \epsilon^{-4} \log(1/\delta))$ samples. The authors pose as future work whether a more efficient version using $o(k)$ samples is possible.
  • Generalizing the Reduction: The authors suggest that their reduction-based approach could be applied to other classes of distributions, which would involve developing efficient "flat decomposition" procedures for those classes.
  • Practical Implementation: While the theoretical bounds are excellent, the constants involved in the polylogarithmic factors and the $k^2$ term in the decomposition might impact practical performance for very large $k$ or small $\epsilon$.

Summary updated

BibTeX
@inproceedings{daskalakis2013testing,
  author = {Constantinos Daskalakis and Ilias Diakonikolas and Rocco A. Servedio and Gregory Valiant and Paul Valiant},
  title = {{Testing k-Modal Distributions: Optimal Algorithms via Reductions}},
  booktitle = {SODA},
  year = {2013},
  doi = {10.1137/1.9781611973105.131},
}
Figure