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.
翻译:我们提出了一种用于检测任意分布偏移的序贯检验方法,该方法使条件正则检验鞅(CTMs)能够在固定参考条件下工作。现有CTM检测器通过持续扩展随每个新样本增长的参考集来构建检验鞅,并利用该参考集评估新样本相对于历史观测的异常程度。虽然这种设计能够实现任意有效的第一类错误控制,但其存在检验时污染问题:当分布发生变化后,变化后的观测会进入参考集,稀释分布偏移的证据,从而增加检测延迟并降低检验效能。相比之下,我们的方法通过将每个新样本与固定的零假设参考数据集进行对比,从根本上避免了污染问题。我们的主要技术贡献在于构建了一种稳健的鞅结构,该结构在条件于零假设参考数据时依然有效——通过显式考虑有限参考集所导致的参考分布估计误差来实现。该方法不仅实现了任意有效的第一类错误控制,还保证了渐近功效为1以及有界期望检测延迟。实验表明,我们的方法比标准CTMs更快检测到分布偏移,为分布偏移检测提供了强大且可靠的解决方案。