NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep Positive-Unlabeled Anomaly Detection for Contaminated Unlabeled Data

Hiroshi Takahashi, Tomoharu Iwata, Atsutoshi Kumagai, Yuki Yamanaka · DOI

Abstract

Semi-supervised anomaly detection typically assumes that unlabeled training data consists entirely of normal instances. However, in real-world scenarios, unlabeled data is often contaminated with hidden anomalies, causing models to misidentify these anomalies as normal behavior. This paper introduces a deep Positive-Unlabeled (PU) framework that mathematically "subtracts" the influence of these hidden anomalies. By applying this framework to Autoencoders (PUAE) and Support Vector Data Description (PUSVDD), the authors achieve state-of-the-art performance on contaminated datasets. Experimental results across eight image datasets, including medical benchmarks, demonstrate the framework's robustness and its superior ability to generalize to unseen anomalies.

Introduction

In traditional semi-supervised anomaly detection, models are trained using a small set of labeled anomalies and a large set of unlabeled data, which is assumed to be normal. In practice, this unlabeled set is frequently contaminated with unlabeled anomalies. When a standard model attempts to minimize anomaly scores for this contaminated set, it inadvertently learns that some anomalies are normal, thereby weakening the detector's sensitivity.

This research addresses the problem through the lens of Positive-Unlabeled (PU) Learning. The goal is to learn a classifier from a mixture of labeled positives (anomalies) and an unlabeled set containing both positives and negatives (normal data).

Methodology

The core innovation is the Deep Positive-Unlabeled Anomaly Detection framework. It leverages the PU learning identity: the distribution of unlabeled data is a weighted mixture of the anomaly distribution and the normal distribution. By rearranging this relationship, the authors derive a loss function for normal data using only the unlabeled set and the labeled anomalies, effectively "de-contaminating" the training signal.

Comparison of decision boundaries across different learning paradigms.

The framework is applied to two architectures:

  1. PUAE (Positive-Unlabeled Autoencoder): Utilizes reconstruction error as the anomaly score.
  2. PUSVDD (Positive-Unlabeled Support Vector Data Description): Maps data into a feature space and optimizes a hypersphere to enclose normal points.

To maintain stability during training with complex neural networks, the authors implement a non-negative risk estimator, preventing the loss function from dropping below zero.

Experimental Setup

The framework was evaluated on eight image datasets, including standard benchmarks (MNIST, FashionMNIST, SVHN, CIFAR10, CIFAR100) and medical imaging datasets (PathMNIST, OCTMNIST, TissueMNIST). To simulate realistic conditions, the training sets were contaminated with "seen" anomalies, while "unseen" anomalies were reserved for testing generalization.

Key Results

The PUSVDD model consistently outperformed competing methods. It achieved an AUROC of 0.989 on MNIST and 0.811 on CIFAR10 unseen anomalies, where standard semi-supervised models like ABC performed near random guessing.

Performance comparison (AUROC) across various image and medical datasets.

As shown in the table above, PUSVDD reached a score of 0.731 on the complex TissueMNIST dataset, a significant improvement over the unsupervised baseline (0.472). The model also demonstrated remarkable robustness to the estimation of the contamination rate ($\alpha$), maintaining stable performance even when the estimate was slightly inaccurate.

Discussion and Future Work

The proposed PU framework effectively isolates the "normal" distribution without requiring labeled normal data. This leads to significantly better generalization to unseen anomalies. However, the requirement for an estimated contamination rate ($\alpha$) remains a practical challenge. Future research may focus on extending this framework to other data modalities, such as time-series data for industrial monitoring, and optimizing the computational overhead associated with the PU learning objective.

Summary updated

BibTeX
@misc{takahashi2024deep,
  author = {Hiroshi Takahashi and Tomoharu Iwata and Atsutoshi Kumagai and Yuki Yamanaka},
  title = {{Deep Positive-Unlabeled Anomaly Detection for Contaminated Unlabeled Data}},
  year = {2024},
  eprint = {2405.18929},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.18929},
}
Figure