Dealing with Uncertainty in Contextual Anomaly Detection
Luca Bindini, Lorenzo Perini, Stefano Nistri, Jesse Davis, Paolo Frasconi
TL;DR
We address contextual anomaly detection by modeling the target variable y conditioned on context x with Normalcy Score (NS), a framework built on heteroscedastic Gaussian process regression to separately capture aleatoric and epistemic uncertainty. NS uses two independent GPs, f1 for the mean and f2 for the log-standard deviation, giving NS(x,y) = (y - f1(x)) / e^{f2(x)} and enabling 95% high-density intervals (HDI) to quantify uncertainty. The approach scales via sparse variational GP with inducing points and provides both a point anomaly score and a principled uncertainty measure, enabling abstention in uncertain regions. Empirically, NS achieves state-of-the-art ROC AUC and PR AUC on five UCI CAD benchmarks and a real-world aorta-diameter dataset, with robust uncertainty-aware performance and interpretable uncertainty heatmaps for clinical decision support.
Abstract
Contextual anomaly detection (CAD) aims to identify anomalies in a target (behavioral) variable conditioned on a set of contextual variables that influence the normalcy of the target variable but are not themselves indicators of anomaly. In many anomaly detection tasks, there exist contextual variables that influence the normalcy of the target variable but are not themselves indicators of anomaly. In this work, we propose a novel framework for CAD, normalcy score (NS), that explicitly models both the aleatoric and epistemic uncertainties. Built on heteroscedastic Gaussian process regression, our method regards the Z-score as a random variable, providing confidence intervals that reflect the reliability of the anomaly assessment. Through experiments on benchmark datasets and a real-world application in cardiology, we demonstrate that NS outperforms state-of-the-art CAD methods in both detection accuracy and interpretability. Moreover, confidence intervals enable an adaptive, uncertainty-driven decision-making process, which may be very important in domains such as healthcare.
