{"id":"fb89d7e0-5079-4c69-a625-465ab3bc4bde","arxiv_id":"2504.13560","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":5.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":4,"one_line_summary":"A zero-shot anomaly segmentation pipeline that generates image-specific defect prompts using an image tagger and an LLM improves F1-max by up to 10% over fixed prompts.","lead":"This paper proposes a way to automatically write text prompts for zero-shot industrial defect detection: an image tagging model names objects in the image, then a large language model turns those names into a list of possible defects such as scratches, stains, and holes. On seven industrial datasets, the system improves the best F1 score by up to about 10 percentage points over fixed-prompt baselines.","discovery_kind":"new_application","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Test-image-derived size threshold confounds the zero-shot prompt claim; gains may come from per-image filtering, not image-aware prompts.","rationale":"The paper's central claim is that LLM-generated, image-aware prompts improve zero-shot anomaly segmentation. This is plausible and partly supported: Table 3 shows that adding LLM prompting without filtering raises F1 from 24.73 to 33.66, and the authors promise code. However, the strongest quantitative support is contaminated by the test-image-derived threshold in Algorithm 1 line 7. Reading Algorithm 1 and Section 4.1 together, Sthreshold is computed from Ia (the anomalous/test images) and then used to filter detections from the same images, making the pipeline transductive and the comparison to fixed-threshold baselines unfair. The Parameter section's 'size threshold of 0.8' adds an unresolved inconsistency. The ablation's interaction pattern (X O X > O O X; O O O much larger than either) suggests the filtering threshold, not the prompt, may drive the headline result. This does not disprove the contribution of prompt generation, but it means the paper should be accepted only after the threshold is recomputed from normal images or fixed a priori and the results re-reported. Since the reader already identified this as the weakest assumption and assigned CONDITIONAL, my read does not change the verdict.","tokens_in":9335,"tokens_out":8464,"duration_ms":77658,"concrete_test":"Re-run Table 1 and Table 3 with Sthreshold computed exclusively from normal images In (e.g., max GroundingDINO box size on In using Tn, or the fixed 0.8 threshold stated in Section 5.1), never from Ia. Compare IAP-AS F1-max against SAA+ and EVF-SAM, and compare the full model to the O O X ablation row. If the gains disappear or drop materially below the reported 10%, the test-derived threshold is the load-bearing component and the prompt-generation claim needs re-evaluation.","verdict_should_be":"UNCHANGED","load_bearing_attack":"Algorithm 1 line 7 computes Sthreshold <- GroundingDINO(Ia, Tn), using the anomalous/test images themselves, and line 14 then filters detections from those same images (Eq. 3). The reported F1-max gains in Table 1 (up to 10.99% on BTAD) are therefore not a pure zero-shot result: IAP-AS has a per-image adaptive filter derived from the target image, an adaptation mechanism that the comparison methods do not have. The ablation in Table 3 shows why this matters: removing tagging but keeping LLM prompting (X O X) gives F1 33.66, higher than tagging+LLM without filtering (O O X, 33.08), while the largest jump appears only when filtering is combined with tagging (O O O, 40.13 vs. 33.08). This interaction pattern is consistent with the test-derived threshold, not the LLM prompt, being the decisive component. Section 5.1 additionally states 'a size threshold of 0.8 filtered out unusually sized bounding boxes,' which contradicts Algorithm 1's test-derived Sthreshold and makes the reported configuration ambiguous. Unless the threshold is recomputed from normal images only or fixed a priori, the central claim that image-aware prompts improve zero-shot segmentation is not isolated.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper proposes IAP-AS, a zero-shot anomaly segmentation method that generates image-aware text prompts by combining an image tagging model (RAM) and an LLM (LLaMA-3-8B), then feeds these prompts to a Grounding DINO + SAM pipeline. The claimed contribution is that dynamic, context-aware prompts replace fixed prompts and improve F1-max by up to about 10% over existing zero-shot baselines across seven industrial datasets. The method comprises a preprocessing stage (object tagging, size-threshold extraction, LLM prompting) and a segmentation stage (anomaly region generation, size filtering, SAM masking, score aggregation). The paper reports quantitative results in Table 1, an ablation in Table 3, and qualitative examples.","tokens_in":9574,"tokens_out":3296,"duration_ms":29458,"significance":"If the claims hold, the work would demonstrate a simple and potentially impactful way to improve zero-shot anomaly segmentation: replacing manually fixed prompts with automatic, image-conditioned prompt generation. The paper releases code, uses several standard industrial anomaly datasets, and includes an ablation study. These are positive features. The central question is whether the reported gains are actually attributable to the image-aware prompting mechanism or to a test-image-derived size filter that the comparison methods do not receive. Because that confound is not resolved, the significance of the contribution is currently uncertain but the underlying idea is worth exploring.","major_comments":[{"comment":"The size threshold Sthreshold is computed on line 7 as GroundingDINO(Ia, Tn), where Ia denotes the anomalous (test) images, and is then used on line 14 to filter detections from those same images. This means the method uses information from the test image itself to determine which detection boxes to keep, which is a form of test-time adaptation rather than a pure zero-shot procedure. The comparison methods in Table 1 do not have access to such a per-image adaptive filter. The abstract and Section 5.2 attribute the F1-max gains to the image-aware prompts, but the ablation in Table 3 shows that the largest jump occurs only when filtering is combined with tagging (O O O: 40.13 vs. O O X: 33.08), and that LLM prompting without tagging (X O X: 33.66) outperforms tagging with LLM but without filtering (O O X: 33.08). This interaction pattern is consistent with the test-derived threshold, not the LLM prompt, being the decisive component. The authors should recompute Sthreshold from normal images only (or fix it a priori) and re-run the experiments and ablation to verify whether the prompt-based gains persist without this test-image leak.","section":"Algorithm 1 lines 7 and 14"},{"comment":"The implementation details in Section 5.1 state that 'a size threshold of 0.8 filtered out unusually sized bounding boxes,' which suggests a fixed constant. This directly contradicts Algorithm 1, line 7, where Sthreshold is computed per test image from GroundingDINO(Ia, Tn), and also contradicts the Step 1-2 text, which says the threshold is the maximum size of detected regions in the input image. Additionally, the Step 1-2 text says the threshold 'filters out smaller regions,' whereas Eq. (3) defines J = {i | bi < Sthreshold}, which retains only boxes smaller than the threshold. These inconsistencies make the reported configuration ambiguous and the method impossible to reproduce as described. Please clarify which threshold definition is actually used and provide the exact filtering rule.","section":"§5.1"},{"comment":"No error bars, standard deviations, or significance tests are reported. Since the method involves a random selection of normal images (random value r in Algorithm 1), the results may vary across runs, and the claimed improvements (e.g., up to 10.99% F1-max on BTAD) may lie within noise. The authors should report mean and standard deviation over multiple random seeds and, ideally, a significance test for the headline comparisons against SAA+ and the CLIP-based baselines.","section":"Table 1"},{"comment":"The comparison is not fully controlled: WinCLIP, SAA+, and SDP are described as using 'dataset-specific Few-Shot prompts combined with object names,' while IAP-AS additionally uses a per-image test-derived size threshold. To isolate the contribution of the image-aware prompt generation, the authors should add an ablation variant that uses the IAP-AS pipeline with a fixed size threshold (or no size filtering) and compares against a variant that uses the test-derived threshold without the LLM-generated prompts. This would directly address whether the reported gains come from the prompts or from the adaptive filter.","section":"§5.1"}],"minor_comments":[{"comment":"The keyword 'Large language model (LMM)' appears to be a typo; it should read 'Large language model (LLM)' for consistency with the rest of the text.","section":"Keywords"},{"comment":"The caption contains a typo: 'trainig-free' should be 'training-free'.","section":"Table 1"},{"comment":"The description of the size threshold is unclear: it says 'the threshold is calculated as the maximum size of detected regions in the input image Ia' but does not specify how 'size' is measured (area, width, height, or diagonal). Please define the size metric explicitly.","section":"§4.1"},{"comment":"The notation Pad_j is introduced but the index j is not defined, and the relationship between Pad_j and the final prompt P_final is described only in words. Please define the composition of P_final formally.","section":"§4.1"},{"comment":"The problem definition states that segmentation masks are generated with SAM and anomaly scores are computed as a weighted sum, but it does not define how the confidence scores si are obtained when multiple masks overlap or how the final pixel-level score is thresholded for AP/F1-max computation. Please clarify the evaluation protocol.","section":"§3"}],"recommendation":"major_revision","confidential_remarks":"The key risk is the test-image-derived size threshold. If the authors can show that the gains persist with a threshold computed solely from normal images or fixed a priori, the paper could become acceptable. The current version, however, does not isolate the prompt-generation contribution, and the internal inconsistency about the threshold makes the method hard to evaluate. I would encourage the editor to request a revised version with the confound addressed and with error bars before considering publication."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"The actual contribution here is modest but real: feeding image tags from RAM into an LLM to generate per-dataset anomaly prompts, then running Grounding DINO + SAM on those prompts. Table 1 shows F1-max gains of several points over SAA+ on most of the seven datasets, and the ablation in Table 3 broadly supports that tagging, prompting, and filtering each contribute. The code release helps. That is a legitimate incremental contribution to zero-shot anomaly segmentation.\n\nThe soft spot is the size threshold, and it is not a footnote. Algorithm 1 line 7 computes Sthreshold from Ia—the test/anomalous image itself—and line 14 then filters detections from that same image. That is test-time adaptation, not a fixed preprocessing step, and none of the comparison methods get that advantage. The ablation makes the worry concrete: going from O O X to O O O (adding filtering) jumps F1-max from 33.08 to 40.13, the largest single increment, while the LLM-prompting increment alone is small. So the claim that image-aware prompts drive the gains is not isolated from the per-image threshold.\n\nIt gets worse when you read Section 5.1: 'a size threshold of 0.8 filtered out unusually sized bounding boxes.' That describes a fixed threshold, which contradicts what Algorithm 1 does. Either one description is wrong, or one of the two configurations was used for Table 1. The paper needs to state clearly where Sthreshold comes from, rerun the ablations with a threshold computed only from normal images, and ideally add error bars or significance tests, which are also missing.\n\nI don't think the core idea collapses: dynamic prompts are plausible and the method does beat SAA+ on several datasets. But as written, the zero-shot claim is not supported, because a test-image-derived filter is a form of adaptation. That needs to be resolved before the numbers can be trusted. The paper is worth sending to a serious referee—the idea is timely and the fix is clarifiable—but I would not cite it in its current form.","headline":"The prompt-generation idea is real and the gains are plausible, but the size threshold is computed from the test image itself, which confounds the zero-shot claim and needs clarification before the numbers can be trusted.","tokens_in":10103,"tokens_out":1979,"would_cite":false,"duration_ms":18012,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"IAP-AS claims that per-image, LLM-generated prompts improve zero-shot anomaly segmentation by up to 10% in F1-max across seven industrial datasets.","keywords":["zero-shot anomaly segmentation","image-aware prompt generation","large language model","image tagging","industrial inspection","text-guided prompt","defect localization"],"falsifier":"Run the full IAP-AS pipeline on any dataset while computing the size threshold from a separate set of normal images instead of from the test image; if the F1-max gain over fixed prompts shrinks toward zero, the reported improvement comes from test-image information in the threshold, not from the prompt generation itself.","tokens_in":9161,"feed_emoji":"🏭","tokens_out":5466,"duration_ms":45837,"temperature":0.7,"pith_summary":"This paper tries to establish that zero-shot industrial anomaly segmentation can be improved by replacing fixed text prompts such as \"defect\" or \"abnormal\" with prompts generated from the content of each individual image. The proposed IAP-AS pipeline tags an image with object words, sends those tags plus a fixed instruction to a large language model, and uses the resulting context-aware phrase list to drive a detection-and-segmentation model. Across seven industrial datasets the method reports F1-max gains of up to 10 percentage points over fixed-prompt and few-shot baselines, and first or second place on most benchmarks. If true, this means the content of the prompt, not the model architecture, may be the main remaining lever for zero-shot defect localization.","feed_headline":"Image-aware prompts boost zero-shot defect finding by 10%","feed_subtitle":"An image tagging model and an LLM turn each industrial image's own content into defect prompts, beating fixed prompts on seven datasets.","key_machinery":"The central object is the Image-Aware Prompt (IAP), a text prompt generated per image by merging object tags from an image tagging model with an LLM instruction that asks for anomalous nouns; the final prompt combines these LLM-generated adjective clauses, the object tag set, and fixed words like \"abnormal\" and \"defect\". This prompt carries the argument: it is fed to an open-set detector, whose boxes are filtered by a size threshold, and the surviving boxes are given to a promptable segmentation model whose masks are weighted by confidence to produce the anomaly score.","core_discovery":"The central claim is that a prompt built from the image's own tags—for example, leather, brown, fabric, material—expanded by an LLM into a list like cut, hole, split, blemish, tear, mark, lets an open-vocabulary detector find defects that a generic \"abnormal\" prompt misses. The paper attributes the gain to three cooperating components: image tagging, LLM-based prompt expansion, and a size filter that removes detections larger than a per-image threshold. On the MVTec-AD dataset the fully integrated system reaches 40.13 F1-max versus 24.73 for the same pipeline without these components, and it reports improved or competitive results on six other industrial datasets that include both objects and textures.","pith_inferences":["A fair comparison would need to verify whether the per-image size threshold is computed from the test image itself; if so, part of the reported gain may be test-time adaptation, and a clean zero-shot evaluation should derive the threshold from normal images only.","Because the tags come from a fixed-vocabulary image tagging model, images containing objects outside that vocabulary may produce poor prompts; extending the approach with a tagging model that outputs free-form attributes could be tested.","The same prompt-generation mechanism could in principle be applied to other text-guided dense prediction tasks, such as referring segmentation or open-vocabulary detection, by swapping the anomaly-specific instruction in the LLM query."],"forward_implications":["Replacing fixed prompts with image-tag-derived prompts is a drop-in change for text-guided zero-shot anomaly segmentation pipelines, since it does not require retraining.","Because prompts are generated per image, the method can adapt to products whose surface material or object type changes across a production line, where a single fixed prompt would fail.","Image tagging, LLM prompting, and size filtering are complementary: the ablation shows each component contributes, and the full combination performs best.","The gains hold across both object and texture industrial datasets, suggesting the mechanism is not specific to one defect type.","The method's output masks are weighted by detector confidence, giving a per-pixel anomaly score suitable for downstream quality-control decision rules."],"supporting_citations":[{"why":"Supplies the image tagging model that produces the object tag set from normal images.","marker":"[25]"},{"why":"Provides the LLM that expands the tags and instruction into context-aware anomaly prompts.","marker":"[20]"},{"why":"Provides the open-set detector that localizes candidate anomaly regions from the final prompt.","marker":"[14]"},{"why":"Provides the promptable segmentation model that generates the final anomaly masks.","marker":"[9]"},{"why":"A strong SAM-based zero-shot baseline and the closest architectural predecessor that IAP-AS extends.","marker":"[4]"},{"why":"A CLIP-based zero-/few-shot baseline that IAP-AS must beat on the benchmark datasets.","marker":"[7]"},{"why":"A CLIP-based baseline that uses fixed prompts, representing the approach IAP-AS argues is limited.","marker":"[5]"},{"why":"Supplies the primary industrial anomaly detection and segmentation dataset used for the main evaluation and ablation.","marker":"[3]"}],"fun_headline_variants":["Image-aware prompts lift zero-shot defect detection by 10%","Dynamic prompts from image tags improve anomaly segmentation by 10%","LLM-generated prompts from image content boost defect finding by 10%","Self-prompting industrial images boost zero-shot anomaly segmentation by 10%","Image tagging and LLM prompts enhance zero-shot anomaly segmentation by 10%"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The method assumes that a size threshold computed from the very image being tested, using only normal-object tags, is a legitimate zero-shot filter rather than a way of leaking information from the test image into the prediction.","fun_headline_variants_meta":{"raw":{"variants":["Image-aware prompts lift zero-shot defect detection by 10%","Dynamic prompts from image tags improve anomaly segmentation by 10%","LLM-generated prompts from image content boost defect finding by 10%","Self-prompting industrial images boost zero-shot anomaly segmentation by 10%","Image tagging and LLM prompts enhance zero-shot anomaly segmentation by 10%"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000651,"raw_usage":{"total_tokens":2925,"prompt_tokens":823,"completion_tokens":2102,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":439,"completion_tokens_details":{"reasoning_tokens":2008}},"tokens_in":439,"tokens_out":2102,"duration_ms":12785,"temperature":1.0,"reasoning_tokens":2008,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-16T12:05:25.937268+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run the full IAP-AS pipeline on any dataset while computing the size threshold from a separate set of normal images instead of from the test image; if the F1-max gain over fixed prompts shrinks toward zero, the reported improvement comes from test-image information in the threshold, not from the prompt generation itself.","supporting_citations":[{"cited_title":"In: CVPR","cited_arxiv_id":null,"evidence_quote":"Supplies the image tagging model that produces the object tag set from normal images."},{"cited_title":"In: ECCV","cited_arxiv_id":null,"evidence_quote":"Provides the open-set detector that localizes candidate anomaly regions from the final prompt."},{"cited_title":"In: ICCV","cited_arxiv_id":null,"evidence_quote":"Provides the promptable segmentation model that generates the final anomaly masks."},{"cited_title":"In: IJCAI","cited_arxiv_id":null,"evidence_quote":"A CLIP-based baseline that uses fixed prompts, representing the approach IAP-AS argues is limited."},{"cited_title":"In: CVPR","cited_arxiv_id":null,"evidence_quote":"Supplies the primary industrial anomaly detection and segmentation dataset used for the main evaluation and ablation."}],"review_version":1}