Sequential Multivariate Change Detection with Calibrated and Memoryless False Detection Rates

Oliver Cobb, Arnaud Van Looveren, Janis KlaiseAISTATS 2022

In the world of machine learning deployment, "distribution shift" is a critical challenge. When a model trained on pristine data encounters the real world, data starts to drift due to changing consumer habits, sensor wear, or new environments. To catch this, practitioners use sequential change detectors. However, these detectors often suffer from a "crying wolf" problem: they trigger false alarms much sooner or later than intended.

A new framework, CALM (Calibrated and Memoryless), presented at AISTATS 2022, introduces a method for setting time-varying thresholds that ensures the rate of false positives remains constant and predictable over time.

The Challenge of Calibration

Ideally, a change detector should have a predictable false alarm rate. If a user sets a target "Expected Runtime" (ERT) of 1,000 steps, the detector should, on average, trigger its first false alarm at step 1,000 when no change is present. Furthermore, the time until the first false alarm should follow a geometric distribution, satisfying the memoryless property.

Existing methods fail here for two primary reasons:

  1. Correlation: Because sliding windows are used, the test statistic at time $t$ is highly correlated with the one at $t-1$. Fixed thresholds ignore this, leading to "clumpy" false alarms.
  2. Asymptotic Guarantees: Many methods rely on mathematical assumptions that only hold as data goes to infinity. In practice, with finite data, these detectors are often wildly miscalibrated.

The CALM Framework: Time-Varying Thresholds

CALM addresses these issues by using a simulation-based approach to configure time-varying thresholds ($h_t$). Instead of a single fixed threshold, CALM uses a bootstrap procedure to simulate thousands of "no-change" scenarios from reference data. It then calculates a specific threshold for every time step to ensure the probability of a false alarm at that exact moment is exactly $\alpha$.

Figure 1: Comparison between a fixed threshold and CALM's time-varying thresholds. CALM adapts the threshold over time to maintain a constant false positive rate, especially during the initial window-filling period.

This adaptive approach allows the detector to "learn" the correlation structure of the window during the initial steps. Additionally, the authors optimized the Maximum Mean Discrepancy (MMD) metric, reducing its operational cost from $O(N^2)$ to $O(N)$, making it feasible for high-frequency data streams.

Verifying the Memoryless Property

By forcing the false alarm distribution to be geometric, the significance of a detection becomes easy to interpret. If a detector goes off, you know exactly how likely that was to happen by chance, regardless of how long the detector has been running. This "memoryless" gold standard is verified using Q-Q plots, which compare experimental results to theoretical distributions.

Figure 3: Q-Q plots comparing the runtimes of a state-of-the-art method (Li et al.) and CALM-MMD against a theoretical geometric distribution. CALM-MMD's alignment with the diagonal indicates near-perfect adherence to the memoryless property.

As shown in the Q-Q plots, CALM-MMD's runtimes almost perfectly match the diagonal line of a geometric distribution, whereas previous methods deviate significantly as the expected runtime increases.

Key Results

  • Near-Perfect Calibration: On synthetic tests, CALM hit the target Expected Runtime within ~1% error, achieving a 20x reduction in miscalibration compared to existing state-of-the-art methods.
  • Medical Imaging Success: In experiments using the Camelyon17-WILDS dataset, CALM achieved a 98.9% reduction in detection time compared to the average false alarm time, proving it can catch subtle, real-world distribution shifts quickly.

Conclusion

CALM provides a robust solution for sequential change detection by combining time-varying thresholds with a memoryless false detection rate. By moving away from fixed thresholds and asymptotic assumptions, it offers practitioners a reliable tool for monitoring distribution shift with predictable and interpretable performance.

Summary updated

BibTeX
@inproceedings{cobb2022sequential,
  author = {Oliver Cobb and Arnaud Van Looveren and Janis Klaise},
  title = {{Sequential Multivariate Change Detection with Calibrated and Memoryless False Detection Rates}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
}
Figure