Manuscript Offprint

arXiv:2608.22746

Generative Neural Networks for Sinkhorn Distributionally Robust Hypothesis Testing

Fenglin Zhang, Teyan Liu, Jie Wang

Abstract

This paper studies the Sinkhorn distributionally robust hypothesis testing (SDRHT) problem, seeking a robust detector against least-favorable distributions in Sinkhorn discrepancy-based ambiguity sets centered at the empirical distributions. Existing approaches solve this problem by solving large-scale conic programs, which are not scalable. To overcome this, we propose a generative framework that learns least-favorable distributions and supports efficient training and end-to-end sampling. For the Sinkhorn discrepancy-based ambiguity sets, we first derive an equivalent conditional-KL-divergence representation with respect to kernel-smoothed reference distributions. This property allows us to prove strong duality for both constrained and unconstrained minimax SDRHT formulations. Based on the closed-form optimal detector and Brenier's theorem, we reformulate the max-min dual formulation as a maximization problem over convex potentials whose gradients characterize invertible transport maps between kernel-smoothed distributions and their least-favorable counterparts. We efficiently approximate these potentials using Hyper Input Convex Neural Networks (HyCNNs) equipped with stochastic gradient estimators and prove the representation power of HyCNNs and the distributional universality of their induced transport maps. Numerical results show that the proposed method achieves superior accuracy and robustness across different sample sizes and dimensions, while avoiding the scalability limitations of classical SDRHT methods.

Keywords: Sinkhorn distributionally robust optimization, robust hypothesis testing, generative model, least-favorable distribution generation, hyper input convex neural network

1 Introduction

Hypothesis testing is a fundamental problem in statistics and scientific discovery, aiming to find an optimal detector that, given new data, can discriminate between two competing hypotheses while minimizing decision errors. The Neyman–Pearson lemma [1] yields the optimal likelihood-ratio test when the densities of the underlying distributions are known. In practice, these distributions are typically unknown; instead, the decision-maker has only access to their independent

*Fenglin Zhang is affiliated with School of Artificial Intelligence, The Chinese University of Hong Kong, Shenzhen; Teyan Liu is affiliated with Department of Decision Analytics and Operations, College of Business, City University of Hong Kong; Jie Wang is affiliated with School of Artificial Intelligence and School of Data Science, The Chinese University of Hong Kong, Shenzhen. Corresponding author: Jie Wang, jwang@cuhk.edu.cn.

and identically distributed (i.i.d.) samples. This setting motivates data-driven hypothesis tests that are both statistically reliable and computationally efficient.

However, data-driven tests trained on finite samples are vulnerable to distributional misspecification [2]. On the one hand, for some applications like healthcare [3] and anomaly detection [4], where samples are limited and noisy, reliable estimation of the underlying distribution is challenging due to inevitable measurement and statistical errors. On the other hand, real data may be non-stationary or may undergo distributional shifts, leading to differences between training and testing data. To improve the reliability of hypothesis testing, especially in high-stakes scenarios, robust methods are necessary to circumvent these challenges [5, 6].

Distributionally robust optimization (DRO) [7] offers a powerful paradigm for making robust decisions under distributional uncertainty. When applied to hypothesis testing, DRO optimizes the robust detector against the least-favorable distributions (also known as worst-case distributions) within an ambiguity set consisting of plausible distributions, safeguarding against misspecification and enhancing out-of-sample reliability when applied to new, unseen data [8]. The design of the ambiguity set is crucial for balancing computational tractability and robust out-of-sample performance [9]. Popular choices include Huber's contamination model [10], f-divergence [11, 12], moments [13, 14], kernels [15, 16], or Wasserstein distance [8, 17].

DRO with ambiguity sets constructed using the Sinkhorn discrepancy has recently received increasing attention [18, 19]. Conventional Wasserstein DRO-based hypothesis testing restricts the worst-case distributions to have the same support as that of the empirical distributions [8]. By adding entropic regularization to the Wasserstein distance, the Sinkhorn discrepancy provides a smooth alternative to the Wasserstein distance [20], and the Sinkhorn discrepancy-based ambiguity sets naturally encourage continuous distributional estimates. Thus, unlike the Wasserstein distance-based ambiguity set, if a testing sample is outside the support of the observed data, it is still feasible to leverage the likelihood ratio detector to design a robust test. However, finding the least-favorable distributions in Sinkhorn-based hypothesis testing is an infinite-dimensional optimization problem. Existing approaches approximately solve it using sample average approximation and result in large-scale conic programs [21, 22], whose computational cost grows rapidly with the sample size. It is desirable to develop more tractable approaches for solving the robust hypothesis testing problem with Sinkhorn-based ambiguity sets.

Parallel to these developments in robust statistics, flow-based generative models have shown remarkable success in learning complex distributions as pushforwards of simple reference distributions through invertible and differentiable maps [23, 24, 25]. This framework is not only adept at generating new samples but is also naturally suited for solving optimization problems over probability space, e.g., generating least-favorable distributions in DRO [26, 27, 28]. By parameterizing a distribution as a flow-based transformation starting from a probability density, one can efficiently optimize an objective over the probability space using gradient-based methods [29, 30].

In this work, we leverage flow-based generative models to solve the Sinkhorn distributionally robust hypothesis testing (SDRHT). Based on the theoretical results of optimal transport, we introduce a generative framework to learn continuous least-favorable distributions within the Sinkhorn-based ambiguity sets by optimizing convex potentials. By parameterizing the convex

Figure

Figure 1: Illustration of the training and testing processes of our least-favorable detector.

potentials, our approach converts the original infinite-dimensional optimization into a finite-dimensional and tractable problem. Our main contributions are summarized as follows:

• Novel Reformulation: We establish a strong duality result for SDRHT and thereby reformulate the original minimax optimization as a max-min problem. As the inner minimized detector can be explicitly derived, this problem is equivalent to a maximum problem over distributions. Leveraging Brenier's theorem, we further reformulate it as a maximization problem over convex potentials.

• Generative Framework: We parameterize the convex potentials by Hyper Input Convex Neural Networks (HyCNNs) and develop stochastic gradient estimators for the objective. This transforms the infinite-dimensional optimization into a finite-dimensional one, enabling efficient and scalable training and sampling. We also prove the representation power of HyCNNs and the distributional universality of their induced gradient maps.

• Empirical Validation: We validate the performance of our method through extensive numerical studies on both synthetic datasets and real-world data with different sample sizes and dimensions, demonstrating its superiority over existing baselines in terms of both accuracy and robustness.

Figure 1 illustrates the training and testing processes of the proposed method using a toy Moons dataset. By exploiting the geometry of the Sinkhorn-based ambiguity set (Proposition 1 and Eq. (4)), the least-favorable distributions ( P0⋆P_0^\star, P1⋆P_1^\star) are generated by first applying kernel smoothing to the empirical distributions P^0\widehat{P}_0 and P^1\widehat{P}_1 to obtain P0ϵP_0^\epsilon and P1ϵP_1^\epsilon, and next robustifying them. In the robustification procedure, we learn convex-gradient maps (see Eq. (7) and Algorithm 1) that generate P0⋆P_0^\star and P1⋆P_1^\star based on the kernel-smoothed reference distributions P0ϵP_0^\epsilon, P1ϵP_1^\epsilon. The resulting least-favorable distributions induce a nonlinear robust decision boundary with high accuracy.

The remainder of this paper is organized as follows. Section 2 presents the models and properties of SDRHT. Section 3 develops a framework for generating least-favorable distributions. Section 4 shows the representation power of HyCNNs. Section 5 reports the numerical results. Section 6 concludes this paper. Proofs and additional technical notes are provided in the online appendix to this paper.

Notations. For K∈NK \in \mathbb{N}, let [K]:={1,⋯ ,K}[K] := \{1, \cdots, K\}. We write P≪ν\mathbb{P} \ll \nu if the probability measure P\mathbb{P} is absolutely continuous with respect to the measure ν\nu. We denote P⊗Q\mathbb{P} \otimes \mathbb{Q} by the product measure of two probability measures P\mathbb{P} and Q\mathbb{Q}. For a transport map T:Ω→ΩT : \Omega \to \Omega, the pushforward of a probability measure P\mathbb{P} is denoted as T#PT_{\#} \mathbb{P}, such that T#P(A)=P(T−1(A))T_{\#} \mathbb{P}(A) = \mathbb{P}(T^{-1}(A)) for any measurable set A⊆ΩA \subseteq \Omega. For a convex function φ:Rd→R∪{∞}\varphi : \mathbb{R}^d \to \mathbb{R} \cup \{\infty\}, denote its convex conjugate by φ∗(y)=sup⁡x∈Rd{y⊤x−φ(x)}\varphi^*(\boldsymbol{y}) = \sup_{\boldsymbol{x} \in \mathbb{R}^d} \{\boldsymbol{y}^\top \boldsymbol{x} - \varphi(\boldsymbol{x})\} for any y∈Rd\boldsymbol{y} \in \mathbb{R}^d.

References (47)