Table of Contents
Fetching ...

Quantifying Statistical Significance in Diffusion-Based Anomaly Localization via Selective Inference

Teruyuki Katsuoka, Tomohiro Shiraishi, Daiki Miwa, Vo Nguyen Le Duy, Ichiro Takeuchi

TL;DR

The authors address the reliability of anomaly localization produced by diffusion models by introducing a selective-inference framework that yields valid $p$-values conditioned on the diffusion-based selection. They formulate a two-sample test comparing mean pixel values in detected anomalous regions against a reference, and derive a selective $p$-value that follows a truncated Gaussian under the null, ensuring proper type I error control. The resulting Diffusion-based Anomaly Localization (DAL) Test is implemented via a principled, parameterized approach that uses piecewise-linear mappings and parametric programming to identify truncation intervals. Empirical results on synthetic data and real-world medical and industrial datasets demonstrate that the method controls false positives while achieving competitive power, suggesting practical utility for high-stakes decision-making. The work provides a general framework that can be extended to other diffusion-model architectures and semi-supervised anomaly-detection tasks.

Abstract

Anomaly localization in images (identifying regions that deviate from expected patterns) is vital in applications such as medical diagnosis and industrial inspection. A recent trend is the use of image generation models in anomaly localization, where these models generate normal-looking counterparts of anomalous images, thereby allowing flexible and adaptive anomaly localization. However, these methods inherit the uncertainty and bias implicitly embedded in the employed generative model, raising concerns about the reliability. To address this, we propose a statistical framework based on selective inference to quantify the significance of detected anomalous regions. Our method provides $p$-values to assess the false positive detection rates, providing a principled measure of reliability. As a proof of concept, we consider anomaly localization using a diffusion model and its applications to medical diagnoses and industrial inspections. The results indicate that the proposed method effectively controls the risk of false positive detection, supporting its use in high-stakes decision-making tasks.

Quantifying Statistical Significance in Diffusion-Based Anomaly Localization via Selective Inference

TL;DR

The authors address the reliability of anomaly localization produced by diffusion models by introducing a selective-inference framework that yields valid -values conditioned on the diffusion-based selection. They formulate a two-sample test comparing mean pixel values in detected anomalous regions against a reference, and derive a selective -value that follows a truncated Gaussian under the null, ensuring proper type I error control. The resulting Diffusion-based Anomaly Localization (DAL) Test is implemented via a principled, parameterized approach that uses piecewise-linear mappings and parametric programming to identify truncation intervals. Empirical results on synthetic data and real-world medical and industrial datasets demonstrate that the method controls false positives while achieving competitive power, suggesting practical utility for high-stakes decision-making. The work provides a general framework that can be extended to other diffusion-model architectures and semi-supervised anomaly-detection tasks.

Abstract

Anomaly localization in images (identifying regions that deviate from expected patterns) is vital in applications such as medical diagnosis and industrial inspection. A recent trend is the use of image generation models in anomaly localization, where these models generate normal-looking counterparts of anomalous images, thereby allowing flexible and adaptive anomaly localization. However, these methods inherit the uncertainty and bias implicitly embedded in the employed generative model, raising concerns about the reliability. To address this, we propose a statistical framework based on selective inference to quantify the significance of detected anomalous regions. Our method provides -values to assess the false positive detection rates, providing a principled measure of reliability. As a proof of concept, we consider anomaly localization using a diffusion model and its applications to medical diagnoses and industrial inspections. The results indicate that the proposed method effectively controls the risk of false positive detection, supporting its use in high-stakes decision-making tasks.
Paper Structure (33 sections, 3 theorems, 39 equations, 23 figures, 1 table, 2 algorithms)

This paper contains 33 sections, 3 theorems, 39 equations, 23 figures, 1 table, 2 algorithms.

Key Result

Theorem 1

The selective $p$-value in eq:selective_p is valid for controlling the false positive detection rate, i.e, Then, the selective $p$-value satisfies the following condition:

Figures (23)

  • Figure 1: Schematic illustration of anomaly localization on a brain MRI image dataset using a diffusion model and the proposed DAL-Test. When a test image---potentially containing an anomalous region---is fed into a trained diffusion model, its normal-looking version is generated through the forward and reverse processes. By comparing the input image with the generated normal-looking version, the anomalous region can be identified. We propose the Diffusion-based Anomaly Localization (DAL) Test, which leverages the selective inference framework to compute valid $p$-values that quantify the statistical significance of anomalous regions detected by a diffusion model, based on a test statistic defined over the input and reference images.
  • Figure 2: Schematic illustration of the selective inference procedure for diffusion models. It shows how the image $\bm{X}(z)$ changes with $z$. The truncation intervals that yield the same anomalous region $\mathcal{M}_{\bm{X}(z)}$ as the observed anomalous region $\mathcal{M}_{\bm{x}}$ define the conditional sampling distribution. The $p_{\mathrm{selective}}$ denotes the proportion of probability mass within the truncation intervals.
  • Figure 3: Independence
  • Figure 4: Correlation
  • Figure 5: Type I error rate comparison
  • ...and 18 more figures

Theorems & Definitions (3)

  • Theorem 1
  • Theorem 2
  • Theorem 3