FAST: Foreground‑aware Diffusion with Accelerated Sampling Trajectory for Segmentation‑oriented Anomaly Synthesis

Xichen Xu, Yanshu Wang, Jinbao Wang, XiaoNing Lei, Guoyang Xie, Guannan Jiang, Zhichao Lu

Introduction

In modern manufacturing, the ability to identify tiny, pixel-level defects—anomalies—is critical for quality assurance. However, training deep learning models for this task is notoriously difficult because real-world defects are rare, highly diverse, and expensive to label manually. To bridge this gap, researchers have turned to Segmentation-oriented Industrial Anomaly Synthesis (SIAS), a process that generates synthetic defects to augment training datasets.

While Generative Adversarial Networks (GANs) and Diffusion Models have shown promise in this area, they typically face a "trilemma" of competing priorities: controllability, efficiency, and spatial awareness. Standard diffusion models, while high in quality, are often too slow for large-scale data generation and struggle to maintain the sharp boundaries required for precise segmentation. This paper introduces FAST (Foreground-aware Diffusion with Accelerated Sampling Trajectory), a framework designed to overcome these hurdles by achieving a 100x speedup in synthesis while significantly improving defect localization accuracy.

The Challenges of Anomaly Synthesis

Current synthesis methods often struggle with three core issues:

  1. Controllability: It is difficult to guide a generative model to produce a defect that exactly matches a specific shape or semantic category.
  2. Efficiency: Diffusion models typically require 1,000 or more sampling steps to generate a single high-quality image, making the creation of large-scale synthetic datasets computationally prohibitive.
  3. Spatial Awareness: Most models treat the entire image uniformly. In industrial contexts, the background is usually consistent, while the anomaly is a localized, structure-specific change. Treating them the same often "washes out" the defect signal, blurring it into the background during the generation process.

The FAST Framework

The FAST framework addresses these challenges through two primary innovations: Anomaly-Informed Accelerated Sampling (AIAS) and the Foreground-Aware Reconstruction Module (FARM).

Anomaly-Informed Accelerated Sampling (AIAS)

AIAS is a training-free algorithm designed to speed up the "reverse" diffusion process—the stage where noise is transformed into a coherent image. Rather than following the standard 1,000-step trajectory, AIAS mathematically aggregates multiple steps into a series of "coarse-to-fine" analytical updates. This allows the model to generate high-utility anomalies in as few as 10 to 50 steps, representing a massive reduction in temporal overhead without requiring the underlying Latent Diffusion Model (LDM) to be retrained.

Foreground-Aware Reconstruction Module (FARM)

To solve the problem of spatial awareness, FAST introduces FARM. Unlike standard models that denoise the entire image simultaneously, FARM utilizes an encoder-decoder structure to focus specifically on the "foreground"—the precise area where the defect is intended to appear. By reconstructing only the anomaly-related content from noisy data at each step, FARM ensures the defect remains sharp and semantically aligned with the target mask. This prevents the background's statistical properties from overwhelming the unique features of the defect, preserving what the authors call "anomaly salience."

Experimental Results

The researchers evaluated FAST on two gold-standard industrial benchmarks: MVTec-AD (15 categories of objects and textures) and BTAD (BeanTech Anomaly Detection). They synthesized 500 samples per anomaly type to expand training data for downstream segmentation networks such as Segformer and BiSeNet V2.

Performance and Speed

  • Superior Accuracy: On the MVTec-AD benchmark, FAST achieved an average mean Intersection over Union (mIoU) of 76.72%. This outperformed the previous state-of-the-art method, DRAEM, by more than 9 percentage points.
  • Efficiency Gains: FAST achieved a 100x speedup compared to standard DDPM sampling. This reduces the time required for data synthesis from minutes to mere seconds per image, making it feasible for real-time or large-scale industrial applications.
  • Architecture Agnostic: The method showed consistent improvements across various segmentation backbones (Segformer, BiSeNet V2, STDC), proving that the synthetic data produced is highly versatile and beneficial for different AI architectures.

Key Insights: The "Sweet Spot" of Sampling

A surprising finding from the study is that more sampling steps do not necessarily lead to better segmentation performance. While 1,000 steps might produce a more visually pleasing image for a human observer, the researchers found that 50 steps with AIAS actually yielded better results for training segmentation models. Excessive denoising can over-smooth fine-grained textures, which are the very features a model needs to distinguish a defect from a normal surface. By stopping earlier, the model preserves the high-frequency details essential for pixel-level localization.

Limitations and Future Work

Despite its success, the FAST framework has limitations. Pushing the sampling speed to extremes (e.g., 1 or 2 steps) introduces visual artifacts that degrade the quality of the training data. Additionally, the quality of the synthesis remains dependent on the initial binary masks provided to the system.

Future research directions include exploring more complex, multi-object industrial scenes and developing automated methods for generating initial defect masks to create a fully end-to-end, "hands-off" synthesis pipeline.

Conclusion

FAST represents a significant step forward in industrial anomaly detection. By decoupling foreground and background processing and introducing a mathematically optimized sampling trajectory, it provides a high-speed, high-accuracy solution for generating the synthetic data necessary to train the next generation of manufacturing AI.

Summary updated

BibTeX
@inproceedings{xu2025fast,
  author = {Xichen Xu and Yanshu Wang and Jinbao Wang and XiaoNing Lei and Guoyang Xie and GUANNAN JIANG and Zhichao Lu},
  title = {{FAST: Foreground‑aware Diffusion with Accelerated Sampling Trajectory for Segmentation‑oriented Anomaly Synthesis}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=qqEfm8tlCM},
}
Figure