Skip to main content
QUICK REVIEW

[Paper Review] Bayesian Anomaly Detection and Classification

Ethan Roberts, Bruce A. Bassett|arXiv (Cornell University)|Feb 22, 2019
Anomaly Detection Techniques and ApplicationsComputer Science22 references11 citations
TL;DR

This paper introduces Bayesian Anomaly Detection and Classification (BADAC), a hierarchical Bayesian framework that jointly performs classification and anomaly detection while rigorously propagating measurement uncertainties. BADAC outperforms standard algorithms in both tasks when noise models are known, producing well-calibrated probabilities and enabling robust detection even under model misspecification or correlated noise.

ABSTRACT

Statistical uncertainties are rarely incorporated in machine learning algorithms, especially for anomaly detection. Here we present the Bayesian Anomaly Detection And Classification (BADAC) formalism, which provides a unified statistical approach to classification and anomaly detection within a hierarchical Bayesian framework. BADAC deals with uncertainties by marginalising over the unknown, true, value of the data. Using simulated data with Gaussian noise, BADAC is shown to be superior to standard algorithms in both classification and anomaly detection performance in the presence of uncertainties, though with significantly increased computational cost. Additionally, BADAC provides well-calibrated classification probabilities, valuable for use in scientific pipelines. We show that BADAC can work in online mode and is fairly robust to model errors, which can be diagnosed through model-selection methods. In addition it can perform unsupervised new class detection and can naturally be extended to search for anomalous subsets of data. BADAC is therefore ideal where computational cost is not a limiting factor and statistical rigour is important. We discuss approximations to speed up BADAC, such as the use of Gaussian processes, and finally introduce a new metric, the Rank-Weighted Score (RWS), that is particularly suited to evaluating the ability of algorithms to detect anomalies.

Motivation & Objective

  • To develop a statistically rigorous method for simultaneous classification and anomaly detection that accounts for measurement uncertainties in data.
  • To produce well-calibrated classification probabilities suitable for scientific pipelines requiring uncertainty propagation.
  • To enable detection of novel or anomalous classes without prior labeling, supporting unsupervised anomaly discovery.
  • To address limitations in existing methods that ignore intraclass variability or fail to model data uncertainties properly.
  • To provide a framework that remains robust under model errors and can diagnose such errors via model-selection techniques.

Proposed method

  • BADAC employs a hierarchical Bayesian model where class-conditional likelihoods are defined over raw data, marginalizing over unknown true values using known noise distributions.
  • It computes posterior probabilities for class membership and anomaly scores by integrating over all possible true values of the observed data, incorporating measurement uncertainties.
  • The method uses a likelihood function based on Gaussian noise models, with extensions to handle correlated errors and nuisance parameters like translation shifts.
  • Anomalous objects are ranked by their posterior probability of being outside all known classes, enabling anomaly detection without predefined thresholds.
  • The framework supports online inference and can be accelerated using Gaussian processes or prototype templates to reduce computational cost.
  • A new evaluation metric, the Rank-Weighted Score (RWS), is introduced to assess anomaly detection performance by rewarding correct ranking of anomalies.

Experimental results

Research questions

  • RQ1Can a unified Bayesian framework simultaneously achieve accurate classification and robust anomaly detection while properly propagating measurement uncertainties?
  • RQ2How does BADAC perform compared to standard algorithms like random forests, IsolationForest, and LOF in the presence of known noise models?
  • RQ3To what extent does BADAC maintain performance under model misspecification, such as non-Gaussian or correlated noise?
  • RQ4Can BADAC produce well-calibrated classification probabilities that are suitable for use in scientific analysis pipelines?
  • RQ5How effective is BADAC at detecting novel classes in an unsupervised manner?

Key findings

  • BADAC outperforms random forests in classification and IsolationForest and LOF in anomaly detection when the correct noise model is known, due to proper uncertainty exploitation.
  • For compact anomalies resembling noisy spikes, BADAC’s performance is comparable to LOF and superior to IsolationForest.
  • BADAC produces well-calibrated classification probabilities, which is critical for reliable use in scientific pipelines requiring uncertainty propagation.
  • Even under non-Gaussian or correlated noise, BADAC maintains strong anomaly detection performance, though classification accuracy degrades, especially in correlated cases.
  • When the noise model is incorrect, BADAC’s probability calibration breaks down, but this can be corrected by incorporating the true noise structure into the likelihood.
  • The method is computationally expensive and does not scale well to large datasets, but can be accelerated via Gaussian processes or template-based approximations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.