{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/unsupervised-out-of-distribution-detection-1","title":"Unsupervised Out-of-Distribution Detection with Diffusion Inpainting","arxiv_id":"2302.10326","date":"2023-02-20","proceeding":null,"authors":["Zhenzhen Liu","Jin Peng Zhou","Yufan Wang","Kilian Q. Weinberger"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2302.10326v2","url_pdf":"https://arxiv.org/pdf/2302.10326v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"unsupervised-out-of-distribution-detection-1","repo_url":"https://github.com/zhenzhel/lift_map_detect","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2302.10326","atlas_url":"https://app.syntology.ai/?focus=2302.10326","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.10326"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/microsoft/SimMIM","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhenzhel/lift_map_detect","reach":null}],"summary":{"ran":2,"ran_draft_wrong":3,"ran_honours":1,"ran_fixture":1,"unverified":6},"by_repo_kind":{"official":{"samples":13,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"9fbf2bcfe266f4eb","entry":"NoneCorrector","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9fbf2bcfe266f4eb"}},{"code_sha256_prefix":"23801547159a0cde","entry":"NonePredictor","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23801547159a0cde"}},{"code_sha256_prefix":"6c419026e778dee2","entry":"get_data_inverse_scaler","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6c419026e778dee2"}},{"code_sha256_prefix":"346d2e6cc8b48a5d","entry":"get_data_scaler","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"346d2e6cc8b48a5d"}},{"code_sha256_prefix":"e9b0be8f6581cb5e","entry":"get_pc_inpainter","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e9b0be8f6581cb5e"}},{"code_sha256_prefix":"134293ad842ab4e6","entry":"lpips_scaler","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"detect.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/detect.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"134293ad842ab4e6"}},{"code_sha256_prefix":"74fd9b4740562d25","entry":"shared_predictor_update_fn","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"74fd9b4740562d25"}},{"code_sha256_prefix":"8d49d40d9988b215","entry":"Corrector","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8d49d40d9988b215"}},{"code_sha256_prefix":"33bb242d2a46a8af","entry":"Detector","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"33bb242d2a46a8af"}},{"code_sha256_prefix":"60424db455a86fdc","entry":"Predictor","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"60424db455a86fdc"}},{"code_sha256_prefix":"e476e461754cc223","entry":"get_corrector","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e476e461754cc223"}},{"code_sha256_prefix":"2fa0834d22aee527","entry":"shared_corrector_update_fn","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"recon.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/recon.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2fa0834d22aee527"}},{"code_sha256_prefix":"de5c88ea9339be33","entry":"simclr_resize","repo":"zhenzhel/lift_map_detect","repo_kind":"official","path":"detect.py","file_url":"https://github.com/zhenzhel/lift_map_detect/blob/HEAD/detect.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"de5c88ea9339be33"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}