Abstract
This paper introduces DAVT (Deep Anytime-Valid Hypothesis Testing), a framework that leverages deep learning to construct powerful sequential hypothesis tests. By framing testing as a game where a neural network learns to bet against the null hypothesis, DAVT provides a unified approach for complex tasks such as two-sample testing and adversarial robustness. The framework ensures strict error control while allowing for early stopping, addressing the limitations of classical batch testing.
Introduction
In classical statistics, hypothesis tests are typically "batch" tests: a sample size $n$ is decided in advance, data is collected, and a p-value is computed. However, "peeking" at results to decide whether to collect more data—a practice known as p-hacking—invalidates mathematical guarantees. Sequential testing offers a solution by allowing for "anytime-valid" inference, where a data stream is continuously monitored and the experiment can stop as soon as sufficient evidence exists to reject the null hypothesis. Despite their benefits, designing powerful sequential tests for high-dimensional data like images remains challenging, often requiring hand-crafted strategies.
Methods: Testing-by-Betting
The authors address these challenges by leveraging the "testing-by-betting" framework. In this setup, a fictitious bettor starts with $1. Under the null hypothesis, the game is fair, and the bettor's wealth should not grow on average. If the null is false, a strategic bettor can accumulate wealth exponentially. Once wealth exceeds a threshold (e.g., $1/\alpha$), the null is rejected with a guaranteed type-I error of $\alpha$.
The Key Innovations of DAVT include: * Abstract Operator Formulation: The null hypothesis is defined using two operators ($T_1, T_2$), assuming $T_1(Z) \stackrel{d}{=} T_2(Z)$. This abstraction covers two-sample testing, independence testing, and adversarial robustness. * Deep Learning as the Bettor: A Deep Neural Network (DNN) learns the "payoff function" to maximize wealth growth. The DNN is updated mini-batch by mini-batch, adapting to the data stream in real-time. * Joint Learning: DAVT learns the bet and the payoff design jointly, allowing the model to adapt to the specific complexity of the data.
Empirical Evaluation and Results
The framework was evaluated on several benchmarks, including the synthetic Blob Dataset for two-sample testing, CIFAR-10 for adversarial robustness (FGSM attacks), MNIST for rotation invariance, and synthetic data for Conditional Independence Testing (CIT).
Key Insights: * Sample Efficiency: DAVT demonstrates high sample efficiency, reaching maximum power significantly faster than previous state-of-the-art sequential methods in CIT tasks. * Competitive Performance: On the Blob dataset, DAVT matched or outperformed specialized sequential baselines such as E-C2ST and Seq-IT. * Robustness Certification: DAVT effectively detects when "robust" models fail under adversarial perturbations, outperforming non-sequential batch tests as sample sizes increase. * Anytime Validity: The "anytime-valid" nature allows researchers to stop early to save resources without compromising the significance level, a major practical advantage.
Conclusion and Future Work
While DAVT provides a powerful and flexible framework, it introduces computational overhead due to the need for frequent DNN updates. Future work may explore more efficient "online" training modes and automated architecture searches (AutoML) to optimize the betting strategy for specific tasks. Despite these costs, DAVT represents a significant step forward in making sequential hypothesis testing practical for complex, high-dimensional data.
Summary updated