Title: An Evidence-Based Post-Hoc Adjustment Framework for Anomaly Detection Under Data Contamination
Venue: NeurIPS 2025
Accepted: yes
Keywords: anomaly detection

anomaly

contamination

test-time adaptation
Abstract: Unsupervised anomaly detection (AD) methods typically assume clean training data, yet real-world datasets often contain undetected or mislabeled anomalies, leading to significant performance degradation. Existing solutions require access to the training pipelines, data or prior knowledge of the proportions of anomalies in the data, limiting their real-world applicability. To address this challenge, we propose EPHAD, a simple yet effective test-time adaptation framework that updates the outputs of AD models trained on contaminated datasets using evidence gathered at test time. Our approach integrates the prior knowledge captured by the AD model trained on contaminated datasets with evidence derived from multimodal foundation models like Contrastive Language-Image Pre-training (CLIP), classical AD methods like the Local Outlier Factor or domain-specific knowledge. We illustrate the intuition behind EPHAD using a synthetic toy example and validate its effectiveness through comprehensive experiments across eight visual AD datasets, twenty-six tabular AD datasets, and a real-world industrial AD dataset. Additionally, we conduct an ablation study to analyse hyperparameter influence and robustness to varying contamination levels, demonstrating the versatility and robustness of EPHAD across diverse AD models and evidence pairs. To ensure reproducibility, our code is publicly available at https://github.com/sukanyapatra1997/EPHAD.


Peer reviews:
comments: SUMMARY:
This paper proposes a test-time framework to adapt the scores learnt by anomaly detection models trained on contaminated training data using Bayesian inference. The method is tested on a variety of AD datasets and shows consistent improvement over anomaly detection performance with the base anomaly scores.

STRENGTHS AND WEAKNESSES:
The motivation for the methodology is well explained and clear.

The experiments are comprehensive across a wide variety of datasets, of different modalities and contexts (synthetic, tabular, image, industrial) and across a variety of base AD methods.

The methodology shows consistent and noticeable improvement in AD performance. 

No significant weaknesses to mention, except the authors could make more of an effort to provide context for this methodology within AD research. What other similar methods have been taken along this approach? How does this methodology improve upon those?

QUESTIONS:
How does this approach differ from and compare with other methods which address data contamination in anomaly detection?

LIMITATIONS:
Limitations are addressed but are fairly surface-level.
TITLE: Official Review
CLARITY: 3
IMPACT: 3
ORIGINALITY: 3
DATE: 2025-06-16

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper focuses on anomaly detection under data contamination. Through an evidence function, this paper proposes EPHAD, an inference-time adaptation framework that updates the outputs of AD models trained on contaminated datasets using evidence gathered at inference. Experiments are conducted on several popular datasets and show good performance.\n\nSTRENGTHS AND WEAKNESSES:\n1. The design of the Evidence Function constitutes the most critical part of the paper and decisively influences the results. However, the main text downplays this aspect. After reading the entire paper, it remains unclear how the Evidence Function was designed. This design should be discussed in detail as a central component of the main text.\n2. The supplementary materials describe the Evidence Function, revealing a severe contradiction in the paper's methodology. CLIP inherently supports zero-shot anomaly detection (e.g., WinCLIP [a], MVFA [b]), which is unaffected by contamination in training data. This suggests the authors merely combined methods that inherently ignore anomalous noise. Moreover, no experimental comparison was made with these CLIP-based approaches.\n3. Does using CLIP as the Evidence Function introduce data leakage? For instance, WinCLIP excels on MVTec but underperforms on datasets like MPDD. This is reflected in Table 1: when EPHAD is combined with RD and ULSAD, performance on MPDD deteriorates compared to not using EPHAD at all. Also, how EPHAD performs when it is used on datasets in other domains, such as medical data used in MVFA.\n4. The Introduction claims that existing methods rely on 'the contamination ratio.' However, these papers never mention such a ratio. Some use hyperparameters to set the proportion of anomalous noise removal, but this proportion ≠ the contamination ratio. Experiments confirm these hyperparameters minimally affect results, contradicting the authors' overstated dependency claims.\n\n[a] WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation. CVPR 2023.\n[b] Adapting Visual-Language Models for Generalizable Anomaly Detection in Medical Images. CVPR 2024.\n\nQUESTIONS:\nSee the weakness. The concerns are mainly from the design of the evidence function.\n\nLIMITATIONS:\nSee above.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-29"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work introduces a framework for correcting the posterior distribution of the inlier samples given a model that is trained with contaminated data. This framework, dubbed EPHAD, is based in a generalized Bayesian inference framework, using the a CLIP-based evidence function. EPHAD aims to perform test-time adaption by correcting the posterior via $p^c_{Y=+1} (x) = p^u_{Y=+1} (x) \\exp (T(X)/\\beta)$, where $p^u$ and $p^c$ are the uncorrected and corrected posterior probabilities. The work shows that using the EPHAD framework may help in improving the anomaly detection performance when the detectors are trained with contaminated data. Experimentation in tabular and image data is presented, with ablations for the introduced hyperparameters also shown. Additionally, the authors discuss the connection of their approach with inference-time alignment of generative models.\n\nSTRENGTHS AND WEAKNESSES:\nI think the paper is really well written and has a strong mathematical background, with the appropiated works cited and discussed. The motivation behind it is quite sound, and I completely agree with the claims made by the authors in the introduction and related work. Additionally, there are several experiments including toy examples, tabular data and images, showing that the proposed approach improves the metrics.\n\nHowever, I think I find a big flaw in the process that makes me go for a reject instead of an accept (which I would normally choose for a paper like this): your test-time adaption method is performed using the whole test set at the same time and then reporting the metrics using your adjustment framework. Specifically, you say: \"In practice, the posterior is inferred from test samples, so the sample size n is constrained by the number of available test points.\" Basically, the problem I find is that in Equation (11), the $t$ is obtained from the test set and then used to adjust the posterior probability. From my point of view, that is training, because you are using the whole test-set to adjust the posterior to have a better performance on that test set. Therefore, the improved results for EPHAD are clearly obtained because you looked at the test set and then adjusted to perform better in that test set. I think it would be better if you had a validation set to perform and obtain the values for Eq (11), or if you implemented EPHAD in a batch manner. I am willing to change my rate if the problem I'm exposing is solved or justified.\n\nOther minor weakneses:\n- It'd be great to expand a bit more in Lines L183-L185\n- L173: Should be Eq. (3), not (3)\n- L195-196: How do you choose the threshold?\n- Eq (13): I think you have an extra \"exp\"\n- L291: I think the $\\epsilon \\\\%$ should only be $\\epsilon$ \n- I would expand a bit more in how did you use the evidence function for the image datasets and move the \"Connection with inference-time alignment of generative models\" section to the appendix.\n\nQUESTIONS:\n- Why is it valid to use the entire test-set in one go as extra information to improve anomaly detection within the same test-set?\n\n- How would you use this technique in a real-world scenario? Do you need a set of test images beforehand?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 3, "DATE": "2025-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper addresses the problem of deploying unsupervised anomaly detection (AD) models that have been trained on datasets contaminated with anomalies without the possibility of retraining, modifying the model, or accessing the original training data. To tackle this, the authors propose EPHAD, a general post-hoc framework that adjusts model outputs at inference time using auxiliary evidence. The approach is formulated as a Bayesian correction, treating the original AD model as a prior and integrating external evidence (e.g., outputs from foundation models like CLIP) as likelihood signals. EPHAD supports both density-based and score-based AD models by estimating inlier probabilities in a statistically principled way using test-time rankings and a Beta posterior.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n\n- The paper addresses an important but underexplored real-world challenge: adapting AD models trained on contaminated data when retraining is not feasible. This reflects realistic deployment scenarios, such as in industry, where model internals and training data are often unavailable.\n\n- The paper draws a novel connection between post-hoc anomaly score correction and KL-regularized inference, as used in reward shaping for generative models and policy improvement in reinforcement learning (RL).\n\n- EPHAD’s use of auxiliary evidence functions offers flexibility across domains and modalities which makes it agnostic to the source of evidence and helps to incorporate external knowledge without modifying the base AD model.\n\n- The experiments convincingly show that EPHAD improves performance under contamination across diverse AD models, data modalities, and domains.\n\nWeaknesses:\n\n- **Thresholding Left Unspecified:** The paper uses thresholds λp and λs to make binary decisions but does not describe how these are chosen.\n\n- **No reporting of standard deviations in result table:** In Table 2 (tabular datasets), only mean AUROC scores are reported, with no variance across seeds.\n\n- **Lack of resource efficiency reporting or runtime metrics:** Despite promoting EPHAD as a practical test-time intervention, the paper provides no analysis of runtime overhead, memory usage, or latency—particularly when computationally expensive evidence functions like CLIP are used.\n\n- **Missing discussion of broader societal impacts:** The authors mark the broader impact section as “NA” without justification, despite the method being applicable to high-stakes domains such as industrial automation, medical diagnostics, or financial fraud detection.\n\nQUESTIONS:\n1. Can EPHAD be adapted for online settings? The score-based update requires estimating the empirical score distribution across the test batch. Is it feasible to apply EPHAD when samples arrive sequentially, and if so, how could the rank-based prior be computed incrementally?\n\n2. Why are standard deviations not reported in Table 2?\n\n3. What is the computational cost of EPHAD at inference time, especially when using large evidence models like CLIP?\n\n4. How is the decision threshold λ selected in the absence of labeled validation data? \n\n5. How does EPHAD handle cases where the evidence function T(x) is noisy? How robust is EPHAD if the evidence is misleading?\n\nLIMITATIONS:\n- The score-based variant of EPHAD requires access to a batch of test-time scores for rank-based estimation, which makes it unsuitable for online AD scenarios.\n\n- The framework depends on auxiliary evidence functions, whose quality significantly affects performance. Though some mitigation strategies are discussed, the method assumes that the evidence is broadly aligned with the true anomaly structure. \n\n- Although the method is designed for test-time use, some evidence functions such as CLIP may introduce non-trivial computational overhead.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-07-02"}