Distribution Prototype Diffusion Learning for Open-set Supervised Anomaly Detection

Fuyun Wang, Tong Zhang, Yuanzhi Wang, Yide Qiu, Xin Liu, Xu Guo, Zhen Cui

Introduction

Anomaly Detection (AD) typically operates in environments with abundant normal data but scarce anomalous examples. This imbalance gives rise to Open-set Supervised Anomaly Detection (OSAD), where models trained on a limited set of known anomalies must generalize to identify entirely novel, unseen defect types during inference. Traditional approaches often rely on generating "pseudo-anomalies" to define decision boundaries. However, these synthetic outliers frequently fail to capture the intricate characteristics of real-world defects, leading to imprecise boundaries. Moreover, many existing methods neglect the underlying structural information of normal data, resulting in overfitting to the few seen anomalies.

The DPDL Framework

To address these challenges, we introduce Distribution Prototype Diffusion Learning (DPDL). This framework shifts the focus from simulating anomalies to precisely modeling the distribution of normal data through a three-stage process.

Overview of the DPDL framework, illustrating the integration of Dispersion Feature Learning (DFL), Distribution Prototype Learning (DPL) via Schrödinger Bridge, and MIL-based score prediction.

1. Distribution Prototype Learning (DPL)

Rather than assuming a single center for all normal data, DPL learns multiple Gaussian prototypes to represent the inherent diversity of normal samples. A Schrödinger Bridge (SB) diffusion process is employed to map normal features toward these learned prototypes. This mechanism effectively "encloses" normal data within safe zones while simultaneously pushing known anomaly samples away, creating a highly discriminative latent space.

2. Dispersion Feature Learning (DFL)

To prevent "feature collapse"—a common issue where the model maps all normal samples to a single point—DFL projects features onto a hyperspherical space. By utilizing a loss function based on the von Mises-Fisher distribution, the model ensures that normal features are sufficiently dispersed. This dispersion minimizes "gaps" in the feature space where novel anomalies might otherwise go undetected.

3. Multi-Instance Learning (MIL) Score Prediction

The final stage utilizes an MIL-based head to aggregate local patch features. This allows the model to not only classify an image as anomalous but also to localize the specific regions contributing to the anomaly score.

Experimental Evaluation

DPDL was evaluated across nine diverse datasets, including industrial (e.g., MVTec AD, AITEX) and medical (e.g., Brain-MRI, HeadCT) domains. Testing followed two primary protocols:

  • General Setting: Randomly sampled anomalies for training.
  • Hard Setting: Training on only a single type of anomaly and testing on all others to rigorously evaluate generalization to unseen classes.

Results and Discussion

DPDL achieved state-of-the-art (SOTA) performance across all benchmarks. In the challenging "Hard Setting," DPDL demonstrated a significant performance leap, outperforming previous leading methods like AHL by over 8.3% on datasets such as AITEX and ELPV.

Ablation study results for DPDL across various datasets under General and Hard settings. The charts demonstrate the performance contribution of the DPL and DFL components.

Ablation studies (see Figure 2) confirm that both the diffusion-based prototype mapping (DPL) and the hyperspherical dispersion (DFL) are critical. Removing either component results in a substantial drop in the Area Under the Curve (AUC), particularly in hard settings where the model's ability to define a robust "normalcy" boundary is most tested.

Conclusion

DPDL redefines OSAD by prioritizing the structural modeling of normal data. By combining learnable Gaussian prototypes with a Schrödinger Bridge diffusion process and ensuring feature dispersion, the model creates a tight, discriminative boundary that excels at identifying novel anomalies. While the framework shows sensitivity to hyperparameter selection (e.g., the number of prototypes) and involves higher computational costs due to the diffusion process, its superior generalization capabilities mark a significant advancement in robust anomaly detection. Future work will explore extending this distribution bridging concept to temporal data types like video.

Summary updated

BibTeX
@inproceedings{wang2025distribution,
  author = {Fuyun Wang and Tong Zhang and Yuanzhi Wang and Yide Qiu and Xin Liu and Xu Guo and Zhen Cui},
  title = {{Distribution Prototype Diffusion Learning for Open-set Supervised Anomaly Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01901},
}
Figure