Research map / Image generation / Fast diffusion sampling
GOOD: Training-Free Guided Diffusion Sampling for Out-of-Distribution Detection
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes GOOD, a training-free method that steers Stable Diffusion sampling toward OOD regions using image-level (free energy) and feature-level (k-NN distance) gradients from an ID classifier, then uses the samples for outlier exposure and a unified OOD score.
Problem
Generating informative and diverse OOD samples for outlier exposure; existing text-conditioned diffusion methods perturb text embeddings, causing semantic instability and limited shift diversity.
Approach
Directly guide the diffusion denoising trajectory in pixel space with gradients of an off-the-shelf ID classifier's free energy and k-NN feature distance (via training-free guidance), and adaptively fuse image-level and feature-level OOD scores using a KL-based weight.
Key results
- On ImageNet-100, GOOD achieves average FPR95 17.68 and AUROC 96.30, versus 33.89 / 93.32 for the second-best NCIS.
- On CIFAR-100 with a 128x128 SD model, GOOD reaches average FPR95 19.50 and AUROC 94.68, versus 34.45 / 93.52 for FodFoM.
- Ablation on ImageNet-100: removing either guidance raises FPR95 from 17.70 to over 32; the unified OOD score gives the largest gain (AUROC 96.28).
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add feature-level guidance during synthesis (ablation) | GOOD · ImageNet-100 | FPR95: 32.23 -> 17.70 | Helped |
| add feature-level guidance during synthesis (ablation) | GOOD · ImageNet-100 | AUROC: 92.29 -> 96.28 | Helped |
| add image-level guidance during synthesis (ablation) | GOOD · ImageNet-100 | FPR95: 32.93 -> 17.70 | Helped |
| add image-level guidance during synthesis (ablation) | GOOD · ImageNet-100 | AUROC: 91.98 -> 96.28 | Helped |
| add unified image- and feature-level OOD scoring instead of energy-only detection (ablation) | GOOD with both guidance types · ImageNet-100 | AUROC: 92.81 -> 96.28 | Helped |
| use balanced sampling across step sizes rather than a single configuration (ablation) | GOOD · ImageNet-100 | AUROC | Helped |
| increase regularization weight λ (ablation) | GOOD outlier-exposure training · ImageNet-100 | AUROC | Helped |
| increase regularization weight λ (ablation) | GOOD outlier-exposure training · ImageNet-100 | ID accuracy | Hurt |
| adaptively set the unified-score weight w using KL divergence (ablation) | GOOD · OOD detection across diverse OOD scenarios | OOD detection robustness | Helped |
| vary k from 50 to 500 for k-NN distance (ablation) | GOOD feature-level OOD scoring · ImageNet-100 | AUROC: around 96.2 | No clear effect |
| increase Gaussian smoothing strength γ̄ (ablation) | GOOD diffusion guidance · ImageNet-100 and CIFAR-100 | energy-score distribution stability | Mixed |
| use the 128×128 rather than 512×512 diffusion model | GOOD · CIFAR-100 (average) | FPR95: 25.66 -> 19.50 | Helped |
Surprising findings
- A smaller 128x128 Stable Diffusion model outperforms the 512x512 model on CIFAR-100, attributed to resolution mismatch and information loss during resizing.
Limitations
- Relies on the distribution learned by pre-trained diffusion models, which may limit outlier diversity.
- Textures-type shifts are hard for pixel-level synthesis methods since Stable Diffusion struggles to generate similar features; GOOD slightly trails NPOS on Textures.
Experimental setup
Datasets: ImageNet-100 CIFAR-100 iNaturalist SUN Places Textures SVHN LSUN-R ISUN
Benchmarks: ImageNet-100 OOD (iNaturalist, Places, SUN, Textures) CIFAR-100 OOD (SVHN, Places365, LSUN-R, ISUN, Textures)
Metrics: FPR95 AUROC ID accuracy
Baselines: MSP ODIN Mahalanobis Energy G-ODIN kNN ViM ReAct DICE GAN VOS NPOS
Builds on: Dream-OOD Training-Free Guidance (TFG) Outlier Exposure DDIM Energy-based OOD detection
Closest papers by meaning
- Image Background Serves as Good Proxy for Out-of-distribution Data (ICLR 2024 · similarity 0.89)
- Elucidating the design space of classifier-guided diffusion generation (ICLR 2024 · similarity 0.89)
- Diffusion-based Semantic Outlier Generation via Nuisance Awareness for Out-of-Distribution Detection (AAAI 2025 · similarity 0.89)
- A Systematic Analysis of Out-of-Distribution Detection Under Representation and Training Paradigm Shifts (NeurIPS 2026 · similarity 0.88)
- Diffusion-based Layer-wise Semantic Reconstruction for Unsupervised Out-of-Distribution Detection (NeurIPS 2024 · similarity 0.88)
- BOOD: Boundary-based Out-Of-Distribution Data Generation (ICML 2025 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
