Double Helix Diffusion for Cross-Domain Anomaly Image Generation

Linchun Wu, Qin Zou, Xianbiao Qi, Bo Du, Zhongyuan WangarXiv 2025 · DOI · arXiv

Abstract

Training robust anomaly detection models for industrial manufacturing is often hindered by the scarcity of real-world defect samples. Double Helix Diffusion (DH-Diff) addresses this "cold start" problem by simultaneously synthesizing high-fidelity anomaly images and their corresponding pixel-level annotation masks. By employing a unique architecture that decouples image and mask features while aligning them through semantic score maps, DH-Diff overcomes common issues of structural inconsistency and feature entanglement. Evaluation on benchmarks like MVTec AD shows that DH-Diff sets a new state-of-the-art in both generation quality and downstream detection utility.

Introduction

In industrial settings, normal samples are abundant, but anomalies are rare and expensive to collect. Synthetic data generation is a common solution, yet existing methods often produce "pasted-on" defects that ignore the underlying geometry (structural inconsistency) or suffer from "feature entanglement," where textures leak into binary masks or masks create unnatural artifacts in the images. DH-Diff introduces a novel approach to bridge this gap by generating structurally authentic anomalies and precise masks in a unified framework.

Methodology: The Double Helix Architecture

DH-Diff is a single-backbone diffusion model inspired by the double helix structure. It handles two divergent domains—photorealistic images and binary masks—through three key innovations:

Domain-Decoupled Attention (DDA)

To prevent texture leakage, DDA processes image and mask data through parallel attention pathways. This ensures that the generated masks remain clean and precise while the images retain their photorealistic quality.

The DH-Diffusion model architecture featuring Domain-Decoupled Attention blocks to prevent feature entanglement.

Semantic Score Map Modification (SSM)

The alignment of the two domains is achieved through SSM. The model utilizes cross-attention maps generated between text prompts (e.g., "hazelnut hole") and latent features. By aligning these semantic maps for both the image and the mask, DH-Diff ensures the defect's shape and location in the image perfectly match the annotation mask.

Cyclic Interaction

Features flow through stages of decoupling, connection, and merging across multiple diffusion steps. This allows the model to refine anomalies from coarse structures to fine-grained textures iteratively.

Experimental Evaluation

The model was rigorously tested on four major industrial anomaly benchmarks: MVTec AD, MPDD, MVTec LOCO AD, and VisA.

Key Results

  • Generation Quality: DH-Diff achieved the highest Inception Score (IS) on the MVTec dataset, indicating superior authenticity and diversity compared to previous methods like Anomaly Diffusion and DualAno.
  • Detection Performance: When synthetic data from DH-Diff was used to train a standard U-Net detector, it achieved a 99.2% AUROC on MVTec AD, significantly outperforming detectors trained on other synthetic frameworks.
  • Qualitative Superiority: Visual results demonstrate "structurally authentic" defects. For instance, a squeeze in a capsule appears as a physical deformation of the material rather than a simple overlay, and grid defects follow the underlying geometry.
Overview of the DH-Diff pipeline and qualitative comparison with existing methods across various industrial objects.

Conclusion and Future Work

DH-Diff demonstrates that a single-backbone architecture can effectively generate cross-domain data if attention mechanisms are properly decoupled. While it excels at structural defects, "logical" anomalies—such as those in MVTec LOCO—remain a challenge requiring deeper semantic understanding. Future research will focus on scaling this approach to complex multi-object scenes and optimizing sampling speeds for real-time deployment.

Summary updated

Abstract

Visual anomaly inspection is critical in manufacturing, yet hampered by the scarcity of real anomaly samples for training robust detectors. Synthetic data generation presents a viable strategy for data augmentation; however, current methods remain constrained by two principal limitations: 1) the generation of anomalies that are structurally inconsistent with the normal background, and 2) the presence of undesirable feature entanglement between synthesized images and their corresponding annotation masks, which undermines the perceptual realism of the output. This paper introduces Double Helix Diffusion (DH-Diff), a novel cross-domain generative framework designed to simultaneously synthesize high-fidelity anomaly images and their pixel-level annotation masks, explicitly addressing these challenges. DH-Diff employs a unique architecture inspired by a double helix, cycling through distinct modules for feature separation, connection, and merging. Specifically, a domain-decoupled attention mechanism mitigates feature entanglement by enhancing image and annotation features independently, and meanwhile a semantic score map alignment module ensures structural authenticity by coherently integrating anomaly foregrounds. DH-Diff offers flexible control via text prompts and optional graphical guidance. Extensive experiments demonstrate that DH-Diff significantly outperforms state-of-the-art methods in diversity and authenticity, leading to significant improvements in downstream anomaly detection performance.
BibTeX
@misc{wu2025double,
  author = {Linchun Wu and Qin Zou and Xianbiao Qi and Bo Du and Zhongyuan Wang and Qingquan Li},
  title = {{Double Helix Diffusion for Cross-Domain Anomaly Image Generation}},
  year = {2025},
  eprint = {2509.12787},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.12787},
}
Figure