TabADM: Unsupervised Tabular Anomaly Detection with Diffusion Models

Guy Zamberg, Moshe Salhov, Ofir Lindenbaum, Amir AverbucharXiv 2023 · DOI

Abstract

TabADM is a novel unsupervised anomaly detection method that adapts diffusion models for tabular data. By employing a robust "rejection scheme" during training to mitigate the impact of unlabeled outliers and utilizing reconstruction loss as an anomaly score, TabADM achieves state-of-the-art performance, particularly on complex, high-dimensional datasets.

Introduction

Anomaly detection—the identification of rare items, events, or observations that raise suspicions by differing significantly from the majority of the data—is a critical task in domains ranging from fraud detection to medical diagnostics. In many real-world scenarios, labels are unavailable, necessitating unsupervised approaches. Traditional methods often struggle with the "curse of dimensionality" or rely on restrictive assumptions about data distribution. TabADM addresses these challenges by leveraging the generative power of diffusion models, adapted specifically for the nuances of tabular data.

Methodology

The core of TabADM lies in treating anomaly detection as a density estimation problem within a diffusion framework.

The Diffusion Process

Similar to image-based diffusion models, TabADM learns to reverse a forward process that gradually adds Gaussian noise to data points. The model is trained to predict the noise added at each timestep, effectively learning the underlying distribution of the training data.

Architecture and Anomaly Scoring

The architecture utilizes a ResNet-based structure tailored for tabular inputs, incorporating time embeddings to inform the model of the specific noise level at each step.

Overview of the TabADM architecture, showing the integration of data features, time embeddings, and residual blocks.

At inference time, the anomaly score for a given sample is calculated as the sum of reconstruction errors across all diffusion timesteps. Samples that deviate from the learned "normal" distribution result in higher reconstruction errors, signaling potential anomalies.

Robust Training via Rejection

A key innovation in TabADM is its "rejection scheme." Since training data in unsupervised settings is often contaminated with unlabeled anomalies, a standard model might inadvertently learn these outliers. TabADM mitigates this by calculating the loss for all samples in a batch but only updating weights based on a subset of samples with the lowest loss (controlled by a threshold $\tau$). This ensures the model focuses on the dominant "normal" patterns.

Experimental Setup

TabADM was evaluated using 32 datasets from the ADBench repository, encompassing 28 real-world tabular datasets (e.g., satellite data, fraud detection) and 4 high-dimensional datasets derived from CV and NLP embeddings. Performance was compared against 11 established detectors, including Isolation Forest (IF), ECOD, and NeuTraL AD.

Results and Discussion

TabADM demonstrated superior performance across the benchmark suite, achieving the highest average AUCROC (77.99) and Average Precision (36.00).

Average AUCROC and AP ranks of TabADM compared to baseline methods across various rejection thresholds $\tau$. Lower rank indicates better performance.

Key findings include:

  • Stability: TabADM maintains high performance with consistent hyperparameters across diverse datasets.
  • Scalability to High Dimensions: Unlike proximity-based methods, TabADM's relative performance improves as the number of features increases, effectively mitigating the curse of dimensionality.
  • Impact of Rejection: The rejection scheme is vital for performance in contaminated settings, as evidenced by the ranking stability across different $\tau$ values.

Conclusion

TabADM represents a significant step forward in tabular anomaly detection. While it introduces higher computational costs compared to shallow methods and lacks inherent interpretability, its robustness and performance on high-dimensional data make it a powerful tool for unsupervised discovery. Future work may focus on optimizing inference speed and extending the framework to handle categorical data and missing values directly.

Citation: Zamberg, G., Salhov, M., Lindenbaum, O., & Averbuch, A. (2023). TabADM: Unsupervised Tabular Anomaly Detection with Diffusion Models. arXiv:2307.12336v1 [cs.LG].

Summary updated

BibTeX
@misc{zamberg2023tabadm,
  author = {Guy Zamberg and Moshe Salhov and Ofir Lindenbaum and Amir Averbuch},
  title = {{TabADM: Unsupervised Tabular Anomaly Detection with Diffusion Models}},
  year = {2023},
  eprint = {2307.12336},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.12336},
}
Figure