[Paper Review] Classification Logit Two-sample Testing by Neural Networks
This paper proposes a neural network-based two-sample test using the difference of logit functions from a trained classifier on test sets. It theoretically proves consistent testing power for sub-exponential distributions, with network complexity scaling only with intrinsic dimensionality when data lie near low-dimensional manifolds, outperforming prior neural network and kernel-based methods in experiments.
The recent success of generative adversarial networks and variational learning suggests training a classifier network may work well in addressing the classical two-sample problem. Network-based tests have the computational advantage that the algorithm scales to large samples. This paper proposes a two-sample statistic which is the difference of the logit function, provided by a trained classification neural network, evaluated on the testing set split of the two datasets. Theoretically, we prove the testing power to differentiate two sub-exponential densities given that the network is sufficiently parametrized. When the two densities lie on or near to low-dimensional manifolds embedded in possibly high-dimensional space, the needed network complexity is reduced to only scale with the intrinsic dimensionality. Both the approximation and estimation error analysis are based on a new result of near-manifold integral approximation. In experiments, the proposed method demonstrates better performance than previous network-based tests using classification accuracy as the two-sample statistic, and compares favorably to certain kernel maximum mean discrepancy tests on synthetic datasets and hand-written digit datasets.
Motivation & Objective
- Address the classical two-sample problem using deep learning for improved scalability and performance on high-dimensional data.
- Overcome limitations of traditional kernel-based tests (e.g., MMD) that suffer from poor performance in high dimensions or with large samples.
- Develop a theoretically grounded, scalable two-sample test using a trained classification neural network as the core statistic.
- Demonstrate that network complexity depends only on intrinsic dimensionality when distributions lie near low-dimensional manifolds, not ambient dimension.
- Provide a novel theoretical framework based on near-manifold integral approximation to analyze approximation and estimation error.
Proposed method
- Train a deep neural network classifier on combined data from two distributions, using cross-entropy loss (equivalent to minimizing Jensen-Shannon divergence).
- Compute the test statistic as the difference in average logit values (log-odds) on the test set between the two groups.
- Use a generalization error bound based on a novel near-manifold integral approximation result to control estimation error.
- Establish approximation error bounds by showing that a sufficiently wide and deep network can approximate the optimal logit function with error scaling with intrinsic dimensionality.
- Apply concentration inequalities and covering arguments on Lipschitz functions to bound the deviation between empirical and true expectations.
- Leverage the fact that the logit difference statistic is a sum of i.i.d. sub-exponential random variables, enabling central limit theorem-based variance control for testing power.
Experimental results
Research questions
- RQ1Can a trained neural network classifier provide a statistically powerful and scalable two-sample test statistic?
- RQ2Does the required network complexity scale with ambient dimension or only with the intrinsic dimension of the underlying data manifold?
- RQ3How does the approximation error of the neural network classifier affect the testing power in the two-sample problem?
- RQ4Can the proposed logit-based test outperform existing methods such as kernel MMD and accuracy-based neural network tests?
- RQ5What theoretical guarantees can be established for the test's consistency and power under sub-exponential tail assumptions?
Key findings
- The proposed logit-based test achieves higher statistical power than previous neural network methods that use classification accuracy as the test statistic.
- The method outperforms Gaussian kernel MMD on synthetic manifold data and MNIST digit generation tasks, especially in high-dimensional settings.
- Theoretical analysis shows that network complexity scales with the intrinsic dimension of the data manifold rather than the ambient dimension when distributions lie near low-dimensional manifolds.
- The estimation error is bounded by a term involving the intrinsic dimension and sample size, specifically $ O(( ext{log } n / n)^{1/(2+d)}) $, where $ d $ is the intrinsic dimension.
- The approximation error is controlled via a new near-manifold integral approximation result, which bounds the deviation of integrals over manifolds with bounded reach.
- The test statistic is asymptotically normal under the null, and its variance is bounded by a constant depending on the network's Lipschitz constant, ensuring reliable inference.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.