NeurIPS 2026QuestionsPapersAreasAboutMarkdown

UniDG: Universal Defect Generation via Defect-Context Editing

Yuanting Fan, Jun Liu, Bin-Bin Gao, Xiaochen Chen, Yuhuan Lin, Zhewei Dai, Jiawei Zhan, Chengjie Wang

NeurIPS page · Open on the map

Category: Diffusion & Image Generation › Text-to-Image Generation Evaluation · Type: new method · Keywords: visual defect generation, defect-context editing, universal anomaly detection, paired defect dataset, MM-DiT attention, industrial inspection

Areas: Evaluation & Benchmarks › Visual Multimodal Evaluation › Deepfake Detection; Benchmarks for Vision, Video & Multimodal › Multimodal Capability Benchmarks › Multimodal Evaluation Benchmarks; Computer Vision & 3D › Visual Multimodal Perception › Anomaly Detection

Summary

UniDG introduces a unified model for universal defect generation that edits defect context to synthesize realistic visual defects, and provides the UDG dataset of 300K normal-abnormal-mask-caption quadruplets.

Explained to a 5-year-old

UniDG is a smart computer program that makes fake defects on pictures. It looks at a picture of a normal object and a picture of a defect, then mixes them to create a new picture that looks like the object has a defect. This helps teach computers to spot problems they have never seen before. It works for many kinds of objects and defects without needing to learn each one separately.

Explained to a 5-year-old, longer

Imagine you have a toy that is always perfect, and you want to practice fixing it when it breaks. You need lots of broken examples, but they are hard to get. UniDG creates those broken examples by taking a good picture and a picture of a defect, then blending them together so the new picture looks like the object has a realistic defect. It can do this for many different kinds of objects and defects, like a cracked phone screen, a scratched car panel, or a torn piece of fabric. The program learns from a huge collection of paired normal and defect pictures, so it knows what a defect should look like in many situations. After learning, you can ask it to generate a defect on a new object, and it will make a believable fake defect. This helps researchers test their detection systems on many unseen defects without having to collect real broken items. It also lets small teams create defect data without needing huge amounts of real broken samples.

For a technical reader

UniDG formulates defect synthesis as a context-editing task: it crops a reference defect, pairs it with a target image in a diptych layout, and uses multimodal attention to fuse them. A two-stage training learns transferable defect priors and then refines realism and consistency. The model can generate defects for any object or defect type without per-category fine-tuning, improving both synthesis quality and downstream anomaly detection performance.

Problem

Existing methods for generating visual defects require category-specific few-shot adaptation and cannot generalize across objects, defect types, and domains, limiting their usefulness for anomaly detection where abnormal samples are scarce.

Method

The approach extracts reference defect context via adaptive cropping, arranges reference and target inputs in a structured diptych format, and fuses multimodal conditions using MM-DiT attention. It employs a two-stage training: Diversity-SFT learns transferable defect priors from paired editing data, and Consistency-RFT refines reference adherence, local realism, and defect-category consistency.

Contributions

The paper introduces a large-scale paired defect editing dataset (UDG) and a unified model that can generate defects across categories and domains without per-category fine-tuning, achieving state-of-the-art synthesis and downstream detection performance.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction