{"id":"09840042-ca54-4ef4-a29f-8eaff8e757c4","arxiv_id":"2412.12850","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":4,"one_line_summary":"Coarse image-level anomaly labels, used through an energy-based adversarial discriminator, align reconstructed feature distributions with normal ones and improve fine-grained anomaly detection and localization.","lead":"This paper adds a small set of image-level-only anomalous examples to a reconstruction-based anomaly detector and trains an adversarial discriminator to push reconstructed features toward normal features. The resulting method reports better detection and localization on several medical and industrial datasets than unsupervised and weakly supervised baselines.","discovery_kind":"extension","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Patch-level alignment theorem only guarantees Pg is supported on the normal support, not Pg=P+, and rests on an unverified disjoint-support assumption for pretrained ResNet patch features.","rationale":"The paper's central claim is that a coarse-knowledge-aware adversarial loss aligns reconstructed patch features with normal patch features, thereby improving fine-grained anomaly localization. The only formal support for this claim is Theorem 2. I examined the proof and found that the lower bound in Eq. (38) is attained whenever Pg is supported on Supp(P+), not only when Pg=P+. Thus the existence proof does not establish that the proposed alternating training converges to the alignment claimed; it only shows that an equilibrium with Pg=P+ exists among many. This weakens the theoretical guarantee but is not fatal if the empirical results are robust. The deeper issue is that the decomposition in the proof relies on Supp(P+)∩Supp(P-)=∅. For fine-grained anomalies in medical images and industrial defects, patch features from a pretrained ResNet are likely to overlap: a small defect patch may look similar to a normal texture patch. The paper provides no evidence of separation, and the theorem says nothing about the overlapping case. Without a demonstration that P+ and P- are separable in the actual feature space, the theoretical justification for the method's localization benefit does not follow. This is the most load-bearing concern because it targets the mechanism (alignment) rather than the implementation. The industrial experiments using elastic distortions as synthetic anomalies are a further gap, as they do not test the coarse-labeled real anomaly setting, but they are secondary to the theoretical mechanism. The reader's weakest assumption identified the same disjointness/equilibrium issue; I partially agree, adding that even under disjointness the equilibrium is not unique. The conditional verdict is appropriate: the paper should verify separability and directly measure alignment, or soften the theoretical claim.","tokens_in":25589,"tokens_out":13990,"duration_ms":126407,"concrete_test":"Using the same pretrained ResNet and S layers as in the paper, extract patch features from normal training images and from anomalous images, using ground-truth masks (available in MVTec/Visa test sets) to label patches as normal or anomalous. Train a linear classifier on half the patches and evaluate balanced accuracy on the other half. If accuracy is near chance, P+ and P- overlap substantially, directly falsifying the disjointness premise of Theorems 1-2. Additionally, on held-out anomalous test images, compute the MMD or FID between reconstructed patch features G(F^-) and normal patch features P+ before and after CKAAD training; if the distance does not decrease significantly, the claimed distribution alignment is not what drives the reported detection gains.","verdict_should_be":"UNCHANGED","load_bearing_attack":"Theorem 2's proof shows the generator's loss lower bound is attained not only by Pg=P+ but by any Pg supported on the normal patch-feature support (Supp(P+)). This follows from the TV lower bound: for any such Pg, TV(P+, ηPg+(1-η)P-)=1-η, so LG is minimal. Consequently, the training objective does not uniquely enforce the claimed distribution alignment; alternating optimization can converge to an equilibrium where reconstructed features are normal-like but do not match P+. The reconstruction loss L_rec+ is then the only term anchoring P_g^+ to P+, and it says nothing about P_g^- (outputs from anomalous inputs). More fundamentally, the proof decomposes the space into Supp(P+) and its complement using the disjointness of P+ and P-. For fine-grained anomalies, pretrained ResNet patch features of subtle defects may overlap substantially with normal patches; the paper never measures this separability. If the distributions overlap, the TV lower bound no longer implies that the generator places mass on the normal support, and the theoretical guarantee for localization collapses. The empirical gains could instead come from the extra capacity of adversarial training or from the synthetic elastic distortions on MVTec/Visa, which are not real coarse-labeled anomalies. Thus the central claim that coarse knowledge aligns reconstructed patch features with normal ones is not yet supported by a verified mechanism.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper proposes CKAAD, a feature-reconstruction anomaly detection method that trains an auto-encoder with the help of a small, image-level-labeled anomalous dataset. An energy-based discriminator regularizes the generator so that reconstructed features and, at patch level, reconstructed patch features are pushed toward the distribution of normal features. The main theoretical contribution is a pair of theorems claiming that, under disjoint-support assumptions, the adversarial training admits a Nash equilibrium in which the generated feature distribution exactly equals the normal feature distribution, even though patch-level anomaly labels are absent. The method is evaluated on four medical datasets (ISIC2018, Chest X-ray, Br35H, OCT) and two industrial datasets (MVTec AD, VisA), with ablations comparing reconstruction-only, reconstruction-minus-anomaly, pure GAN, image-level knowledge-aware, and patch-level knowledge-aware variants. Code is publicly released.","tokens_in":25830,"tokens_out":12756,"duration_ms":123594,"significance":"The empirical study is broad and generally well executed: six datasets, multiple anomaly-ratio and anomaly-type settings, standard deviations over three runs in the supplement, and ablations that isolate the components of the loss. The idea of exploiting coarse image-level anomaly knowledge to improve fine-grained localization is practically appealing, and the reported gains on medical datasets are consistent. The paper also ships a theoretical analysis and public code, which are strengths. However, the theoretical guarantee is substantially weaker than the text claims: the proofs establish the existence of one equilibrium with exact distribution matching, not that the training objective enforces this alignment, and the key disjoint-support assumption is unverified. The industrial experiments rely on elastically distorted normal images as synthetic anomalies, so they do not directly validate the use of real coarse labels in the motivating industrial scenario. If the claims are revised to match the actual guarantees and the assumptions are empirically checked, the contribution would still be valuable.","major_comments":[{"comment":"The proofs show that LG(D*,G) is minimized whenever the generated distribution Pg places all its mass on Supp(P+), not only when Pg=P+. Under disjoint supports, any such Pg yields the same value of the total-variation term in Eq. (23)/(34), so the lower bound in Eq. (27)/(38) is attained by a continuum of generators. Thus the losses (8)-(9) and (11)-(12) do not uniquely enforce the claimed distribution alignment; alternating optimization could converge to an equilibrium in which reconstructed features are normal-supported but do not match P+. Since the reconstruction loss L+rec only constrains outputs for normal inputs and is not part of the theorem, the claimed mechanism for localizing anomalies is not a consequence of the adversarial objective. The proof also assumes, rather than demonstrates, the existence of a generator achieving Pg=P+ (\"Bring G*_theta such that Pg=P+\"), and the theorems establish only existence of an equilibrium, not convergence of the alternating Adam procedure used in Eq. (13). The theorem statements and the surrounding text should be weakened accordingly.","section":"Supplementary, proof of Theorem 1, Eq. (27); proof of Theorem 2, Eq. (38)"},{"comment":"Both theorems assume that P+ and P- are disjoint distributions. This is a strong assumption for fine-grained anomalies in pretrained ResNet feature space: a subtle defect may produce patch features that overlap substantially with normal patches. The paper never measures this separability. If the supports overlap, the total-variation lower-bound argument no longer forces the generator to place mass on the normal support, and the theoretical rationale for localization collapses. A concrete check would be to train a linear classifier on normal versus ground-truth anomalous patch features (e.g., on MVTec or on a medical dataset with pixel masks) and report the resulting separation. Until such evidence is provided, the theorems should be stated as conditional on an empirically unverified premise.","section":"Theorems 1 and 2 (main text and Supplementary)"},{"comment":"For MVTec AD and VisA, the coarse anomaly knowledge is obtained by elastically distorting normal images, and no real coarse-labeled defects are used. The results in Table 2 therefore demonstrate the method's behavior under synthetic anomalies, not its ability to exploit real coarse image-level labels in the industrial setting. This matters because elastic distortion creates a known, localized deviation from the normal manifold that may be far easier for the adversarial discriminator to exploit than real industrial defects. The paper should add experiments with a small number of real labeled defect images or explicitly state this limitation in the main text and rephrase the industrial claims accordingly.","section":"Supplementary, 'Datasets' and Figure 4; Table 2"},{"comment":"Theorem 2 is proved for a per-position discriminator D^{(h,w)} and generator G^{(h,w)}, but the actual algorithm uses one shared patch discriminator D_s for all positions and for all layers s. The paper notes this only in passing (\"In experiments, a common patch feature discriminator D(p) is used for all patch feature generators\"), without an argument that the equilibrium result transfers to the shared case. Since the shared discriminator is what the experiments use, the theoretical claim does not cover the evaluated system as stated.","section":"Training and Testing, Eq. (11)-(13); Supplementary, proof of Theorem 2"}],"minor_comments":[{"comment":"\"path-level anomaly annotations\" should be \"patch-level anomaly annotations.\"","section":"Paragraph after Theorem 2"},{"comment":"The statement that the E_{P+}D term in (11) \"has greater weight\" is not made precise; after expansion, the coefficients on E_{P+}D, E_{Pg}D, and E_{P-}D are 1, gamma, and (1-gamma), and the comparison with the E_{Pm} term depends on the unknown beta. A short formal justification of the claimed override would be helpful.","section":"Paragraph after Theorem 2"},{"comment":"The paper reports \"best F1\" but does not describe the threshold selection procedure; please clarify whether the threshold is chosen on the test set or with a validation protocol, as this affects comparability across methods.","section":"Table 1"},{"comment":"The mixture ratio alpha in Eq. (5) is not used in any of the training losses; the text says alpha and gamma are both set to 0.5, but only gamma appears in Eq. (8)-(12). Clarify the role of alpha or remove it from the formulation.","section":"Section 4.1, Eq. (5) and implementation details"}],"recommendation":"major_revision","confidential_remarks":"The paper is a reasonable contribution, but the theoretical claims need to be substantially qualified: the theorems prove existence of one equilibrium rather than uniqueness or convergence, and the key disjoint-support premise is unverified. If the authors can provide the separability analysis, rephrase the theorems to match the proofs, and address the synthetic-anomaly issue in the industrial evaluation, I would support publication. I see no concern about the novelty of the empirical setup relative to the venue's scope."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"First thing to know: the patch-level alignment trick is legitimate and the medical results are solid, but the main theorem proves less than the paper claims. The lower bound in Theorem 2 is attained by any generator output distribution supported on the normal patch-feature support, not just by Pg = P+. So the adversarial loss alone does not enforce distributional equality; it enforces that the generator stays on the normal support. That is still useful for anomaly localization, but it is not the stated result.\n\nThe paper does a few things well. The idea of using a small, image-level-labeled anomaly set to regularize a feature-reconstruction autoencoder is practical, and the energy-based discriminator that injects anomaly knowledge is a reasonable extension of the authors' prior AA-BiGAN line. The patch-level strategy—treating all patches from anomalous images as anomalous and then proving something about the noisy labels—is the actual novelty, and the problem is worth attacking. The experiments are broad: four medical datasets with 1%, 2%, 5% labeled anomalies, plus MVTec and Visa. The medical gains are consistent across datasets, and the ablations show the patch-level component helps. Code is public, and standard deviations are reported in the supplementary. That is real work.\n\nThe soft spots are proportional. The proof issue is the important one. It rests on disjoint supports for normal and anomalous patch features, and the paper never measures how separable those feature distributions actually are. For fine-grained anomalies like subtle scratches or small lesions, overlap is plausible, and if the supports overlap, the total-variation argument collapses. Also, the theorems give existence of an equilibrium, not convergence, so the practical guarantee is even weaker than the stated result. On the empirical side, the industrial experiments train on elastically deformed normal images rather than real coarse-labeled anomalies, which is a weaker test of the central claim. The medical experiments do use real coarse labels, so the central claim is at least partially supported there. I do not see evidence of fitting to the test set; the held-out gains look genuine.\n\nDespite the theorem overclaim, the practical mechanism probably still helps—forcing the generator to output features on the normal manifold is enough to boost error maps—but the paper should state that weaker claim. This is work for researchers in weakly supervised anomaly detection, especially those building reconstruction-based detectors. It deserves a serious referee, but the revision needs to correct the theorem statement or the proof, and ideally measure the actual support overlap on the benchmarks.\n\nMy recommendation: send it to peer review, but flag the theoretical gap prominently. The empirical contribution is enough to warrant a revision, not a desk reject.","headline":"A practical weak-supervision method with solid medical results, but the patch-level alignment theorem proves less than claimed.","tokens_in":26330,"tokens_out":2755,"would_cite":true,"duration_ms":28324,"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":"This paper claims that a small, image-level-labeled anomaly set, used through energy-based adversarial learning, can align reconstructed features with normal features and thereby improve fine-grained anomaly detection and localization.","keywords":["visual anomaly detection","fine-grained defect localization","coarse anomaly knowledge","energy-based discriminator","adversarial learning","feature reconstruction","weakly supervised anomaly detection","medical image analysis"],"falsifier":"Measure the empirical total variation distance between the reconstructed patch features of anomalous images and the patch features of normal images after training; the theorem predicts this distance can be driven to zero at equilibrium, so a statistically significant remaining gap would falsify the alignment claim. As a complementary check, train the same model with deliberately shuffled image-level anomaly labels: if detection and localization improve just as much, the coarse labels are not doing the work the paper claims.","tokens_in":25385,"feed_emoji":"🔍","tokens_out":9770,"duration_ms":83267,"temperature":0.7,"pith_summary":"Reconstruction-based anomaly detectors learn to reproduce normal images and flag deviations, but neural autoencoders can also reconstruct defects, so error maps miss fine-grained anomalies. This paper claims that a small dataset of images known to be anomalous, labeled only at the image level, is enough to fix that weakness. The proposed method adds an energy-based discriminator that assigns low energy to normal features and high energy to anomalous and reconstructed features; the autoencoder is then pushed to output features that look normal even when the input is anomalous. A patch-level version treats every patch of an anomalous image as anomalous, and the paper proves that this noisy rule still aligns reconstructed patch features with normal patch features at equilibrium. On four medical and two industrial datasets the method improves both detection and localization compared with unsupervised reconstruction baselines and weakly supervised competitors.","feed_headline":"One adversarial trick makes autoencoders stop reconstructing defects","feed_subtitle":"With small image-level anomaly labels, an energy-based discriminator sharpens detection on six benchmarks.","key_machinery":"The load-bearing object is the energy-based discriminator, a network that maps a feature map or a spatial patch feature to a nonnegative energy value. It is trained with a hinge-style objective that pushes energy down on normal features and up on generated and anomalous features, while the autoencoder plays the generator and is rewarded for producing low-energy output. The patch-level variant applies the same per-layer discriminator at every spatial location, so each spatial feature vector acts as a patch feature; this is what allows localization without any patch-level labels. The proof machinery is a total-variation-distance argument: the optimal discriminator for each fixed generator is characterized via a Hahn decomposition bound, and substituting it into the generator loss shows the unique equilibrium places generated features exactly on the normal distribution.","core_discovery":"The paper's central claim is that coarse anomaly knowledge—knowing that an image is anomalous without knowing where—can be converted into a fine-grained localization signal for reconstruction-based detection. The conversion mechanism is distribution alignment: instead of merely enlarging reconstruction error on anomalous images, the autoencoder is trained so that its generated feature maps, whether computed from normal or anomalous inputs, follow the distribution of normal feature maps. The paper proves two equilibrium results for the proposed energy-based adversarial game. At the image level, there is a Nash equilibrium in which the generated feature distribution equals the normal feature distribution; at the patch level, even though an anomalous image is a mixture of normal and anomalous patches and the mixture ratio is unknown, there is again an equilibrium in which generated patch features match normal patch features. Consequently, at equilibrium the autoencoder 'repairs' anomalous regions into normal-looking features while leaving normal regions essentially unchanged, making the cosine-distance error map a reliable anomaly map.","pith_inferences":["The theorem's disjoint-support assumption suggests that the practical gain should track how well the pretrained features separate normal from anomalous patches; measuring that overlap with a classifier trained on held-out patches could predict when the method will help.","If the alignment story is the operative mechanism, the same energy-based regularizer should transfer to other reconstruction backbones and feature levels; a direct test is to swap ResNet features for another pretrained encoder and check whether the performance gain tracks alignment quality rather than architecture.","The patch-level result is essentially a noisy-label robustness theorem: treating all patches of an anomalous image as anomalous works even when most patches are normal, so the same principle could apply to other weakly supervised localization problems where negative bags contain mostly positives.","The industrial experiments rely on elastic distortions as stand-ins for defects; a natural extension is to generate pseudo-anomalies from normal images with local cuts, noise, or color shifts and use the same coarse-knowledge adversarial loss, making the method applicable where no real anomaly collection exists."],"forward_implications":["With as little as 1% of training images labeled anomalous at image level, the method raises image-level AUC over the unsupervised reconstruction baseline on the medical datasets, for example by 3.51% on ISIC2018 and by 7.63% on Chest X-ray.","Because the patch-level discriminator works without pixel labels, the same coarse-labeled anomaly set improves pixel-level localization, not just image-level detection, on medical and industrial data.","The benefit grows with the amount and variety of labeled anomalies: increasing the labeled anomaly ratio from 1% to 5% and the number of seen anomaly types from 1 to 3 consistently improves performance in the medical experiments.","The alignment perspective gives reconstruction-based detectors a principled way to use incomplete anomaly knowledge: at equilibrium, anomalous regions should be reconstructed as normal features, producing high error exactly where the defects are.","In the industrial setting, where no real anomaly images are available, the method is evaluated using elastically distorted normal images as pseudo-anomalies, and it remains competitive with strong unsupervised detectors."],"supporting_citations":[{"why":"Supplies the pretrained ResNet whose multi-scale feature maps are the objects reconstructed and aligned.","marker":"He et al. 2016"},{"why":"Supplies the adversarial min-max formulation that the energy-based discriminator/generator game is built on.","marker":"Goodfellow et al. 2014"},{"why":"Provides the MVTec industrial anomaly dataset with pixel-level masks used to evaluate detection and localization.","marker":"Bergmann et al. 2019"},{"why":"Provides the Visa industrial dataset used as the second industrial benchmark.","marker":"Zou et al. 2022"},{"why":"Provides the ISIC2018 skin-lesion image collection used as a medical benchmark.","marker":"Tschandl, Rosendahl, and Kittler 2018"},{"why":"Documents the ISIC2018 challenge protocol and categories used to define normal versus anomalous skin lesions.","marker":"Codella et al. 2019"},{"why":"Provides the Chest X-ray and OCT medical datasets used to evaluate detection.","marker":"Kermany et al. 2018"},{"why":"Defines the weakly supervised setting with a small labeled anomaly set, which the paper extends with coarse localization-aware training.","marker":"Ruff et al. 2019"}],"fun_headline_variants":["Coarse anomaly labels sharpen autoencoder detection maps","Image-level labels teach autoencoders where defects are","Adversarial alignment turns coarse labels into pixel maps","Proven: coarse labels give fine-grained anomaly detection","Autoencoders learn to repair defects with image-level labels"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"Everything depends on normal and anomalous image regions having completely separate learned features, on the adversarial training actually reaching the equilibrium whose existence is proved, and on elastically distorted normal images being a valid stand-in for real defects in the industrial experiments.","fun_headline_variants_meta":{"raw":{"variants":["Coarse anomaly labels sharpen autoencoder detection maps","Image-level labels teach autoencoders where defects are","Adversarial alignment turns coarse labels into pixel maps","Proven: coarse labels give fine-grained anomaly detection","Autoencoders learn to repair defects with image-level labels"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000319,"raw_usage":{"total_tokens":1788,"prompt_tokens":921,"completion_tokens":867,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":537,"completion_tokens_details":{"reasoning_tokens":791}},"tokens_in":537,"tokens_out":867,"duration_ms":7413,"temperature":1.0,"reasoning_tokens":791,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-11T13:39:57.396943+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Measure the empirical total variation distance between the reconstructed patch features of anomalous images and the patch features of normal images after training; the theorem predicts this distance can be driven to zero at equilibrium, so a statistically significant remaining gap would falsify the alignment claim. As a complementary check, train the same model with deliberately shuffled image-level anomaly labels: if detection and localization improve just as much, the coarse labels are not doing the work the paper claims.","supporting_citations":[{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Provides the Visa industrial dataset used as the second industrial benchmark."},{"cited_title":null,"cited_arxiv_id":null,"evidence_quote":"Provides the ISIC2018 skin-lesion image collection used as a medical benchmark."},{"cited_title":"S.; Goldbaum, M.; Cai, W.; Valentim, C","cited_arxiv_id":null,"evidence_quote":"Provides the Chest X-ray and OCT medical datasets used to evaluate detection."},{"cited_title":"o rnitz, N.; Binder, A.; M \\","cited_arxiv_id":null,"evidence_quote":"Defines the weakly supervised setting with a small labeled anomaly set, which the paper extends with coarse localization-aware training."}],"review_version":1}