We propose a sequential test for detecting arbitrary distribution shifts that allows conformal test martingales (CTMs) to work under a fixed, reference-conditional setting. Existing CTM detectors construct test martingales by continually growing a reference set with each incoming sample, using it to assess how atypical the new sample is relative to past observations. While this design yields anytime-valid type-I error control, it suffers from test-time contamination: after a change, post-shift observations enter the reference set and dilute the evidence for distribution shift, increasing detection delay and reducing power. In contrast, our method avoids contamination by design by comparing each new sample to a fixed null reference dataset. Our main technical contribution is a robust martingale construction that remains valid conditional on the null reference data, achieved by explicitly accounting for the estimation error in the reference distribution induced by the finite reference set. This yields anytime-valid type-I error control together with guarantees of asymptotic power one and bounded expected detection delay. Empirically, our method detects shifts faster than standard CTMs, providing a powerful and reliable distribution-shift detector.
翻译:本文提出了一种用于检测任意分布漂移的序贯检验方法,该方法使得共形检验鞅能够在固定的、以参考集为条件的设定下工作。现有的CTM检测器通过持续将每个新到达样本加入参考集来构建检验鞅,并利用该参考集评估新样本相对于历史观测的异常程度。虽然这种设计能实现任意时间有效的第一类错误控制,但它存在测试时污染问题:在分布变化发生后,漂移后的观测会进入参考集,从而稀释分布漂移的证据,增加检测延迟并降低检验功效。相比之下,我们的方法通过将每个新样本与固定的零假设参考数据集进行比较,从设计上避免了污染问题。我们的主要技术贡献是构建了一种稳健的鞅,该鞅在给定零假设参考数据的条件下保持有效性,这是通过显式地考虑有限参考集引起的参考分布估计误差而实现的。该方法不仅具有任意时间有效的第一类错误控制特性,同时保证了渐近功效为1以及有界的期望检测延迟。实验表明,我们的方法比标准CTM更快地检测到分布漂移,提供了一个强大且可靠的分布漂移检测器。