Introduction
In real-world machine learning deployments, distribution shift—where production data differs from training data—is inevitable. However, not all shifts are problematic. "Benign" shifts change input distributions without impacting model accuracy, while "harmful" shifts directly degrade performance. Detecting these harmful shifts is challenging because ground-truth labels are often delayed or unavailable in production environments.
The Challenge of Unlabeled Monitoring
Traditional monitoring tools often rely on statistical tests like the Kolmogorov-Smirnov (KS) test, which detect any change in data distribution. This frequently leads to "alarm fatigue," as engineers are alerted to shifts that do not actually harm model performance. Furthermore, existing "plug-in" methods that estimate error without labels often lack statistical rigor and fail to control false alarm rates effectively.
Methodology: Sequential Harmful Shift Detection (SHSD)
The SHSD framework addresses these issues by combining error estimation with sequential testing.
The process involves three core components:
- Error Estimation: A secondary "plug-in" model is trained to predict the primary model's error. Crucially, this model only needs to maintain ordinality—ranking "hard" cases higher than "easy" ones—rather than achieving perfect numerical accuracy.
- Threshold Calibration: Using a labeled calibration set, the system identifies a threshold for estimated error ($\hat{q}$) and true error ($q$). This "selector" is optimized to identify high-error samples while strictly controlling the False Discovery Proportion (FDP).
- Sequential Monitoring: In production, the system tracks the proportion of samples exceeding the estimated error threshold. By using time-uniform Confidence Sequences, the framework can raise an alarm as soon as the proportion of high-error samples significantly deviates from the calibrated baseline.
Key Insights and Results
The researchers found that tracking a quantile (the proportion of samples above a high-error threshold) is significantly more robust than tracking the mean estimated error. In tabular data experiments, the quantile-based detector achieved a power of 0.83 with an FDP of 0.11, vastly outperforming mean-based alternatives.
On the Folktables dataset, which simulates geographical and temporal shifts in US Census data, SHSD maintained a remarkably low false alarm rate (FDP of 0.019) while successfully identifying harmful regional shifts. When compared to batch methods like Detectron, SHSD showed superior control over false alarms in small-sample scenarios, which is critical for early detection.
Conclusion
SHSD provides a principled statistical approach to model monitoring. By focusing on the ordinality of error estimation and utilizing sequential confidence sequences, it allows for real-time detection of harmful shifts without the need for immediate labels, effectively reducing alarm fatigue and improving model reliability in production.
Reference: Amoukou, S. I., et al. (2024). Sequential Harmful Shift Detection Without Labels. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).
Summary updated