[Paper Review] Unsupervised Out-of-Distribution Detection with Diffusion Inpainting
This paper proposes Lift, Map, Detect (LMD), a novel unsupervised out-of-distribution (OOD) detection method that leverages pre-trained diffusion models for in-domain manifold mapping. By masking input images to 'lift' them from their original manifold and using diffusion inpainting to map them back, LMD detects OOD samples via the reconstruction distance between original and mapped images, achieving state-of-the-art performance on diverse datasets without retraining.
Unsupervised out-of-distribution detection (OOD) seeks to identify out-of-domain data by learning only from unlabeled in-domain data. We present a novel approach for this task - Lift, Map, Detect (LMD) - that leverages recent advancement in diffusion models. Diffusion models are one type of generative models. At their core, they learn an iterative denoising process that gradually maps a noisy image closer to their training manifolds. LMD leverages this intuition for OOD detection. Specifically, LMD lifts an image off its original manifold by corrupting it, and maps it towards the in-domain manifold with a diffusion model. For an out-of-domain image, the mapped image would have a large distance away from its original manifold, and LMD would identify it as OOD accordingly. We show through extensive experiments that LMD achieves competitive performance across a broad variety of datasets. Code can be found at https://github.com/zhenzhel/lift_map_detect.
Motivation & Objective
- To address the challenge of unsupervised OOD detection where only unlabeled in-domain data are available.
- To leverage the manifold-learning capability of pre-trained diffusion models for OOD detection without retraining.
- To develop a method that is robust across diverse data distributions, including varying color, resolution, and domain shift.
- To improve OOD detection performance by designing effective image lifting and mapping strategies.
Proposed method
- Lift: Corrupt input images by masking regions to remove them from their original data manifold.
- Map: Use a pre-trained diffusion model to perform inpainting and map the corrupted image toward the in-domain manifold.
- Detect: Compute a reconstruction distance metric (e.g., LPIPS) between the original and reconstructed image to assign an OOD score.
- Use multiple reconstruction attempts per image and aggregate via median to improve robustness and performance.
- Evaluate with multiple distance metrics (MSE, SSIM, LPIPS, SimCLRv2) to assess generalization and robustness.
- Explore alternative instantiations, such as diffusion-based lifting and denoising-based mapping, to validate framework versatility.

Experimental results
Research questions
- RQ1Can diffusion models be effectively repurposed for unsupervised OOD detection by leveraging their manifold mapping capability?
- RQ2Does masking-based image lifting combined with diffusion inpainting yield better OOD detection performance than alternative lifting methods?
- RQ3How do different image similarity metrics (e.g., LPIPS, SSIM, MSE, SimCLRv2) affect OOD detection performance across diverse datasets?
- RQ4What is the impact of multiple reconstruction attempts on detection robustness and AUC performance?
- RQ5Can the LMD framework generalize to alternative instantiations, such as noise-based lifting and denoising mapping?
Key findings
- LMD achieves state-of-the-art performance on multiple OOD detection benchmarks, with a mean ROC-AUC of 0.992 on CIFAR10 vs. SVHN using LPIPS as the distance metric.
- LPIPS consistently outperforms other distance metrics across all dataset pairs, demonstrating its effectiveness as a default choice for reconstruction distance.
- Increasing the number of reconstruction attempts from 1 to 10 significantly improves AUC, with performance saturating around 10 attempts, indicating the benefit of ensemble-like reconstruction.
- The alternative instantiation using diffusion-based lifting and denoising mapping achieves strong performance (AUC 0.976 on CIFAR10 vs. CIFAR100), confirming the framework’s generalizability beyond masking/inpainting.
- On CIFAR10 vs. CIFAR100, SimCLRv2-based distance outperforms other metrics by 0.09 AUC, suggesting domain-specific metric sensitivity despite LPIPS being the most consistent default.
- The method is versatile across datasets with varying color, resolution, and domain shift, demonstrating broad applicability without domain-specific tuning.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.