{"id":"03bf841f-99e4-4ccf-8aa3-fb2abb36b959","arxiv_id":"2505.09264","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":4.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":2,"one_line_summary":"OneNIP reconstructs features with one normal image prompt and a supervised refiner, achieving state-of-the-art unified anomaly detection on MVTec, BTAD, and VisA.","lead":"A new anomaly detection method, OneNIP, uses a single normal image as a visual prompt to guide a transformer to reconstruct normal features and restore synthetic anomalies, then adds a supervised refiner to improve pixel-level localization. It reports large gains over UniAD, especially on the pixel-level PR metric, across three industrial anomaly detection benchmarks.","discovery_kind":"extension","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Test-time prompt selection is an unmeasured class classifier: Table 4d shows a wrong prompt collapses Screw P-PR from 39.8% to 2.3%, yet the paper never reports selection accuracy or whether Table 1 used automatic selection, so the claimed gains may rest on an implicit oracle.","rationale":"The reader's weakest assumption—that the single normal image prompt is correctly identified—is exactly the load-bearing point. The paper's headline gain over UniAD (P-PR 63.7 vs 44.7 on MVTec) is large and the ablation in Table 4a is informative, but the inference protocol introduces a hidden class-selection step whose accuracy is never measured. Because a wrong prompt can catastrophically degrade segmentation (Table 4d: Screw P-PR 39.8 to 2.3), the benchmark numbers are only meaningful if the cosine-similarity selection is nearly perfect; no evidence of that is supplied. This is more fundamental than secondary concerns such as the refiner dominating the gain (Table 4a: lines 4 to 5 add 15.3 P-PR) or the absence of error bars in Table 1, because those affect interpretation or statistical confidence, whereas a prompt-selection failure would change the measured performance. The paper does provide a released implementation and multiple ablations, which makes the proposed test straightforward. I therefore recommend keeping the reader's CONDITIONAL verdict unchanged: the empirical claim is plausible but cannot be fully trusted until prompt-selection behavior on the actual benchmarks is reported.","tokens_in":19861,"tokens_out":9451,"duration_ms":88055,"concrete_test":"Run the released code (github.com/gaobb/OneNIP) on MVTec, BTAD, and VisA test splits using the exact Sec. 3.5 inference protocol (cosine-similarity prompt selection). Record per-class prompt-selection accuracy and the resulting I-ROC/P-ROC/P-PR; compare against the same metrics when prompts are selected using ground-truth class labels. If automatic-selection metrics match Table 1 within a small tolerance (e.g., <= 0.5 point P-PR), the concern is resolved; if they are materially lower, the main comparison is not a genuine class-agnostic evaluation.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The method's only source of class information at inference is the test-time prompt selection: a class-aware prompt pool of one normal image per class is built, and the prompt is chosen by cosine similarity between the test feature F and the pool (Sec. 3.5). Table 4d demonstrates the stakes: feeding a MetaNut prompt to Screw images drops Screw P-PR from 39.8% to 2.3% and I-ROC from 91.4% to 67.3%. The main benchmark results (Table 1) are reported under a 'unified' class-agnostic setting, but the paper does not report the accuracy of this cosine-similarity selection, nor does it state whether the reported numbers were produced with automatic selection or with ground-truth class labels. If the automatic selection is even occasionally wrong, the reconstruction/restoration target is wrong and the final score (Eq. 10) is computed against a mismatched prompt; because every class shares one network, there is no other mechanism to recover the correct class. The central claim of state-of-the-art unified performance therefore rests on an unmeasured component. The fragility is not hypothetical: the paper itself shows the collapse under a cross-class prompt, and no confusion statistics are provided for the actual test sets.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper proposes OneNIP, a unified (single-model, multi-class) anomaly detection method that uses one normal image as a visual prompt to guide transformer-based feature reconstruction and restoration, and adds a lightweight supervised refiner for pixel-level segmentation. The method is evaluated on MVTec, BTAD, and VisA under the unified setting, reporting substantial improvements over UniAD, e.g., pixel-level P-PR from 44.7% to 63.7% on MVTec. The paper includes ablations of the prompt mechanism, restoration stream, refiner, and several hyperparameters, and the authors state that code and models will be released.","tokens_in":20169,"tokens_out":4234,"duration_ms":41105,"significance":"If the reported results hold, OneNIP represents a meaningful advance in unified anomaly detection, roughly doubling the pixel-level P-PR of the prior state-of-the-art on MVTec and improving all three benchmarks. The ablation study is thorough and clearly attributes the gains to each component, and the implementation details are specific enough to be reproduced from the text. The central novelty, using a normal image as a dynamic visual prompt, is well motivated by predictive coding and is shown to accelerate convergence. However, the paper's main claim rests on an unmeasured test-time prompt selection mechanism and on hyperparameters that appear to be tuned on the test set, which limits the current evidence for the reported state-of-the-art numbers.","major_comments":[{"comment":"The paper never reports the accuracy of the test-time cosine-similarity prompt selection, nor does it state whether the results in Table 1 were obtained with automatic selection or with ground-truth class labels. Because Table 4d shows that feeding a MetaNut prompt to Screw images collapses P-PR from 39.8% to 2.3%, the claimed state-of-the-art gains rest on an unmeasured component; please report selection accuracy, a confusion matrix, and results with automatic selection.","section":"Sec. 3.5, Eq. (10)"},{"comment":"The fusion weight α is selected by evaluating on the test set: Table 4c shows P-PR varies from 48.3% (α=0) to 63.7% (α=0.5), yet no validation protocol is described, and λ in Eq. (8) is fixed at 0.5 without sensitivity analysis. Please specify how these hyperparameters are chosen and provide results with a validation-based selection or an analysis over a range of values.","section":"Sec. 4.3, Eq. (8), Eq. (10), Table 4c"},{"comment":"The main comparisons in Tables 1-3 are single runs without error bars, while Table 4d reports standard deviations for the proposed method over 10 random seeds (e.g., P-PR 63.71±0.01). Given that prompt sampling at training and testing is random, please report mean±std over multiple seeds for the main tables, at least for OneNIP, so that the reader can assess the stability of the claimed improvements.","section":"Tables 1-3 and Table 4d"}],"minor_comments":[{"comment":"The limitation paragraph refers to 'OneIP' instead of 'OneNIP'; please correct the typo.","section":"Sec. 5 (Limitation)"},{"comment":"In the discussion of prompt modes, 'Srew' should be 'Screw'.","section":"Sec. 4.3"},{"comment":"Reference [58] is cited as 'omniNAL' in the text but the reference entry lists 'OmniAL'; please make the citation consistent.","section":"Related Work"},{"comment":"The abbreviations 'Res.' and 'Ref.' in the table header are not expanded in the caption; please define them as 'Restoration' and 'Refiner'.","section":"Table 4a caption"},{"comment":"The phrase 'for the first time to reconstruct or restore anomalies with just one normal image prompt' is a strong claim; please soften it or state precisely what is meant (e.g., 'to our knowledge, the first' in a limited scope).","section":"Abstract"}],"recommendation":"major_revision","confidential_remarks":"The core idea is interesting and the ablation study is well structured, but the unresolved question of whether the reported numbers rely on an implicit oracle for class selection is a serious concern. Please also verify whether alpha was tuned on the test set, as this could affect the credibility of the state-of-the-art claim. The paper would be much stronger if the authors added selection accuracy and validation-based hyperparameter choices."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"This paper deserves a serious referee, but the headline result comes with a hole. The method - a bidirectional prompt-guided decoder plus a restoration stream and a supervised refiner - improves pixel-level precision-recall on MVTec from 44.7 to 63.7 over UniAD, and the ablations show each piece contributes. The architecture is clearly specified, the code is promised, and the ablation in Table 4a credibly attributes the gains. That's real work.\n\nThe soft spot is the inference-time prompt selection. The paper builds a class-aware prompt pool and picks the prompt by cosine similarity between test feature and pool, but never reports how often that selection is correct, or whether the numbers in Table 1 used automatic selection or ground-truth class labels. Table 4d shows the stakes: feeding a MetaNut prompt to Screw images collapses P-PR from 39.8 to 2.3. If the automatic selection makes even occasional mistakes, the unified numbers are not yet established. The stress-test note is right. This is the first thing a referee should ask.\n\nTwo smaller issues. The largest single gain (48.4 to 63.7) comes from the supervised refiner, so calling the whole pipeline 'unsupervised' is misleading; the refiner is supervised on synthetic anomalies and zero masks. And hyperparameters like alpha and lambda are not selected on a validation set, so there is some selection risk, though the ablations soften that.\n\nNone of this changes the core idea. The combination of a dynamic visual prompt and a restoration target is a sensible extension of UniAD, and the convergence plot is nice. The paper just needs to make the class-selection mechanism explicit and measured. If the cosine-similarity selector is accurate - say above 98% on these benchmarks - the claims hold. Right now they are conditional.\n\nWho should read this: anyone working on unified AD or on prompt-based reconstruction. It deserves a real review, with the request for selection accuracy, error bars, and a validation-based alpha. I would not cite it as a state-of-the-art result until that is nailed down.","headline":"Strong gains on unified anomaly detection, but the test-time prompt selection is unmeasured and could be an oracle; deserves a serious referee.","tokens_in":20657,"tokens_out":2723,"would_cite":false,"duration_ms":25391,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"A unified anomaly detector that uses one normal image per class as a visual prompt reports large gains over prior multi-class models on three industrial benchmarks.","keywords":["anomaly detection","unified multi-class detection","normal image prompt","feature reconstruction","cross-attention transformer","pseudo-anomaly restoration","supervised refiner","industrial defect segmentation"],"falsifier":"Run OneNIP on a dataset whose classes share similar geometry, or deliberately supply a wrong-class normal prompt (as in the paper's MetaNut-for-Screw experiment) and measure the drop in I-ROC and P-PR; the paper's own Table 4d shows the drop it expects, so a configuration where performance stays high under wrong-prompt assignment would contradict the central claim.","tokens_in":19680,"feed_emoji":"🔍","tokens_out":5054,"duration_ms":44351,"temperature":0.7,"pith_summary":"This paper tries to establish that a single model can detect and localize defects across many object classes at once, provided it is given one normal reference image of the class being inspected. The proposed method, OneNIP, uses that normal image as a visual prompt: a bidirectional cross-attention decoder reconstructs the features of a test image toward its normal counterpart, and a restoration stream trains the model to turn synthetic corruptions back into normal features. A small supervised refiner then turns low-resolution reconstruction errors into pixel-level anomaly maps. On MVTec, BTAD, and VisA, the method reports large gains over prior unified models, most notably pixel-level precision-recall rising from 44.7% to 63.7% on MVTec. If the approach holds, industrial inspection systems could be trained once for many products instead of one model per product.","feed_headline":"One normal prompt per class lifts anomaly segmentation to 63.7%","feed_subtitle":"A single model reconstructs test features against one normal reference, beating prior unified detectors on MVTec, BTAD, and VisA.","key_machinery":"The load-bearing object is the normal image prompt paired with a bidirectional cross-attention decoder. For a target feature $x_d^i$ and a prompt feature $p_d^i$, each decoder block first updates the prompt as $p_d^{i+1} = \\operatorname{softmax}(p_d^i x_d^{i\\top}/\\sqrt{c}) x_d^i$ and then updates the target as $x_d^{i+1} = \\operatorname{softmax}(x_d^i p_d^{i+1\\top}/\\sqrt{c}) p_d^{i+1}$, so neither side stays static. This machinery lets the reconstruction use context from within the target and global structure from a reference normal image. The restoration stream uses the same decoder to map pseudo-anomaly features (generated by CutPaste and DRAEM corruptions) back to the normal features, and the supervised refiner upsamples the absolute reconstruction error with transposed convolutions under a Dice loss.","core_discovery":"OneNIP claims that to reconstruct normal features under a unified multi-class model, the reconstruction should be guided by a normal image prompt, not just by the target feature's own context. The central discovery is that replacing the learned query embedding of a reconstruction transformer with features from a single normal image, and letting both prompt and target features update each other through bidirectional cross-attention, avoids the identity shortcut and enables detection of both ordinary and camouflaged anomalies. Adding a restoration objective on pseudo-anomalies and a supervised refiner that regresses reconstruction errors from 1/16 to 1/4 resolution brings pixel-level precision-recall to 63.7% on MVTec, 56.8% on BTAD, and 43.3% on VisA under the one-model-for-all-classes protocol.","pith_inferences":["The per-class prompt pool can be extended at test time without retraining, so adding a new product class may reduce to supplying one normal reference image; the paper does not test this continual-class scenario.","Because the refiner is trained on synthetic anomalies such as CutPaste and DRAEM corruptions, its localization gains are likely to be largest for defects that resemble those corruptions, and other defect types may not benefit as much.","The cosine-similarity prompt selection is a classifier-like step inside an otherwise unsupervised pipeline; a natural extension is to measure how many reference images per class are needed to keep selection robust under pose, lighting, or surface variation."],"forward_implications":["One model trained on all classes can improve pixel-level precision-recall on MVTec from 44.7% to 63.7%, and on a merged 30-class dataset from 39.1% to 52.4%.","OneNIP reaches a given performance level in far fewer training epochs than the prior unified baseline, so the prompt and refiner speed convergence.","The restoration stream is removed at inference, meaning deployment cost stays close to the base reconstruction model plus a small refiner.","Anomaly localization becomes accurate enough to catch camouflaged defects where the abnormal region blends into its context."],"supporting_citations":[{"why":"The base reconstruction transformer OneNIP builds on; the paper's encoder-decoder design and baseline comparisons use it.","marker":"[52]"},{"why":"CutPaste supplies one of the pseudo-anomaly generation strategies used to create synthetic corruptions for the restoration stream and the supervised refiner.","marker":"[23]"},{"why":"DRAEM supplies the other pseudo-anomaly generation strategy, with Perlin-noise masks that provide pixel-level supervision for the refiner.","marker":"[54]"},{"why":"MVTec is the primary industrial anomaly detection benchmark used in the main evaluation.","marker":"[4]"},{"why":"BTAD provides the second industrial anomaly detection benchmark with pixel-level annotations.","marker":"[26]"},{"why":"VisA provides the third and largest benchmark, with small defects and multiple object domains.","marker":"[60]"},{"why":"The self-attention and cross-attention machinery is the foundation for the bidirectional decoder's formulation.","marker":"[43]"},{"why":"Dice loss is used to train the supervised refiner on imbalanced normal-versus-anomaly pixels.","marker":"[47]"}],"fun_headline_variants":["One image prompt detects all anomalies","Single normal image trains unified anomaly detector","Anomaly detection with just one reference image","OneNIP: one normal prompt for every anomaly class","Boost anomaly segmentation with a single image prompt"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The one load-bearing premise is that a single normal image per class, selected at test time by cosine similarity, provides enough reference information and that the class of the test image is correctly identified; the paper shows that using a wrong prompt collapses pixel-level precision-recall from 39.8% to 2.3% for the Screw class.","fun_headline_variants_meta":{"raw":{"variants":["One image prompt detects all anomalies","Single normal image trains unified anomaly detector","Anomaly detection with just one reference image","OneNIP: one normal prompt for every anomaly class","Boost anomaly segmentation with a single image prompt"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000259,"raw_usage":{"total_tokens":1579,"prompt_tokens":931,"completion_tokens":648,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":547,"completion_tokens_details":{"reasoning_tokens":581}},"tokens_in":547,"tokens_out":648,"duration_ms":6581,"temperature":1.0,"reasoning_tokens":581,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-15T21:35:20.648103+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run OneNIP on a dataset whose classes share similar geometry, or deliberately supply a wrong-class normal prompt (as in the paper's MetaNut-for-Screw experiment) and measure the drop in I-ROC and P-PR; the paper's own Table 4d shows the drop it expects, so a configuration where performance stays high under wrong-prompt assignment would contradict the central claim.","supporting_citations":[{"cited_title":"In: NeurIPS (2022)","cited_arxiv_id":null,"evidence_quote":"The base reconstruction transformer OneNIP builds on; the paper's encoder-decoder design and baseline comparisons use it."},{"cited_title":"In: CVPR (2021)","cited_arxiv_id":null,"evidence_quote":"CutPaste supplies one of the pseudo-anomaly generation strategies used to create synthetic corruptions for the restoration stream and the supervised refiner."},{"cited_title":"In: ICCV (2021)","cited_arxiv_id":null,"evidence_quote":"DRAEM supplies the other pseudo-anomaly generation strategy, with Perlin-noise masks that provide pixel-level supervision for the refiner."},{"cited_title":"In: CVPR (2019)","cited_arxiv_id":null,"evidence_quote":"MVTec is the primary industrial anomaly detection benchmark used in the main evaluation."},{"cited_title":"In: SIE (2021)","cited_arxiv_id":null,"evidence_quote":"BTAD provides the second industrial anomaly detection benchmark with pixel-level annotations."},{"cited_title":"In: ECCV (2022) OneNIP 1 A Implementation Details For fair comparisons, we maintain the same hyper-parameters as in UniAD [52]","cited_arxiv_id":null,"evidence_quote":"VisA provides the third and largest benchmark, with small defects and multiple object domains."},{"cited_title":"In: ICPR (2021)","cited_arxiv_id":null,"evidence_quote":"Dice loss is used to train the supervised refiner on imbalanced normal-versus-anomaly pixels."}],"review_version":1}