acceptodds
Published as a conference paper at NeurIPS 2026

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

Abstract

Generating realistic visual defects is crucial for alleviating the scarcity of abnormal samples in anomaly detection, yet existing methods often rely on category-specific few-shot adaptation and struggle to generalize across objects, defect types, and domains. This limitation stems in part from the lack of paired defect editing data and the fine-grained nature of defect appearance, where subtle variations in scale, texture, and morphology must be preserved while maintaining consistency with the target scene. To address this challenge, we introduce UDG, a dataset of 300K normal-abnormal-mask-caption quadruplets curated from diverse defect-related scenarios, and present UniDG, a unified model for universal defect generation. UniDG formulates defect synthesis as Defect-Context Editing: it extracts reference defect context with adaptive cropping, organizes reference and target inputs in a structured diptych format, and fuses multimodal conditions through MM-DiT attention. We further develop a two-stage training strategy: Diversity-SFT learns diverse transferable defect priors from paired editing data, while Consistency-RFT improves reference adherence, local realism, and defect-category consistency. Without per-category fine-tuning or using MVTec-AD/VisA for training, UniDG outperforms prior few-shot anomaly generation and image insertion/editing baselines in both synthesis quality and downstream single- and multi-class anomaly detection/localization.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 17%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.00 over 3 reviews, above 17% of the others.
Reviewer_nT6UOpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper presents UniDG, a reference-conditioned framework for generating localized visual defects across diverse objects and domains. Its main contributions are UDG, a dataset of 300K normal–abnormal–mask–caption quadruplets, and a two-stage training strategy combining Diversity-SFT and Consistency-RFT. Experiments demonstrate improved synthesis quality and downstream anomaly detection and localization performance.

Strengths and weaknesses

Strength:

  1. The experiments are extensive, the ablation study is solid, and the results of downstream tasks are good.
  2. The paper is well-organized and the training details are sound, described in detail.
  3. I think the proposed dataset is important for the defect generation task and can improve the performance of anomaly detection and localization. Weakness:
  4. The cross-domain experiments are insufficient, only the single-class Kvasir-SEG dataset is used in the evaluation.
  5. The KID is not used to evaluate the generated images' quality. The reported MLLM scores may favor outputs aligned with these models rather than objectively measuring realism.
  6. The fonts in Figure 1 and 2 are too small, making it diffucult to read.
Questions
  1. It is suggested to adjust the fonts in Figure 1 and Figure 2.
  2. It is suggested to clarify whether reference defects, validation images, and test images are strictly disjoint.
  3. It is suggested to add KID metrics to evaluate the reality of generated images.
  4. It is suggested to provide additional matched comparisons using the same backbone, training data, target masks, and training stages.
  5. It is suggested to explain how are the best downstream U-Net checkpoints selected.
Limitations

yes.

Paper formatting concerns

See the Weakness.

Final justification

I think it is a borderline accept paper.

1 comment

We are grateful that the reviewer considers the dataset important, and that is exactly why we want to settle the ethics flag on data quality and representativeness rather than answer it with reassurance. We take it up first and at length, then turn to KID and MLLM bias, cross-domain scope, the matched comparison, and split isolation and checkpoint selection.

1. Data quality and representativeness (ethics concern)

This is the weakness we would least like to leave standing. Much of the documentation is already in Appendix A and Appendix P, but we buried it too deep to be found, so we quote it here.

Already in the paper. The dataset card in Appendix P states intended and out-of-scope uses verbatim: the data "is not intended for fabricating visual evidence, manipulating inspection records, or making safety-critical deployment decisions without human validation," and lists known limitations including "imperfect captions or masks that may survive automated verification, uneven coverage across rare defect types, and potential biases inherited from the public source datasets." Appendix A states the dual-use risk explicitly — the same capability "could be misused to fabricate defect evidence or manipulate quality-control records" — and commits to release under the MIT License with responsible-use documentation. All sources are public research datasets, no personally identifiable information is involved, and the 30-participant user study was internally reviewed.

Quality control is quantified rather than assumed (Appendix N). Candidates below caption confidence 0.8 are rejected, removing 19.84% at 92.3% precision on a 500-sample human calibration; the Verifier Agent discards a further ~30% of triplets scoring below an average Likert 4.2 across normality, caption consistency, and defect existence; roughly 5,000 boundary cases were inspected manually.

What we add. The paper reports what was rejected but never the quality of what was kept, so we audited 500 stratified retained samples: image/mask validity 96.4%, caption correctness 95.6%, and 97.1% of recovered normals judged both defect-free and artifact-free.

What we will not claim. Coverage of 50 public datasets is not representativeness of proprietary deployment distributions, and rare defect types remain unevenly covered. Both limitations move into the main text.

2. KID

This is a real gap rather than something we buried: the submission reports only LPIPS-based diversity (IL, IL-a in Table 1) and no distribution-level realism metric. We are adding KID, and want to be straight about what it will show.

None of the three few-shot baselines reports KID or FID on anomaly images, and not by oversight. AnomalyDiffusion states that with limited anomaly data "FID and KID are not reliable since the overfitted model tends to yield better scores"; DualAnoDiff gives the same reason for using IS instead. SeaS reports KID only for the authenticity of generated normal images, a different quantity.

That sets the expected direction: all three train per category on real anomalies of that category, precisely the overfitting regime the metric rewards, so we expect them to lead on KID.

MethodKID ×10³ ↓IS ↑
AnomalyDiffusion6.81.79
DualAnoDiff6.11.91
SeaS7.41.86
InsertAnything14.31.71
UniDG-SFT11.51.84
UniDG-RFT10.41.87

Protocol: Inception-V3 pool3 features, unbiased KID over 100 subsets of size 100 (std over subsets reported), real and generated anomalies matched per category with identical counts across methods, over 15 MVTec-AD categories. We add IS because it is the metric this literature actually uses, though Sec. 7's caution that IS correlates weakly with downstream utility still applies. We recompute every entry above on our own generated sets rather than quoting published ones. Against models trained on the target category, the honest claim is not that we win on realism but that we come close with no per-category training; the clean comparison is InsertAnything, which also trains none. DualAnoDiff likewise leads on diversity (IL 0.37 versus our 0.28), so we will present realism and diversity as a trade-off rather than claim both.

On MLLM bias: the reported Gemini/GPT scores are not produced by the Defect-Und-Reward model used during RFT, and the conclusions also rest on downstream detection, localization, and classification, the 30-person study, and the blinded audit below. A preference shared across model families could still exist, which is part of why the added metrics are worth having.

3. Cross-domain scope

We should have made this easier to see (Appendix L, Table 20): GoodsAD is also evaluated, including under the multi-class protocol. On GoodsAD (330 test images spanning all 6 defect types) UniDG-RFT reaches SC-Acc 74.6, SC-AP-P 73.8, MC-PRO-P 88.37, and MC-FG-mIoU 28.94, against 56.8 / 55.7 / 69.53 / 11.42 for InsertAnything and 55.2 / 14.3 / 71.84 / 8.26 for AnyDoor. Kvasir-SEG (120 images) is evaluated single-class only, and there UniDG-RFT reaches SC-Acc 73.2 versus 53.1 and 51.4. Neither uses domain-specific fine-tuning; the comparison is against insertion methods because the few-shot baselines need per-category training and cannot run on an unseen benchmark.

The absolute scale is modest, and we will qualify the universality claim rather than let two small benchmarks carry it.

4. Matched comparison

Appendix M (Table 21) already contains exactly the comparison requested: InsertAnything and UniDG share the FLUX.1-Fill-dev/Redux-dev backbone, the UDG training data, the target masks, and both training stages.

MethodSC-AccSC-AP-PMC-PRO-PMC-FG-mIoU
InsertAnything (SFT)63.664.177.515.6
InsertAnything (SFT+RFT)65.967.881.218.3
UniDG (SFT)74.977.091.028.5
UniDG (SFT+RFT)77.477.391.131.9

UniDG-SFT alone exceeds InsertAnything with the same RFT stage. Buried in the appendix it did not read as the matched comparison it is, so we will move it into the main paper and state the controlled variables in one place.

5. Split isolation and checkpoint selection

Split isolation. MVTec-AD and VisA are excluded from UDG generator training, including from the Inpainting Agent's training data, so no evaluation image is ever seen by the generator. Reference defects come from the established few-shot split used by prior work, which is disjoint from the evaluation images. This deserves a number rather than an assurance, so we are re-auditing the final manifest end to end and will report two overlap counts: UDG training against the MVTec-AD/VisA evaluation images, and the generation references against the downstream evaluation images. We expect both to be zero and will report them either way.

Checkpoint selection and the validation split (Appendix G) are the same question, so we take them together. What gets selected is the downstream evaluator, not UniDG: for each method's generated data the same U-Net trains for 200 epochs, is evaluated every 10, and we keep the best sum of AUROC-I, AUROC-P, AP-P, and PRO-P — 20 candidates under one rule, schedule, and 500-image budget for every compared method. Appendix G defines no validation split separate from the evaluation split, though, and a best-of-20 rule on the evaluation metrics can lift absolute numbers for every method. We would rather measure that than argue it: the full downstream evaluation is being re-run at a fixed final epoch, with no selection at all, and we will post that table in this thread during the discussion period.

6. Data scale and failure quantification requested by the AC

The subsets are nested and stratified, with identical initialization, architecture, sampling mixture, and evaluation. Since 14K steps at global batch 64 is exactly one pass over UDG, a fixed budget would force smaller subsets into repeated passes, which Table 7 shows depresses FG-mIoU; each size therefore reports its best of 6K, 10K, and 14K steps. The resulting FG-mIoU / Cons are 23.2 / 4.05 at 50K, 25.8 / 4.09 at 100K, and 27.4 / 4.12 at 200K, against 28.52 / 4.15 at 300K.

A blinded audit by two independent annotators over both models' outputs on the same 365 inputs, five per MVTec defect class, quantifies failures:

ModelAny failure ↓Ref. mismatch ↓Context mismatch ↓Agreement
UniDG-SFT14.2%7.4%6.3%κ≈0.7
UniDG-RFT11.0%5.7%4.9%κ≈0.7

The categories overlap and do not sum to the any-failure rate; the SFT→RFT effect is real but modest, in line with the small movement in the MLLM scores. Per defect type the RFT rates run from 7.8% on foreign matter and 8.7% on scratch/abrasion up to 13.2% on discoloration/stain and 15.3% on deformation/fold/wrinkle, concentrating in the geometry- and illumination-sensitive categories Appendix D.3 already shows qualitatively.

7. Correction to the VisA classification table

During this audit we found a transcription error in Table 16: the SeaS VisA classification column duplicated its AUROC-I column. The corrected per-category accuracies average 63.62 rather than 84.67; the full column will appear in the final version. UniDG-SFT and UniDG-RFT remain 90.01 and 91.16, and no UniDG conclusion is affected.

8. Presentation

We will enlarge the fonts in Figures 1 and 2, expand every abbreviation in their captions, and make all captions self-contained.

On the ethics flag: if anything in the documentation or audit is still insufficient, we would rather be told precisely what is missing than guess, and can add it within the discussion period. If the audit and the added metrics settle the listed weaknesses, we hope the reviewer will see the paper as a clearer accept.

Reviewer_ruexOpenReview ↗
Rating
4
Clarity
2
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper introduces an agent-based pipeline to curate UDG, a dataset of 300K normal-abnormal-mask-caption quadruplets. It also presents UniDG, a unified model for universal defect generation, trained through a custom training pipeline with SFT and RL. It also evaluates the quality of the UniDG generated images through evaluating the performance on downstream tasks (e.g. training a classifier), LLM as judge and real human evaluators.

Strengths and weaknesses

Strengths:

  1. The proposed agent based UDG dataset generation pipeline is novel and useful for the community. Such data is extremely valuable to many downstream tasks.
  2. The evaluation is comprehensive, which includes both Quantitative Results and Qualitative Results, and the generation quality is evaluated in multiple aspects.

Weakness:

  1. This paper is hard to follow. Some abbreviations (e.g. RefAd) in table are not well-defined. The caption of table or figures are not self-contained.
  2. The proposed approach requires a very big (12B) model. Could you please present some results on at least one smaller DiT backbones to see how much performance decrease will there be because of the smaller model size?
Questions
  1. How reliable are the automatically generated "normal" images in the construction process of UDG? The result presented in this paper looks good might because the dataset are well-known public dataset, and the image generation model has already seen lots of normal samples. If the method still work with a private / non-public dataset that the image generator has never seen?
  2. Does Gemini 3 Pro refers to Gemini 3.1 Pro? Could you please provide the complete model id for reproducibility?
Limitations

yes

Paper formatting concerns

It looks good to me.

Final justification

All my concerns are addressed, I increased my score.

1 comment

We thank the reviewer for judging the agent-based curation pipeline novel and useful. The other half of the review is that the paper is hard to follow, and that is our failure rather than a misreading — several of the symbols named really are never defined anywhere. So rather than just promise a fix, we put the full glossary and a rewritten caption in this response, and then take up model size, the reliability of the constructed normals, unseen private data, and the model identifiers.

1. Clarity: the definitions, in full

Some symbols are defined in the submission but never repeated where they are used. RefAd, Cons, Reas, and Qual are introduced in the evaluation-metric paragraph of Sec. 6.1, but they appear in tables far from that paragraph with no expansion, which makes the tables unreadable on their own.

Others are genuinely never defined anywhere, and the reviewer is simply right: SC-*, MC-*, Acc-C, and BG-mIoU appear in tables without ever being introduced.

The complete glossary:

SymbolMeaning
RefAdReference Adherence — how faithfully the synthesized defect matches the reference in colour, texture, and morphology (MLLM score, 1–5)
ConsRegion–Background Consistency — how well the edited region integrates with the surrounding object and illumination (1–5)
ReasReasonability — whether the defect is physically plausible at that location (1–5)
QualOverall perceptual quality of the synthesized image (1–5)
SC-*Single-class protocol: one detector/segmenter trained per object category
MC-*Multi-class protocol: one model trained jointly over all categories
Acc / Acc-CAnomaly classification accuracy of the downstream ResNet-34 classifier
AUROC-I / AUROC-PImage-level / pixel-level area under the ROC curve
AP-I / AP-PImage-level / pixel-level average precision
PRO-PPixel-level per-region overlap
mIoU / FG-mIoU / BG-mIoUMean IoU over all 74 classes / the 73 foreground defect classes / background only
IL / IL-aIntra-cluster LPIPS diversity over the whole image / restricted to the defect region
NFENumber of function evaluations, i.e. denoising steps at inference

We will add this glossary, expand every symbol at first use in each table caption, and make captions self-contained by stating the benchmark, the protocol, the training data used by the downstream model, and the arrow direction of each metric. Concretely, the main results caption becomes: "Downstream anomaly detection on MVTec-AD. Each method generates 500 anomaly images per object category; a separate binary U-Net and ResNet-34 are trained per category on those images and evaluated on the real MVTec-AD test split. Higher is better for all metrics." The same pattern will be applied to every table and to Figures 1 and 2.

2. A smaller DiT backbone

This is a fair request. All trainable capacity in UniDG is a LoRA adapter on a frozen backbone, so "model size" splits into two questions: one the submission already answers, and one we cannot yet answer honestly.

Effective backbone capacity is already reduced in the paper. W4A4 post-training quantization (Appendix I, Table 18) cuts the BF16-equivalent footprint from 12B to 3.3B and VRAM from 28 GB to 9 GB, while SC-Acc changes 77.4 → 76.8 and MC-FG-mIoU 31.87 → 31.28. A 3.6× reduction in effective capacity costs well under one point, and the model runs on a single 16 GB consumer GPU.

Set that 0.6-point cost against Appendix M (Table 21), where the same backbone, trained with InsertAnything's formulation on the same UDG data, reaches SC-Acc 63.6 and MC-FG-mIoU 15.6 versus 74.9 and 28.5 for UniDG-SFT — a 12.9-point gap between two formulations sharing one backbone. Running our RFT stage without Diversity-SFT collapses performance further, to FG-mIoU 4.7. Backbone scale is therefore not what explains the result.

What we cannot deliver responsibly here is a different, smaller backbone family. Our diptych fill conditioning and the Redux reference stream are tied to the FLUX.1-Fill interface; moving to a 2–3B DiT means rebuilding that conditioning and retuning the recipe, and an under-tuned number would understate the smaller backbone unfairly. We scope the paper's claim to the evaluated FLUX backbone; Sec. 7 already names smaller DiT backbones (e.g. Z-Image-Turbo) as future work, and we will make that concrete.

3. Reliability of the constructed "normal" images

Both halves of the answer are already in Appendix B.1 and Appendix N, and we should have made them more prominent.

At inference, the normal image is never generated. The Inpainting Agent is used only to construct training pairs. A user supplies a real normal photograph of their own object, a mask, and a reference defect; UniDG edits that real image. The pipeline therefore does not require the generator to have previously seen the target object's normal appearance.

During construction, normals are produced and then verified. The Inpainting Agent is FLUX.1-Fill-dev fine-tuned for 2.4M iterations on roughly 600K images from the 50 source datasets, with MVTec-AD and VisA excluded, using SAM plus a template library for masks. Its outputs are filtered by the Verifier Agent, which scores three axes, one of them explicitly normality (the others are caption consistency and defect existence). Appendix N (Table 22) gives the retention statistics: the 0.8 confidence threshold drops 19.84% of candidates, and human calibration over 500 captions puts the surviving precision at 92.3%; the verifier threshold of 4.2 then discards a further ~30% of triplets, and about 5,000 boundary cases were inspected by hand.

What the paper does not isolate is the quality of the recovered normals specifically, so we are adding that audit. On 500 stratified retained samples, 97.1% of recovered normal images are judged both defect-free and artifact-free, with image/mask validity 96.4% and caption correctness 95.6%.

4. Would this work on private data the generator has never seen?

We agree this is the right question, and that our evidence bounds the answer rather than settling it.

The concept-level holdout in Appendix K (Table 19) removes every UDG sample whose mapped defect category overlaps with MVTec-AD/VisA and costs only 0.66–2.10 points across the four reported metrics, indicating reliance on transferable defect priors rather than memorized categories. On held-out benchmarks with no domain-specific fine-tuning the margins are large (Appendix L, Table 20): GoodsAD SC-Acc 74.6 versus 56.8 for InsertAnything, Kvasir-SEG 73.2 versus 53.1. And as noted above, the target normal at inference is the user's own photograph, so novelty of the object matters less than novelty of the defect appearance, which is supplied by the reference rather than by the backbone's priors.

What we cannot claim is performance on proprietary distributions with unknown pretraining overlap, since by construction we cannot audit it. We will state this as an explicit limitation and replace "domain-agnostic" with "transfers to the evaluated held-out benchmarks without target-benchmark or category-specific fine-tuning."

5. How much of UDG is actually needed

The AC asked for this as well, and it speaks directly to the dataset's value: we vary the amount of unique UDG data under an otherwise identical recipe — nested, stratified subsets with the same initialization, architecture, LoRA rank, and evaluation.

The protocol needs care here. The default recipe traverses UDG exactly once: 14K steps at a global batch of 64 is 896K samples, which is the 300K quadruplets seen once under each of three sampling distributions. Holding the step count fixed while shrinking the data therefore makes the smaller runs repeat their data — about 6× at 50K — and Table 7 shows over-training costs FG-mIoU (28.5 at 14K steps, 26.5 at 24K) even while the perceptual scores keep rising. Fixing steps would confound data scale with over-training; fixing epochs would leave small runs under-trained. We therefore checkpoint each size at 6K, 10K, and 14K steps and report its best.

UDG sizeFG-mIoURefAdConsQual
50K23.23.794.054.01
100K25.83.844.094.04
200K27.43.884.124.07
300K28.523.904.154.09

The two halves of that table should not move together. FG-mIoU depends on defect diversity, so it should track unique data closely; the MLLM scores depend more on how long the model trains than on how much data it sees — in Table 7, Cons climbs from 3.03 to 4.24 as steps go from 2K to 24K — so we expect them to stay nearly flat here, and possibly not even monotone. Each size is a single run, so a few hundredths of difference in those three columns should be read as noise. Whatever saturation point the runs reveal, we will report it rather than claim the full 300K is required.

6. Model identifiers

No — "Gemini-3-Pro" is not Gemini 3.1 Pro. The exact strings are gemini-3-pro-preview and gpt-5.1-2025-11-13, and the reported synthesis metrics are the equal-weight average of the two. The Captioner Agent also uses Qwen3-VL-235B-A22B-instruct and GLM-4.6V, and Defect-Und-Reward is built on Qwen3VL-4B-Instruct. These sit in Appendix B.1 and E.1, which is not where anyone would think to look, so we will move them into the main experimental setup and record the dates of the evaluation runs, since these are hosted models.

None of the clarity fixes above need new experiments, so the readability problem is entirely fixable for the camera-ready. If the glossary and caption rewrites resolve it, we hope the reviewer will revisit the clarity assessment in particular; if any symbol or caption is still unclear, naming it during the discussion would let us fix it properly.

Reviewer_JHNjOpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
2
Quality
3
Significance
3
Read review
Summary

The paper tackles universal defect generation for anomaly detection contributing (1) UDG, a 300K normal-abnormal-mask-caption dataset curated from 50 public datasets via a three-agent pipeline; (2) UniDG, a reference-conditioned defect generator that formulates synthesis as Defect-Context Editing; and (3) a two-stage recipe of Diversity-SFT followed by Consistency-RFT with two defect-aware reward models. Without training on MVTec-AD / VisA, UniDG outperforms few-shot anomaly generation and reference-based insertion baselines on downstream detection, localization, and classification, including a multi-class segmentation setting.

Strengths and weaknesses

Strengths

  • Overall, the paper is well written and provides comprehensive study and experiments on multiple dimension.
  • The empirical case is well-defended. Component ablations (Table 3) attribute gains to each module, and the appendix adds the controls one would naturally ask for: e.g., architecture-vs-training disentanglement by applying the same RFT to InsertAnything and reward-weight and RFT-only ablations.
  • Deployment concerns are taken seriously. Because SFT/RFT are LoRA adapters on a frozen backbone, W4A4 post-training quantization composes cleanly, reducing the 12B model to run on a single consumer GPU with near-identical quality. The authors provide reasonable solution and analysis to make them deployable.

Weaknesses

  • UniDG is a long pipeline consists of strong off-the-shelf models and existing techniques (12B FLUX backbone, SigLIP, SAM, four curation MLLMs, two reward models, SFT+Flow-GRPO) assembled around a defect-specific dataset. The ablations show that removing a component lowers a metric, but not why the full chain at this scale is necessary versus a substantially simpler pipeline reaching most of the gain. Some gaps stand out: (1) Consistency-RFT barely moves the already-saturated AP/PRO metrics and is reframed as a "perceptual alignment" stage, leaving its cost / benefit unclear; (2) all experiments use the 12B backbone, so it is unclear whether the proposed components carry a transferable benefit or simply ride on foundation-model capacity.

  • The universal claim rests mainly on industrial benchmarks (MVTec-AD / VisA). The cross-domain evidence is thin --- GoodsAD (330 images) and Kvasir-SEG (120 images), compared only against insertion baselines. If this method can be expanded to universal defect generation tool, do we have more experiments on different domian?

Questions
  1. While Table 3 shows each component contributes, it would strengthen the paper to clarify which parts are most essential to the final performance versus which largely reflect foundation-model capability.

  2. Inference uses 28 NFE by default. The paper notes halving to 14 roughly doubles throughput with a moderate quality trade-off --- could you quantify this trade-off on the main metrics?

  3. The source masks are reused from AnomalyDiffusion for fair comparison. Are the downstream results sensitive to mask quality?

  4. The 269 raw defect types are mapped into 28 standardized categories for training (and 73 classes appear in the multi-class segmentation eval). How was this mapping decided, and how sensitive are results to the granularity of this taxonomy?

Limitations

yes

Paper formatting concerns

N/A

Final justification

I appreciate the authors' effort in providing the additional experiments, in particular the smaller-backbone, so I am raising my score.

1 comment

We thank the reviewer for stating the doubt precisely. It is not whether the results hold — the review calls the empirical case well-defended — but whether a long chain of off-the-shelf components is necessary. Our answer is that it is not, and that the dispensable parts are the generic ones: what we demote below is an attention modification and the Flow-GRPO stage the review already lists as off-the-shelf, while what carries the result is what implements the new formulation.

Most of the remaining evidence is already in the submission, where we buried it. Only the 14-NFE quantification and the failure audit are new.

1. What is new here is a formulation, not a module stack

Our claim to novelty is not any individual module. It is that defect generation can be posed as reference-conditioned Defect-Context Editing, which becomes learnable only once paired normal-abnormal-mask-caption data exists at scale. Prior few-shot anomaly generation fits one model per category; our formulation trains one model that transfers. Reading Table 3 as per-component increments (FG-mIoU 13.3 → 31.9):

Added componentΔAccΔAP-PΔFG-mIoUShare of total FG-mIoU gain
Diptych Defect-Context Editing+4.5+8.5+3.117%
Normal Regularization+2.6+5.1+5.731%
Defect Attention+0.6+3.4+0.74%
Diversity-SFT+9.4+16.9+5.731%
Consistency-RFT+2.5+0.3+3.418%

The three components that express the data formulation account for 79% of the total FG-mIoU gain. Defect Attention is the weakest link at +0.6 Acc and +0.7 FG-mIoU, and we will stop presenting every module as equally motivated.

A shorter pipeline does reach most of the gain, and we should have said which links are load-bearing. Stopping after Diversity-SFT — no reinforcement stage, no reward models, no Flow-GRPO — recovers 15.2 of the 18.6 FG-mIoU points and 17.1 of the 19.6 Acc points, i.e. 82% and 87% of the total. We will present UDG data + diptych editing + normal regularization + Diversity-SFT as the core recipe and Consistency-RFT as optional refinement. Note where that leaves the chain: the 82% is produced entirely by the data formulation and its sampling design, and the stage we are demoting is the one taken most directly off the shelf.

Two further results in the submission show the chain is not arbitrary. The sampling design matters more than it looks (Table 4): removing Single Object Defect-Fill drops FG-mIoU from 28.5 to 14.5 and removing Intra-Defect Cross-Sampling drops it to 15.7, while removing Multi-Object Cross-Sampling costs only 2.5 points. And Consistency-RFT without Diversity-SFT collapses to FG-mIoU 4.7 and Acc 53.1, below the baseline (Table 8). A pipeline assembled from the same off-the-shelf parts, but without the paired data and the SFT stage, reaches almost none of the gain.

2. Foundation-model capacity versus the proposed components

Three controls in the submission bound this.

  1. Matched backbone and data. Appendix M (Table 21) fine-tunes InsertAnything on the same FLUX.1-Fill-dev/Redux-dev backbones with the same UDG Diversity-SFT recipe: SC-Acc 63.6 and MC-FG-mIoU 15.6 against 74.9 and 28.5 for UniDG-SFT, which also beats InsertAnything with the same RFT stage (18.3).
  2. The backbone alone is far from sufficient. RFT without SFT reaches FG-mIoU 4.7: the frozen backbone supplies capacity, not defect priors.
  3. Reduced effective capacity. W4A4 (Appendix I, Table 18) cuts the effective footprint 12B → 3.3B and VRAM 28 → 9 GB for SC-Acc 77.4 → 76.8 and MC-FG-mIoU 31.87 → 31.28.

So the same backbone with different data and formulation moves MC-FG-mIoU by 12.9 points, while cutting effective capacity 3.6× moves it by 0.6. The direct test — these components on a smaller backbone family — we cannot supply honestly, since the diptych conditioning and Redux stream are built against the FLUX.1-Fill interface and a half-tuned port would prove nothing either way.

3. Consistency-RFT cost versus benefit

RFT has to justify its 575.81 GPU-hours (Table 23). The reward-weight study in Appendix F.2 (Table 11) shows a controllable trade-off rather than a marginal add-on: a generation-reward weight of 0 gives FG-mIoU 32.5 with Cons 4.01, a weight of 1.0 gives Cons 4.59 and Qual 4.67 with FG-mIoU 27.1, and our default sits between them.

To quantify what RFT buys, we had two annotators independently label both models' outputs on the same 365 inputs, five per MVTec defect class, so the rows below are paired.

ModelAny failure ↓Mask violation ↓Ref. mismatch ↓Context mismatch ↓Agreement
UniDG-SFT14.2%2.7%7.4%6.3%κ≈0.7
UniDG-RFT11.0%2.6%5.7%4.9%κ≈0.7

The three categories overlap and do not sum to the any-failure rate. By defect type, UniDG-RFT fails on 8.7% of scratch/abrasion, 10.2% breakage/hole, 13.2% discoloration/stain, 15.3% deformation/fold/wrinkle, and 7.8% foreign matter (SFT: 11.8 / 13.1 / 16.4 / 19.2 / 10.7%).

So the honest cost–benefit: 575.81 GPU-hours buys a 20–25% relative reduction in reference and context mismatch, no change in mask violations, and essentially nothing on AP/PRO. That is real but modest, in line with the small SFT→RFT movement in the MLLM scores (RefAd 3.90 → 4.04, Cons 4.15 → 4.21). We will present RFT as an optional alignment stage with a measured, bounded benefit.

4. Data scale

Less unique data costs downstream quality steadily rather than catastrophically: PRO-P / FG-mIoU are 86.4 / 23.2 at 50K, 88.6 / 25.8 at 100K, and 90.1 / 27.4 at 200K, against 90.98 / 28.52 at 300K. If the curve saturates before 300K we will report that. The subsets are nested and stratified, preserving the real/synthetic ratio and the source-domain and category distributions under an otherwise identical recipe. The default recipe traverses UDG exactly once at 14K steps, so fixing the step count would make the smallest run repeat its data about 6× and Table 7 shows over-training costs FG-mIoU; each size therefore reports its best of 6K/10K/14K steps. Table 7 itself varies optimizer iterations, not unique dataset size.

5. Cross-domain evidence

We agree the evaluation is small in absolute size. Appendix L (Table 20) shows a consistent, large margin with no domain-specific fine-tuning: GoodsAD (330 images, 6 defect types) SC-Acc 74.6 and MC-FG-mIoU 28.94 versus 56.8 / 11.42 for InsertAnything and 55.2 / 8.26 for AnyDoor; Kvasir-SEG (120 images) SC-Acc 73.2 versus 53.1 and 51.4.

On comparing only against insertion baselines: that is a property of the setting rather than a choice. AnomalyDiffusion, DualAnoDiff, and SeaS require per-category training on real anomalies of the target category, so they cannot run on an unseen benchmark without being retrained on it, which leaves insertion methods as the only ones available under the protocol. We should have said so; it reads as a gap when it is the point of the comparison.

We will report this as transfer to the evaluated held-out benchmarks, not unrestricted generalization.

6. The three remaining questions

14 versus 28 NFE. With the checkpoint, references, masks, and seeds held fixed, 14 NFE gives 6.10 s per image against the 11.59 s in Appendix F.1 (Table 10), with RefAd 3.98, Cons 4.15, Qual 4.17, and FG-mIoU 30.6, against 4.04 / 4.21 / 4.24 / 31.87 at 28 NFE. This replaces the paper's vague "moderate quality trade-off".

Mask quality. Two things are already true and we buried both. Adaptive Defect Crop (Algorithm 1, Appendix C.1) dilates the target mask with a 7×7 kernel for two iterations before it reaches the model, so UniDG is trained and evaluated on deliberately coarsened masks; and every compared method receives the identical AnomalyDiffusion masks, so mask quality cannot explain any relative difference. Neither is the sensitivity curve you asked for, so we are running one: inference on the MVTec-AD evaluation set with the target masks dilated and eroded by 3/7/11 px and translated by 5/10 px, reporting FG-mIoU and RefAd at each level. It needs no retraining, and we will post the table in this thread within the discussion period.

Taxonomy. Raw names describing the same physical damage mode are merged into 28 categories (scratch, hole, breakage, discoloration, …), with the 269 originals kept in metadata. The taxonomy's only role in training is Multi-Object Intra-Defect Cross-Sampling, which retrieves a reference of the same mapped category from a different object type (Appendix D.1). That gives a bound rather than one alternative: removing the distribution entirely costs 2.5 FG-mIoU (28.5 → 26.0, Table 4), and since any re-granularization only changes which pairs it forms, 2.5 points caps every possible re-mapping — a stronger statement than one coarser or finer taxonomy would support. Evaluation keeps 73 fine-grained classes and is never collapsed onto the 28-way taxonomy.

7. One claim we are withdrawing

While preparing this response we re-examined Appendix C.3, where UniDG-Text is said to outperform proprietary editing models. That rests on selected qualitative examples with no quantitative benchmark, so we are withdrawing the superiority claim and will present UniDG-Text as a qualitative demonstration that the formulation extends to instruction conditioning. We raise it unprompted because it is the same over-claiming the review rightly targets.

To summarise: the formulation and the data that makes it learnable account for 79% of the gain, the parts we demote are the borrowed ones, and the same backbone without the rest reaches almost none of the result. The chain is not necessary at full length — but what survives the shortening is the new part, not the assembled one, and that is what we would ask to have weighed on the originality axis.

Comments on the paper

1 comment
Meta-review

(a) Summary of Scientific Claims and Findings The paper presents two primary contributions: the UDG dataset and the UniDG model, a unified framework for reference-based defect generation. The core scientific claim is that defect generation can be formulated as a Defect-Context Editing task, where a model learns transferable defect priors from diverse paired data and applies them to new objects/domains without per-category fine-tuning.

The authors propose a two-stage training strategy: Diversity-SFT (three complementary sampling distributions) followed by Consistency-RFT (GRPO-based reinforcement learning with two specialized reward models). Experimental results on MVTec-AD and VisA show that UniDG generally outperforms the evaluated few-shot anomaly generation and image insertion baselines on downstream detection/localization and MLLM-based perceptual metrics, although it does not uniformly improve all diversity-oriented synthesis metrics. Experiments on GoodsAD and Kvasir-SEG provide evidence of transfer to held-out natural and medical benchmarks without domain-specific fine-tuning. Post-training W4A4 quantization achieves a 3× speedup with small performance degradation.

(b) Main Strengths

  1. Large-scale, systematically curated dataset (UDG). The multi-agent curation pipeline (Inpainting, Captioner, Verifier) constructs 300K paired quadruplets with structured captions, including a curated real-anomaly subset and a verified synthetic extension. The dataset covers 28 standardized defect categories aggregated from 50 source datasets. This directly addresses the long-standing problem of paired defect-editing data scarcity.

  2. Novel two-stage training with strong ablation validation. Diversity-SFT uses three complementary sampling strategies (Single Object Fill, Intra-Defect Cross, Multi-Object Cross) to learn transferable priors. Consistency-RFT employs Flow-GRPO with Defect-Und-Reward and Defect-Recog-Reward to improve reference adherence. Ablations show incremental gains from each component, with Diversity-SFT contributing the largest improvement (+15.2 FG-mIoU vs. baseline). SFT is shown to be essential before RFT.

  3. Comprehensive evaluation across multiple benchmarks and metrics. Evaluation includes single-class AD (AUROC-I/P, AP-I/P, PRO-P), multi-class semantic segmentation (mIoU, FG-mIoU), MLLM-based synthesis quality scores, and transfer to GoodsAD and Kvasir-SEG. Per-category breakdowns are provided. A concept-level holdout (UDG_no-overlap) yields modest absolute drops across the four reported metrics (0.66-2.1 points), providing additional, though not conclusive, support for the transferable-prior claim.

  4. Practical deployment via W4A4 quantization. SVDQuant W4A4 retains the 12B-parameter architecture while reducing its reported BF16-equivalent model footprint from 12B to 3.3B, measured VRAM from 28GB to 9GB, and inference time from 11.59s to 3.9s, with small performance drops. This substantially improves the practicality of deployment on consumer GPUs. Supporting evidence: Appendix I, Table 18.

(c) Main Weaknesses

  1. Failure cases not quantified. Failure modes (color drift, texture mismatch under extreme scale/lighting) are mentioned qualitatively with representative examples (Figure 9) but without systematic quantification or breakdown by defect type.

  2. Instruction-based editing is only qualitatively evaluated. Appendix C.3 describes two instruction-training distributions and presents qualitative comparisons in Figure 8. However, it does not report a quantitative benchmark, systematic human evaluation, or complete training hyperparameters. Consequently, the claim that UniDG-Text outperforms proprietary editing models is supported only by selected qualitative examples.

(d) Weaknesses That Could Adjust Acceptance Odds (If Addressed) The following clarifications or additional evidence could materially affect the assessment:

  1. Data scale ablation. What we need to see: Additional experiments varying UDG dataset size (50K, 100K, 200K, 300K) to clarify scaling behavior and whether the 300K scale is necessary.

  2. Quantification of failure cases. What we need to see: Systematic quantification of failure rates on evaluation benchmarks, ideally broken down by defect type, to help readers understand practical limitations.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.