{"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/adapt-and-diffuse-sample-adaptive","title":"Adapt and Diffuse: Sample-adaptive Reconstruction via Latent Diffusion Models","arxiv_id":"2309.06642","date":"2023-09-12","proceeding":null,"authors":["Zalan Fabian","Berk Tınaz","Mahdi Soltanolkotabi"],"abstract":"Inverse problems arise in a multitude of applications, where the goal is to recover a clean signal from noisy and possibly (non)linear observations. The difficulty of a reconstruction problem depends on multiple factors, such as the ground truth signal structure, the severity of the degradation and the complex interactions between the above. This results in natural sample-by-sample variation in the difficulty of a reconstruction problem. Our key observation is that most existing inverse problem solvers lack the ability to adapt their compute power to the difficulty of the reconstruction task, resulting in subpar performance and wasteful resource allocation. We propose a novel method, $\\textit{severity encoding}$, to estimate the degradation severity of corrupted signals in the latent space of an autoencoder. We show that the estimated severity has strong correlation with the true corruption level and can provide useful hints on the difficulty of reconstruction problems on a sample-by-sample basis. Furthermore, we propose a reconstruction method based on latent diffusion models that leverages the predicted degradation severities to fine-tune the reverse diffusion sampling trajectory and thus achieve sample-adaptive inference times. Our framework, Flash-Diffusion, acts as a wrapper that can be combined with any latent diffusion-based baseline solver, imbuing it with sample-adaptivity and acceleration. We perform experiments on both linear and nonlinear inverse problems and demonstrate that our technique greatly improves the performance of the baseline solver and achieves up to $10\\times$ acceleration in mean sampling speed.","url_abs":"https://arxiv.org/abs/2309.06642v3","url_pdf":"https://arxiv.org/pdf/2309.06642v3.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":"adapt-and-diffuse-sample-adaptive","repo_url":"https://github.com/z-fabian/flash-diffusion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"image-deblurring","task_name":"Image Deblurring"},{"task_slug":"image-inpainting","task_name":"Image Inpainting"},{"task_slug":"image-reconstruction","task_name":"Image Reconstruction"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"latent-diffusion-model","method_name":"Latent Diffusion Model"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.06642","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.06642"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/z-fabian/flash-diffusion","reach":{"status":"ok"}}],"summary":{"ran":7,"unverified":1},"by_repo_kind":{"official":{"samples":8,"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":8,"samples":[{"code_sha256_prefix":"f0f495024637e277","entry":"add_data_specific_args","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"pl_modules/image_data_module.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/pl_modules/image_data_module.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f0f495024637e277"}},{"code_sha256_prefix":"c38aca41f009e0e0","entry":"create_noise_schedule","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"data_utils/operators.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/data_utils/operators.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c38aca41f009e0e0"}},{"code_sha256_prefix":"f8dee44cef535c69","entry":"get_fname","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"data_utils/image_data.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/data_utils/image_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f8dee44cef535c69"}},{"code_sha256_prefix":"8edb5334a3ff0a67","entry":"load_ids_from_txt","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"data_utils/image_data.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/data_utils/image_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8edb5334a3ff0a67"}},{"code_sha256_prefix":"0e2aa355c1e01fce","entry":"mse","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"data_utils/metrics.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/data_utils/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0e2aa355c1e01fce"}},{"code_sha256_prefix":"72801f6286d3dbe7","entry":"nmse","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"data_utils/metrics.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/data_utils/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"72801f6286d3dbe7"}},{"code_sha256_prefix":"f955b7c56a0215c9","entry":"psnr","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"data_utils/metrics.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/data_utils/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f955b7c56a0215c9"}},{"code_sha256_prefix":"cafa482ab0d0db05","entry":"create_operator","repo":"z-fabian/flash-diffusion","repo_kind":"official","path":"data_utils/operators.py","file_url":"https://github.com/z-fabian/flash-diffusion/blob/HEAD/data_utils/operators.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cafa482ab0d0db05"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}