Table of Contents
Fetching ...

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.

Dealing with Uncertainty in Contextual Anomaly Detection

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.

Paper Structure

This paper contains 11 sections, 8 equations, 4 figures, 6 tables.

Figures (4)

  • Figure 1: Simulated data from WHO growth curves for girls. Here $H\sim\mathcal{N}(\overline{h}(A),\overline{\sigma}(A))$, where the age-indexed mean function $\overline{h}(A)$ and standard deviation $\overline{\sigma}(A)$ are derived from published data group:2006:who_child_growth. In the training data, $A\sim\mathrm{Exp(0.4)}$, so that young girls have a much higher probability of appearing in the training data. Non-contextual anomaly detection algorithms (such as isolation forests) trained to find the support of the joint $p(H,A)$ fail to spot children that are too tall or too short for their age, and additionally flag as outliers data points where the marginal $p(A)$ is small. ROCOD, a state-of-the-art algorithm for CAD, does not suffer from this problem but fails to correctly estimate conditional outliers in the presence of context-specific AU (heteroscedasticity). Our approach (NS) correctly identifies conditional outliers and, in addition, can abstain when EU (estimated as the width of the 95% HDI, $i(H,A)$, see Section \ref{['sec:computing_NS']}) is high: In the plot, points with $i(H,A)>2$ are colored in blue with an intensity proportional to $i(H,A)$).
  • Figure 2: ROC curves for detecting aortic dilation for SoV and AA diameters.
  • Figure 3: Heatmaps of $i((\textrm{Age},\textrm{BSA}),y)$ at a fixed diameter $y=32$mm for SoV and AA diameters.
  • Figure 4: Bicuspid patients where NS interval highlights high diagnostic uncertainty. For each diameter, we show the Z-score (red), NS (blue), its HDI (error bar), and the corresponding probability $P(\mathrm{NS}>2)$.