Anytime-Valid Confidence Sequences
- Anytime-valid confidence sequences are sequences of intervals that guarantee a specified coverage probability uniformly over all time points.
- They are constructed using martingale methods, such as exponential and mixture martingales, to prevent type-I error inflation from continuous monitoring.
- These sequences are vital for sequential analysis and adaptive inference, with applications in sub-Gaussian mean estimation and nonparametric testing.
An anytime-valid confidence sequence is a sequence of random sets (typically intervals or regions) for unknown parameters, designed to guarantee prescribed coverage probability not just at a single, pre-chosen sample size but uniformly over all time points and all data-dependent stopping rules. This property prevents type-I error inflation caused by continuous monitoring (“peeking”) in sequential analyses, making confidence sequences fundamental to rigorous adaptive inference in modern statistical and machine learning applications.
1. Formal Structure and Coverage Guarantee
An anytime-valid confidence sequence (CS) for a functional , where is the data-generating law, is a sequence of (possibly random) sets such that
Equivalently, for every stopping time —including any data-dependent rule—a uniformly valid CS satisfies
This time-uniform coverage property immediately implies robust error control under optional stopping and continuation (Ramdas et al., 2020, Ramdas et al., 2022). In practical terms, the procedure remains valid regardless of when the user chooses to evaluate it, sidestepping inflated type-I error even under arbitrary peeking.
2. Martingale Foundations and Ville’s Inequality
The rigorous construction and justification of anytime-valid CSs fundamentally depend on nonnegative martingales or supermartingales. Suppose is a nonnegative supermartingale adapted to the data filtration, starting at . Ville’s inequality states that for any ,
uniformly over all underlying laws and all stopping times (Ramdas et al., 2020). For parametric or function-indexed models, a family of nonnegative martingales can be constructed such that the CS is the set of parameters not yet “rejected”: Admissibility theory shows that all admissible anytime-valid confidence sequences must arise (possibly up to null-set modifications) as inversions of such martingale-based sequential tests; no other approach avoids being dominated or strictly improved upon without leaking type-I error (Ramdas et al., 2020).
3. Construction Methods and Key Examples
The method of constructing CSs depends on the problem structure:
- Exponential Martingales: For sub-Gaussian or bounded support data, use exponential martingales. For mean estimation, , with , where mixing over yields optimal nonasymptotic CSs (Ramdas et al., 2022, Ramdas et al., 2020).
- Mixture Martingales: Mixtures over , , or other tilting parameters yields closed-form CSs with coverage exact for all (Ramdas et al., 2022).
- Composite Nulls and Functionals: For functionals or composite null models, pointwise martingales and their aggregates (max- or mixture-martingales) underpin admissible CSs (Ramdas et al., 2020).
- Sequential Testing Duality: Inversion of martingale-based sequential tests yields CSs; conversely, leaving a CS implies rejection of corresponding parameter hypotheses (Gnettner et al., 14 Feb 2025).
Examples: For a sub-Gaussian mean, a universal CS is
holding uniformly over (Ramdas et al., 2020).
4. Admissibility, Optimality, and Improvements
Ramdas et al. (Ramdas et al., 2020) comprehensively analyze admissibility: a CS is inadmissible if it is strictly dominated by another CS that is uniformly tighter (i.e., smaller at all times, strictly smaller at some time, with equal or better error control). The main results include:
- Max-martingale construction: For singleton nulls, admissibility is characterized via Doob–Lévy max-martingales.
- Composite nulls and dominance: Any admissible CS for composite nulls is constructed by “pasting” together admissible martingales for point nulls, extended via transfinite induction and domination arguments.
- Extensions to e-processes and p-processes: Any admissible e-process or p-process likewise must be based on nonnegative (super)martingales, with the Snell envelope and Doob decomposition providing the formal links.
- Sub-Gaussian supermartingale optimality: The classical sub-Gaussian exponential supermartingale is shown to be admissible—no alternative can strictly improve its performance without losing validity (Ramdas et al., 2020).
The universal principle established is:
“Admissible anytime-valid sequential inference for testing or confidence must be built from nonnegative martingales—explicitly for e-values and tests, or implicitly (via inversion) for p-values and confidence sequences. No other structure can uniformly dominate martingale-based procedures without violating validity.” (Ramdas et al., 2020)
5. Practical Implementation Strategies
Typical recipes to implement CSs from martingales:
- Choice of family: Select a martingale or supermartingale family satisfying the required conditional mean or moment generating function constraints for the null hypothesis.
- Mixing distributions: When necessary, mix over priors (e.g., Gaussian for normal means), yielding mixture martingales with tight finite-sample bounds.
- Boundary inversion: At each time , invert to obtain ; extract endpoints or regions as needed.
- Sequential algorithms: For parameter grids, vectorize martingale updates; use FFT or precomputed log-masses for efficiency.
- Monitoring and reporting: Report the intersection of all CSs across or signal crossings when a parameter is excluded.
- Implementation tips: Exploit models’ structure for computational savings, maintain running maxima/minima, and adapt mixing for variance or prior knowledge.
6. Illustrative Applications and Extensions
- Classical mean estimation: Sub-Gaussian CSs, e.g., (Ramdas et al., 2020), remain tight and admissible relative to classical fixed-horizon methods.
- Symmetry testing: Recent constructions demonstrate domination over earlier NSM-based methods—they yield strictly narrower CSs under symmetry alternatives (Ramdas et al., 2020).
- Composite and nonparametric inference: Martingale-based CSs extend to testing symmetry, quantiles, functionals, through appropriate exponential or mixture martingale designs, supporting parametric and nonparametric sequential inference (Ramdas et al., 2022).
- Adaptive inference in streaming and sequential decision making: Martingale-based CSs are the foundational tools for robust adaptive statistical inference under sequential data acquisition, continuous monitoring, and arbitrary data-dependent stopping (Ramdas et al., 2020, Ramdas et al., 2022).
7. Fundamental Insights and Limitations
Every admissible, anytime-valid sequential inference procedure—be it for confidence intervals, p-processes, or e-processes—must fundamentally leverage nonnegative (super)martingales. No alternative procedure is universally valid, dominates, or is strictly tighter without risk of type-I error inflation. Advanced martingale constructions (max-martingales, Snell envelopes, Doob decomposition, transfinite induction) are necessary for rigorous admissibility theory in composite and nonparametric cases (Ramdas et al., 2020). Practical implementation reduces to inversion of uniformly valid martingale-based tests, and all extensions—functionals, symmetry, regression, adaptive algorithms—remain tied to martingale theory at their core.