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

Robust Hypothesis Testing Using Wasserstein Uncertainty Sets

Rui Gao, Liyan Xie, Yao Xie, Huan Xu

TL;DR

This paper introduces a fully non-parametric, data-driven framework for robust minimax hypothesis testing using Wasserstein uncertainty sets centered on empirical data. By showing that the worst-case "least favorable distributions" concentrate solely on the observed data points, the authors reduce an intractable infinite-dimensional problem into a tractable, finite-dimensional convex program whose complexity is independent of data dimension.

What Problem Does This Paper Address?

Classical hypothesis testing relies heavily on the Neyman-Pearson lemma: if you know the exact nominal distributions under the null ($H_1$) and alternative ($H_2$) hypotheses, the likelihood ratio test is optimal. In the real world, however, distributions are rarely known exactly. Outliers, sensor noise, and distribution shift cause likelihood ratio tests to fail.

Prior robust testing methods tackle this by building uncertainty sets around nominal distributions (such as Huber’s $\epsilon$-contamination or Kullback-Leibler divergence balls). However, they run into two fundamental roadblocks:

  1. Computational intractability: Finding the "least favorable distributions" (LFDs) in these sets is generally restricted to 1D settings or requires strict parametric assumptions (e.g., Gaussianity).
  2. Support mismatch: Total variation and KL divergences are ill-defined or infinite when comparing discrete empirical distributions to continuous ground-truth distributions, or when distributions live on low-dimensional manifolds with zero overlap.

Methods

The authors frame the task as a minimax risk minimization problem over order-1 Wasserstein balls $\mathcal{P}_1, \mathcal{P}_2$ of radii $\theta_1, \theta_2$, centered directly on the empirical distributions $Q_1$ and $Q_2$:

$$\mathcal{P}_k = \{P \in \mathcal{P}(\Omega) : \mathcal{W}(P, Q_k) \le \theta_k\}, \quad k = 1, 2$$

To solve the minimax detector problem, the paper introduces several techniques:

  • Convex Safe Approximation: The non-convex 0–1 error probability is upper-bounded using a convex generating surrogate loss $\ell$ (e.g., exponential, logistic, hinge, or quadratic loss).
  • Strong Duality Interchange: The authors establish that the infimum over all arbitrary detectors and the supremum over infinite-dimensional distributions can be swapped: $$\inf_{\phi} \sup_{P_1, P_2} \Phi(\phi; P_1, P_2) = \sup_{P_1, P_2} \inf_{\phi} \Phi(\phi; P_1, P_2)$$
  • Finite-Dimensional Reformulation: Exploiting the geometric properties of optimal transport, the authors prove that the LFDs have support strictly contained within the pooled empirical sample points $\widehat{\Omega} = \{\hat{\omega}_i^1\} \cup \{\hat{\omega}_j^2\}$. The problem simplifies to an exact $(n_1 + n_2) \times (n_1 + n_2)$ finite-dimensional convex program that can be solved via standard convex solvers.

Datasets

  • WISDM (Wireless Sensor Data Mining) Actitracker Dataset: A real-world dataset comprising accelerometer time-series (collected at 20 Hz, 3 axes: $a_x, a_y, a_z$) across smartphone users performing physical activities (walking, jogging, stairs, sitting, standing). The authors evaluate 100 sequential change-detection sequences (e.g., detecting the transition from jogging to walking).
  • No synthetic toy datasets or new benchmark datasets were created.

Key Insights and Ideas

  • LFDs Collapses to the Data Points: Why does the infinite-dimensional distribution optimization collapse into a discrete matrix? To maximize testing risk, the adversary wants to push mass from $P_1$ and $P_2$ together to maximize distributional overlap. By the triangle inequality, moving mass directly along the line segments connecting opposite samples minimizes transportation cost. Concavity of the risk objective further forces that mass all the way onto the empirical sample points of the opposing class.
  • Dimension-Free Optimization: The dimension $d$ of the observation space $\Omega \subset \mathbb{R}^d$ appears only during the pre-computation of pairwise distances $\|\omega^l - \omega^m\|$. The optimization variables scale only with sample sizes $n_1, n_2$.
  • Connection to Classical Divergences: The inner infimum over detectors directly mirrors $f$-divergence measures. For example:
  • Exponential loss recovers the Hellinger distance.
  • Logistic loss recovers the Jensen-Shannon divergence.
  • Hinge loss recovers the Total Variation distance and yields the tightest relaxation bound to the true minimax risk.
Generating Loss $\ell(t)$ Optimal Detector $\phi^*(\omega)$ Auxiliary Gap $\psi(p)$ Associated Divergence
$\exp(t)$ $\frac{1}{2}\log(p_1/p_2)$ $2\sqrt{p(1-p)}$ Hellinger ($H^2$)
$\log(1 + e^t) / \log 2$ $\log(p_1/p_2)$ $-(p\log p + (1-p)\log(1-p))/\log 2$ Jensen-Shannon ($JS/\log 2$)
$(t + 1)_+$ (Hinge) $\text{sgn}(p_1 - p_2)$ $2\min(p, 1-p)$ Total Variation ($TV$)

Key Results

  • Lower Detection Delays: When integrated into a CUSUM sequential change-detection scheme, the proposed Wasserstein detectors drastically outperformed the multivariate Hotelling $T^2$ control chart across 100 real-world activity sequences. Hotelling $T^2$ often failed completely because the change in activity involved complex distribution shape changes rather than simple shifts in mean or covariance.
  • Hinge Loss Outperformed Log-Loss: The sign detector $\phi^* = \text{sgn}(p_1^* - p_2^*)$ (derived from Hinge loss) systematically achieved shorter average detection delays than the log-ratio detector $\frac{1}{2}\ln(p_1^*/p_2^*)$ at identical Type-I error rates, validating the theoretical finding that Hinge loss yields a tighter convex approximation.

Limitations and Future Work

  • Sample Size Scaling: The optimization problem involves $(n_1 + n_2)^2$ coupling variables $\gamma^{lm}_k$. While first-order methods achieve nearly sample-size-independent iteration complexity $O(\ln(n_1) + \ln(n_2))$ when gradients are $\ell_\infty$-bounded, storing and computing pairwise distances remains quadratic in sample size.
  • Heuristic Radius Selection: Choosing the Wasserstein radius $\theta$ currently relies on bootstrapping to ensure that within-class resamples yield near-zero divergence while maintaining between-class separability; rigorous data-driven tuning rules are left for future work.
  • Future Directions: Extending the framework to multi-hypothesis testing, asymmetric Type-I/Type-II error budgets, and scaling to massive streaming datasets via distributionally robust optimization techniques.

Summary updated

BibTeX
@inproceedings{gao2018robust,
  author = {Rui Gao and Liyan Xie and Yao Xie and Huan Xu},
  title = {{Robust Hypothesis Testing Using Wasserstein Uncertainty Sets}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=WaKvDNRzlPz},
}
Figure