Title: GOOD: Training-Free Guided Diffusion Sampling for Out-of-Distribution Detection
Venue: NeurIPS 2025
Accepted: yes
Keywords: OOD detection

Diffusion Model

Guided Sampling
Abstract: Recent advancements have explored text-to-image diffusion models for synthesizing out-of-distribution (OOD) samples, substantially enhancing the performance of OOD detection. However, existing approaches typically rely on perturbing text-conditioned embeddings, resulting in semantic instability and insufficient shift diversity, which limit generalization to realistic OOD. To address these challenges,  we propose GOOD, a novel and flexible framework that directly guides diffusion sampling trajectories towards OOD regions using off-the-shelf in-distribution (ID) classifiers. GOOD incorporates dual-level guidance: (1) Image-level guidance based on the gradient of log partition to reduce input likelihood, drives samples toward low-density regions in pixel space. (2) Feature-level guidance, derived from k-NN distance in the classifier’s latent space, promotes sampling in feature-sparse regions. Hence, this dual-guidance design enables more controllable and diverse OOD sample generation. Additionally, we introduce a unified OOD score that adaptively combines image and feature discrepancies, enhancing detection robustness. We perform thorough quantitative and qualitative analyses to evaluate the effectiveness of GOOD, demonstrating that training with samples generated by GOOD can notably enhance OOD detection performance.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a novel framework GOOD which harnesses diffusion models to generate OOD images to improve machine learning models' OOD detection performance. During the process of synthesizing images, GOOD combines image-level and feature-level guidances, forcing the diffusion model to sample towards OOD regions. Compared to previous methodologies, GOOD does not involve ID embedding alignment, which reduces computational costs. GOOD also achieve wonderful SOTA performance on ImageNet and CIFAR datasets.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n\n    1. The paper provides various of high-quality images including framework and insightful visualizations.\n\n    2. The authors include clear hyperparameters analysis and ablation studies, which help to understand the effectiveness of difference sections of the framework deeply. The experimental setup also provides detailed training parameters, making the reproduction easier.\n\n    3. This methodology does not require embedding alignment, reducing computational cost in a novel way. The proposed method demonstrates superior performance compared to existing techniques on the evaluated datasets.\n\n    4. The paper provides an in-depth analysis of OOD datasets, revealing the relationship between the model's performance and the distributions of OOD datasets.\n\nWeaknesses:\n\n    1. While the explanation of the TFG framework is provided in the appendix, its inclusion in the main body of the paper is essential for clarity. A brief mention in Section 3.2 and Algorithm 1 is insufficient, leaving the methodology unclear to the reader.\n\n    2. The framework's reliance on a large number of hyperparameters may complicate the fine-tuning process, potentially hindering its practical application and adoption.\n\n    3. In table 2, the dataset \"PLACES365\" has a typo.\n\nQUESTIONS:\n1. Could the authors clarify the potential reasons why GOOD shows comparatively worse performance on PLACES365 compared to FodFoM?\n2. Could the authors provide the performance metrics of other OOD detection methods when integrated with the proposed unified OOD score?\n3. Why generating 12500 GOOD<sub>img</sub> while generating 10500 GOOD<sub>feat</sub>? Is there a theoretical basis for this imbalance, and how does the quantity of synthesized OOD images impact overall performance?\n4. I wonder how does the choice of ID classifier affect the performance of OOD detection?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 2, "IMPACT": 4, "ORIGINALITY": 3, "DATE": "2025-06-30"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a framework, GOOD, for synthesizing outliers for outlier-exposure based OOD detection. It generates OOD samples using text-to-image diffusion through both classifier-based pixel-level guidance and KNN-based feature-level guidance. To improve performance, GOOD uses varying sampling parameters when synthesizing samples, and uses a combination of likelihood- and distance-based OOD score at test time. Experimental results show that GOOD achieves competitive performance compared to existing methods.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n* The proposed method is technically sound. \n* Experimental results show that the proposed method attains strong and consistent performance compared to baselines.\n* Ablation studies are extensive, and analysis and visualizations provide intuitive ways of understanding the proposed method.\n\nWeaknesses:\n* The technical novelty is somewhat limited, where various individual components of the proposed framework are built upon existing techniques. For instance, the outlier synthesis part involves a relatively straightforward application of diffusion guided generation, and the unified OOD score is an ensemble of likelihood and KNN distance, two well-established OOD scoring methods.\n* GOOD involves two orthogonal aspects, outlier synthesis and OOD scoring (the unified score). This could make comparison with some baselines like DreamOOD not immediately straightforward, as they focus primarily on outlier synthesis and default to simple metrics for OOD scoring. It would be helpful to see experiments and analysis with more direct and disentangled comparisons, e.g. by holding the OOD scoring part constant and isolating the effect of the outlier synthesis quality. (More details in Question 2 below.)\n\nQUESTIONS:\n* For ablation studies in Table 3, it would be helpful to have more clarifications on what configuration each row corresponds to exactly. For (2) and (3), do they include the balanced sampling and unified OOD score components (i.e. everything without image/feature guidance), or are they ID classifier + outlier exposure with image/feature guidance samples? For row (4), is it the full GOOD framework (5) without the unified OOD score (the number seems to correspond to a=0 in Figure 6(b))? \n* GOOD involves two distinct and somewhat orthogonal aspects, outlier synthesis and OOD scoring. This could make it hard to draw direct comparisons with various existing methods by just looking at the final performance: For instance, baselines like DreamOOD focus primarily on outlier synthesis, and default to simple scorings like using the OOD classifier output for OOD detection. Meanwhile, existing works like [1] and [2] have looked into combining multiple metrics for OOD scoring, although in a different setting. Since the paper seems to be motivated from the perspective of outlier synthesis methodology, it would be helpful to see direct comparisons with the baselines by holding the scoring function constant and using different synthesized outliers, to isolate the effect of synthesizing quality.\n\n    * Specifically, what prompted this question is that in Figure 6(b), the major performance gain comes from the combination of energy and distance based OOD score. When a=0 (i.e. only free energy is used), GOOD’s performance seems only marginally better than the baselines. This raises some concerns of how much the proposed synthesis method helps vs. just combining multiple OOD metrics.\n\n[1] Bergamin et al. \"Model-agnostic out-of-distribution detection using combined statistical tests.\" AISTATS 2022.\n\n[2] Park et al. \"Nearest neighbor guidance for out-of-distribution detection.\" ICCV 2023.\n\nLIMITATIONS:\nYes the authors have discussed limitations.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 2, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-07-02"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes an OOD-detection method for classifiers based on two fundamental signals - the *free energy* or log-sum-exp of a classifier's logits, and proximity to in-distribution data in the model's intermediate embedding spaces. These signals are operationalized in 2 high-level ways:\n1. As guidance terms for the generation of outliers from a pretrained diffusion model and\n2. As individual scores which can be combined into an OOD detection metric.\n\nTo build an OOD detector, the authors first train a model using outlier exposure on samples generated by (1), and then detect samples using the OOD score (2). This combo yields near-uniform outperformance across ID-OOD dataset pairs.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths\n- A lot of care is taken to explain the idea through detailed imagery and clear writing.\n- Well-designed experiments and ablation studies.\n- The method is carefully designed and performs well across the board. In my opinion, there is genuine novelty here and it's tough to argue with these results.\n\nWeaknesses\n- Your given likelihood-based motivation needs to be recalibrated a bit for GOOD_img  and the $E$ score. Your comment (L114) that \"the negative log-sum-exp of the logits ... is proportional to the negative log-likelihood of the input\" is not true - one needs to train a discriminative model in a very specific way for this proportionality to hold (e.g. as in [A]). (The NeurIPS 2020 edition of your citation [34] makes this claim erroneously, and its April 2021 arXiv update has been revised to remove this claim.) Your argument that this term somehow represents likelihood is thus dubious.\n- This paper is something of a bag of tricks and isn't firmly grounded on generalizable insights for OOD detection. Performance here is very good but the ideas in this work might have a short half-life. More extensive exposition in the intro, experiments, and conclusion about the big picture ideas driving your work, e.g. about why both \"image-level\" and \"feature-level\" signal is necessary for good OOD detection, should help here.\n\nOnce these weaknesses are adequately addressed, I'll raise my score.\n\n[A] Grathwohl, Will, et al. \"Your classifier is secretly an energy based model and you should treat it like one.\" _International Conference on Learning Representations_.\n\nQUESTIONS:\nYou have demonstrated convincingly that both guidance strategies as well as the unified OOD score are necessary for strong performance. However, I don't see much in the way of high-level takeaways from these components. How can your insights here guide the design of future OOD detection algorithms?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-07-02"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a framework (GOOD) for OOD detection that synthesizes diverse and informative OOD samples by directly guiding the sampling trajectory of diffusion models. GOOD leverages classifiers to provide dual-level guidance: (1) image-level guidance based on input likelihood gradients, and (2) feature-level guidance using k-nearest neighbor distances in latent space. A unified OOD score combining both guidance signals is introduced for robust detection. Experiments on ImageNet-100 and CIFAR-100 demonstrate that training classifiers with GOOD-generated samples significantly improves OOD detection performance, achieving state-of-the-art results in FPR95 and AUROC across multiple datasets.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths: \n1.The paper is well-written and clearly structured, with comprehensive figures.\n2.The method introduces a combination of image-level and feature-level guidance for diffusion sampling, for generating OOD samples.\n3.Experiments on benchmark datasets show that GOOD achieves state-of-the-art results.\n\nWeakness: \n\n1.  The method is validated on the toy examples for OOD detection. Can it be validated on any real OOD application scenario? \n\n2. The performance of the synthesized OOD samples depend heavily on the capabilities of the pretrained diffusion model and the classification method. In particular, these models may struggle to generate OOD samples for certain domains. This likely explains its relatively lower performance on the Textures dataset.\n\n3. The method involves several tunable hyperparameters—such as guidance strengths, condition strength, k-NN neighborhood size, and OOD loss weight. While the authors conduct ablation studies to analyze their effects, the overall sensitivity to these hyperparameters remains relatively high and may hinder generalization across tasks without careful tuning.\n\n4. Despite being training-free, GOOD requires diffusion sampling, which is computationally expensive. This may limit its practicality in low-resource settings. It would be helpful if the authors provided a detailed comparison of inference time or computational cost with other OOD detection methods.\n\nQUESTIONS:\n1. It is unclear under which assumption that  the generated OOD sample can be regarded as real OOD samples and is there  any  evidence that the generated samples by the proposed methods are approximating OOD samples in some sense?  Also visually the generated ones are semantically close to Id data, so is there any analysis/insight that what kind of OOD samples can be effectively detected by this method?\n\n2.\tCan the authors provide a comparison of the efficiency of GOOD with other OOD detection methods? A direct evaluation of runtime or resource usage would help clarify the practical cost of the proposed approach.\n\n3.   Can the method be validated on a real-world OOD detection task， for example a medical  image anomaly (rare-disease) application?\n\n4.\tIs it possible to introduce a general strategy for selecting the multiple hyperparameters involved in GOOD? Given the number of tunable hyperparameters, a general guideline would enhance the usability and robustness of the GOOD framework.\n\nLIMITATIONS:\nMy main concerns are outlined in the questions above.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 3, "DATE": "2025-07-03"}