GroundingAnomaly: Spatially-Grounded Diffusion for Few-Shot Anomaly Synthesis

Yishen Liu, Hongcang Chen, Pengcheng Zhao, Yunfan Bao, Yuxi Tian +6 more
4/9/2026
cs.CV

No official code found. Best implementation: Eeelyyy/GroundingAnomaly (0 stars, MIT, last commit 2026-06-26).

Abstract

The performance of visual anomaly inspection in industrial quality control is often constrained by the scarcity of real anomalous samples. Consequently, anomaly synthesis techniques have been developed to enlarge training sets and enhance downstream inspection. However, existing methods either suffer from poor integration caused by inpainting or fail to provide accurate masks. To address these limitations, we propose GroundingAnomaly, a novel few-shot anomaly image generation framework. Our framework introduces a Spatial Conditioning Module that leverages per-pixel semantic maps to enable precise spatial control over the synthesized anomalies. Furthermore, a Gated Self-Attention Module is designed to inject conditioning tokens into a frozen U-Net via gated attention layers. This carefully preserves pretrained priors while ensuring stable few-shot adaptation. Extensive evaluations on the MVTec AD and VisA datasets demonstrate that GroundingAnomaly generates high-quality anomalies and achieves state-of-the-art performance across multiple downstream tasks, including anomaly detection, segmentation, and instance-level detection.

View on arXivView PDF

Code Implementations(1)

MIT

Official implementation of paper GroundingAnomaly: Spatially-Grounded Diffusion for Few-Shot Anomaly Synthesis

00Jun 22, 20263 months agoMIT

Similar Papers

Cite this paper

@article{liu2026groundinganomaly,
  title  = {GroundingAnomaly: Spatially-Grounded Diffusion for Few-Shot Anomaly Synthesis},
  author = {Yishen Liu and Hongcang Chen and Pengcheng Zhao and Yunfan Bao and Yuxi Tian and Jieming Zhang and Hao Chen and Zheng Zhi and Yongchun Liu and Ying Li and Dongpu Cao},
  year   = {2026},
  eprint = {2604.08301},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.08301v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.08301.svg)](https://codeofpaper.com/paper/2604.08301)

Discussion