STAGE: Segmentation-oriented Industrial Anomaly Synthesis via Graded Diffusion with Explicit Mask Alignment

Xichen Xu, Yanshu Wang, Jinbao Wang, Qunyi Zhang, Xiaoning Lei, Guoyang Xie, Guannan Jiang, Zhichao LuarXiv 2025 · DOI

Introduction

In industrial manufacturing, training robust anomaly segmentation models is often hindered by a "chicken and egg" problem: high-performance models require vast amounts of defect data, yet in optimized production environments, defects are exceedingly rare. To address this, researchers employ Segmentation-oriented Industrial Anomaly Synthesis (SIAS) to generate synthetic defects.

However, existing SIAS methods face three critical challenges: poor texture fidelity (often appearing as unrealistic "blurry blobs"), spatial misalignment where defects do not match the background context, and the "tiny anomaly" problem, where small defects are smoothed over during the generative process. This paper introduces STAGE (SegmenTation-oriented Anomaly synthesis via Graded diffusion with Explicit mask alignment), a framework designed to produce high-fidelity, pixel-perfect synthetic anomalies that significantly enhance downstream segmentation performance.

Methodology

STAGE leverages Latent Diffusion Models (LDMs) but introduces several novel components to ensure synthetic data is optimized for training segmentation networks.

Overview of the STAGE framework, highlighting the Graded Diffusion Inference and the Explicit Mask Alignment (EMA) module.

Core Components

  • Anomaly Inference (AIF): By providing the "clean" background as a fixed prior, AIF constrains the model to focus its generative capacity strictly on the anomalous foreground within the mask, preventing the model from unnecessarily reconstructing the entire image.
  • Graded Diffusion (GD): This dual-branch strategy addresses the scale imbalance between large backgrounds and tiny defects. During training, one branch learns the global context (anomaly-aware), while a second focuses exclusively on the masked defect (anomaly-only). During inference, the model alternates between these branches to ensure even low-contrast anomalies are preserved.
  • Explicit Mask Alignment (EMA): Standard diffusion models can struggle with precise edge alignment. EMA utilizes a time-dependent "soft mask" that begins with a wide receptive field to capture context and gradually sharpens to the exact ground-truth mask, ensuring the defect's edges are perfectly aligned with the background.
  • Mask Guidance Adapter (MGA): A lightweight module that concatenates the anomaly mask with internal network features, providing spatial guidance without requiring a full retraining of the backbone.

Experiments and Results

The authors evaluated STAGE on the MVTec AD and BTAD benchmarks, using the synthetic data to train standard segmentation models such as SegFormer and BiSeNet V2.

Quantitative Performance

On the MVTec AD dataset, STAGE achieved a mean Intersection over Union (mIoU) improvement of 7.74% over the previous state-of-the-art (DFMGAN) when using a SegFormer backbone. Notably, for categories with very small defects like "capsule," STAGE boosted mIoU by up to 13.04%, demonstrating its effectiveness in handling the tiny anomaly problem.

Qualitative Analysis

Visual results indicate that STAGE produces defects that appear physically integrated into the object's structure—such as realistic cracks in wood or scratches on metal—rather than looking like artificial overlays.

Qualitative comparison of synthetic anomalies generated by STAGE versus existing state-of-the-art methods across various MVTec AD categories.

Conclusion

STAGE represents a significant advancement in industrial anomaly synthesis by combining background-constrained inference with a graded diffusion strategy. While the model shows immense promise, future work will address limitations in complex geometric categories (like "screw" or "grid") by incorporating region-aware synthesis to ensure defects only appear on valid object surfaces. Overall, STAGE provides a powerful tool for generating the high-quality data necessary for modern industrial AI applications.

Summary updated

BibTeX
@misc{xu2025stage,
  author = {Xichen Xu and Yanshu Wang and Jinbao Wang and Qunyi Zhang and Xiaoning Lei and Guoyang Xie and Guannan Jiang and Zhichao Lu},
  title = {{STAGE: Segmentation-oriented Industrial Anomaly Synthesis via Graded Diffusion with Explicit Mask Alignment}},
  year = {2025},
  eprint = {2509.06693},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.06693},
}
Figure