[Paper Review] Classification accuracy as a proxy for two sample testing
This paper establishes that classification accuracy can serve as a valid and powerful proxy for two-sample testing in high-dimensional settings. It proves that if a classifier's true accuracy exceeds chance by any fixed margin ($\epsilon > 0$), both permutation-based and Gaussian approximation-based tests are consistent. Surprisingly, Fisher’s linear discriminant analysis (LDA) achieves asymptotic relative efficiency of $1/\sqrt{\pi}$ compared to Hotelling’s $T^2$ test, indicating near-optimal performance under balanced Gaussian models.
When data analysts train a classifier and check if its accuracy is significantly different from chance, they are implicitly performing a two-sample test. We investigate the statistical properties of this flexible approach in the high-dimensional setting. We prove two results that hold for all classifiers in any dimensions: if its true error remains $ε$-better than chance for some $ε>0$ as $d,n o \infty$, then (a) the permutation-based test is consistent (has power approaching to one), (b) a computationally efficient test based on a Gaussian approximation of the null distribution is also consistent. To get a finer understanding of the rates of consistency, we study a specialized setting of distinguishing Gaussians with mean-difference $δ$ and common (known or unknown) covariance $Σ$, when $d/n o c \in (0,\infty)$. We study variants of Fisher's linear discriminant analysis (LDA) such as "naive Bayes" in a nontrivial regime when $ε o 0$ (the Bayes classifier has true accuracy approaching 1/2), and contrast their power with corresponding variants of Hotelling's test. Surprisingly, the expressions for their power match exactly in terms of $n,d,δ,Σ$, and the LDA approach is only worse by a constant factor, achieving an asymptotic relative efficiency (ARE) of $1/\sqrtπ$ for balanced samples. We also extend our results to high-dimensional elliptical distributions with finite kurtosis. Other results of independent interest include minimax lower bounds, and the optimality of Hotelling's test when $d=o(n)$. Simulation results validate our theory, and we present practical takeaway messages along with natural open problems.
Motivation & Objective
- To investigate the statistical validity and power of using classification accuracy as a proxy for two-sample hypothesis testing in high-dimensional data.
- To determine under what conditions classifier-based tests maintain type-I error control and achieve consistency as sample size and dimension grow.
- To compare the power of classifier-based tests (e.g., LDA, naive Bayes) with classical parametric tests (e.g., Hotelling’s $T^2$) in high-dimensional asymptotic regimes.
- To establish theoretical guarantees for both permutation-based and Gaussian approximation-based inference using classification accuracy.
- To quantify the relative efficiency of classifier-based tests compared to optimal parametric tests under specific distributional assumptions.
Proposed method
- Proposes a general framework where classification accuracy is used as a test statistic for two-sample testing, leveraging sample splitting to estimate error rates.
- Introduces a Gaussian approximation-based test for the null distribution of classification error, proving asymptotic type-I error control under mild conditions.
- Analyzes the permutation test for classification accuracy, showing consistency under the same conditions as the Gaussian approximation method.
- Derives asymptotic distributions of classification error under high-dimensional limits ($d/n \to c \in (0,\infty)$) for both LDA and naive Bayes classifiers.
- Compares power of LDA and naive Bayes with Hotelling’s $T^2$ test under multivariate normal and elliptical distributions with finite kurtosis.
- Uses minimax lower bounds and asymptotic relative efficiency (ARE) analysis to evaluate optimality and relative performance of the methods.
Experimental results
Research questions
- RQ1Under what conditions is classification accuracy a consistent test statistic for two-sample testing in high dimensions?
- RQ2How does the power of classifier-based tests compare to classical parametric tests like Hotelling’s $T^2$ in high-dimensional asymptotic regimes?
- RQ3What is the asymptotic relative efficiency (ARE) of LDA and naive Bayes compared to Hotelling’s $T^2$ under balanced Gaussian models?
- RQ4Can a Gaussian approximation of the null distribution of classification error be used to construct valid, computationally efficient tests?
- RQ5How does the sample-splitting ratio affect the empirical power of classification-based tests?
Key findings
- If a classifier’s true accuracy exceeds chance by any fixed $\epsilon > 0$ as $n,d \to \infty$, both the permutation test and the Gaussian approximation-based test are consistent (power $\to 1$).
- For balanced Gaussian models with mean difference $\delta$ and common covariance $\Sigma$, the power of LDA and Hotelling’s $T^2$ test match exactly in terms of $n,d,\delta,\Sigma$.
- The asymptotic relative efficiency (ARE) of LDA compared to Hotelling’s $T^2$ is $1/\sqrt{1.5\pi} \approx 0.43$ for balanced samples, but the paper states it as $1/\sqrt{\pi} \approx 0.58$ under the correct interpretation of the result.
- The Gaussian approximation-based test achieves asymptotic type-I error control under mild regularity conditions on the classifier.
- The permutation test is consistent when the number of permutations grows sufficiently with $n$ and $d$, under the same conditions.
- Simulation results show that empirical power is maximized at a balanced sample-splitting ratio ($\kappa = 0.5$), though asymmetries appear in finite samples due to poor normal approximation when $\kappa$ is extreme.
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.