Asymptotically Optimal Sequential Testing with Markovian Data
Authors: Alhad Sethi, Kavali Sofia Sagar, Shubhada Agrawal, Debabrota Basu, P. N. Karthik
Organizations: Indian Institute of Science, Bangalore · Indian Institute of Technology, Hyderabad · Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 – CRIStAL
We study one-sided and α-correct sequential hypothesis testing for data generated by an ergodic, finite-state Markov chain. The null hypothesis is that the unknown transition matrix belongs to a prescribed set P of stochastic matrices, and the alternative corresponds to a disjoint set Q. We establish a non-asymptotic instance-dependent lower bound on the expected stopping time of any valid sequential test under the alternative, which is asymptotically tight. Our novel analysis improves the existing lower bounds, which are either asymptotic or provably sub-optimal in this setting. Our lower bound incorporates both the stationary distribution and the transition structure induced by the unknown Markov chain. We further propose an optimal test whose expected stopping time matches this lower bound asymptotically as α→0. We illustrate the usefulness of our framework through applications to sequential detection of model misspecification in Markov Chain Monte Carlo and to testing structural properties, such as the linearity of transition dynamics, in Markov decision processes. Our findings yield a sharp and general characterization of optimal sequential testing procedures under Markovian dependence.
Figures & tables
Figure 1: Test statistic trajectories over time for Qbad (red) and Qgood (green), aggregated over 100 runs. Solid curves and shaded regions show the mean ±3σ ; dotted colored curves denote the boundary. The dotted black line shows the theoretical slope DMinf(Qbad,Pπ) , and the vertical line marks the mean stopping time for Qbad .
Figure 2: Mean statistic trajectory aggregated over 20 runs. Shaded regions indicate ±3 standard deviations.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: On the left side, we show the average trajectory (shaded: ±3 standard deviations) taken by the statistic across time. On the right side, we plot the histogram of stopping times across the same runs.
Figure 4: We show the average trajectory (shaded: ±3 standard deviations) taken by the statistic across time. We do not observe any rejections empirically and estimate the rejection probability indirectly via importance sampling to be 1.21×10−30±2.12×10−30 over n=1000 runs.
Parameter
Value
Description
α
0.01
Target Type-I error probability
S
64
State space size ( 8×8 discretization)
A
3
Action space size
d
{3,5,7}
Tested feature dimensions (ranks)
Check Interval
100
Frequency of statistic evaluation (steps)
T (Horizon)
100,000
Maximum duration of the experiment
Appendix
Table 1: Hyperparameters for the Linear MDP Experiment on Discretized MountainCar.
Figure 5: Expected Stopping Time as a function of log(α1) for the experimental setup described in Appendix G.3 .
m
α
Mean Stopping Time
Mean runtime/step (s)
32
0.05
665.65±130.893
0.0184±0.001
64
0.05
2516.84±620.151
0.0796±0.002
128
0.05
9700.55±2181.039
0.6890±0.121
Appendix
Table 2: Comparison of mean stopping times and runtimes for different values of m .
m
α
Mean Stopping Time
Mean runtime/step (s)
64
0.01
2864.83±565.180
0.0692±0.004
64
0.05
2516.84±620.151
0.0796±0.002
64
0.1
2370.36±717.654
0.0773±0.002
Appendix
Table 3: Comparison of mean stopping times and runtimes for different values of α .
Figure 6: Expected stopping time as a function of θ∈[−0.8,−0.4] for the experimental setup described in Section G.4 .
Figure 7: Expected Stopping Time as a function of log(α1) for a fixed θ=−0.6 in the experimental setup described in G.4 .
We consider a variant of sequential testing by betting where, at each time step, the statistician is presented with multiple data sources (arms) and obtains data by choosing one of the arms. We consider the composite global null hypothesis P that all arms are null in a certain sense (e.g. all dosages of a treatment are ineffective) and we are interested in rejecting P in favor of a composite alternative Q where at least one arm is non-null (e.g. there exists an effective treatment dosage). We posit an optimality desideratum that we describe informally as follows: even if several arms are non-null, we seek e-processes and sequential tests whose performance are as strong as the ones that have oracle knowledge about which arm generates the most evidence against P. Formally, we generalize notions of log-optimality and expected rejection time optimality to more than one arm, obtaining matching lower and upper bounds for both. A key technical device in this optimality analysis is a modified upper-confidence-bound-like algorithm for unobservable but sufficiently "estimable" rewards. In the design of this algorithm, we derive nonasymptotic concentration inequalities for optimal wealth growth rates in the sense of Kelly [1956]. These may be of independent interest.
Ricardo J. Sandoval, Ian Waudby-Smith, Michael I. Jordan
University of California, Berkeley · École Normale Supérieure & Inria, Paris
For a given data distribution (Xt)t∈N∼Q i.i.d., we investigate the hypothesis testing problem: H0:Q=P0 vs. H1:Q=P1, for two different model probability distributions P0 and P1. In contrast to the standard setting, where analytic densities p0 and p1 are given, here, we consider the density-free setting, where we only have access to i.i.d. simulations (Zt0)t∈N∼P0 and (Zt1)t∈N∼P1. For this simulation-based hypothesis testing setting, we construct an e-test martingale, resulting in a sequential test with anytime-valid type-I error guarantees, approximate growth optimality, geometrically decaying type-II error bounds, and asymptotic power one. Most ingredients used in our constructions are variants of well known concepts. The value of this paper lies in the compact presentation of an effective, anytime-valid solution for the density-free simulation-based sequential hypothesis testing case.
Across many risk-sensitive areas, it is critical to continuously audit machine learning systems as we receive more data to quickly determine if they are performing as designed. This auditing task can be modeled as a sequential hypothesis testing problem with k data streams and a global null hypothesis that asserts the system operates as intended across all k streams. Under the alternative, the standard global sequential test, which uses a Bonferroni correction, has an expected stopping time of O(lnαk) for large k and significance level α. In this work, we demonstrate that efficient sequential tests, relying on merging martingales via averaging and products rules, provide improved stopping times, and thus more powerful tests against the null. Using these results, we show that a balanced test can match the Bonferroni rate of O(lnαk) in the sparse regime (just a few non-null streams) while achieving O(k1lnα1) under dense alternatives (many non-null steams). We validate our theory through experiments on both synthetic and real-world data.