{"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/diffusion-prior-based-amortized-variational","title":"Diffusion Prior-Based Amortized Variational Inference for Noisy Inverse Problems","arxiv_id":"2407.16125","date":"2024-07-23","proceeding":null,"authors":["Sojin Lee","Dogyun Park","Inho Kong","Hyunwoo J. Kim"],"abstract":"Recent studies on inverse problems have proposed posterior samplers that leverage the pre-trained diffusion models as powerful priors. These attempts have paved the way for using diffusion models in a wide range of inverse problems. However, the existing methods entail computationally demanding iterative sampling procedures and optimize a separate solution for each measurement, which leads to limited scalability and lack of generalization capability across unseen samples. To address these limitations, we propose a novel approach, Diffusion prior-based Amortized Variational Inference (DAVI) that solves inverse problems with a diffusion prior from an amortized variational inference perspective. Specifically, instead of separate measurement-wise optimization, our amortized inference learns a function that directly maps measurements to the implicit posterior distributions of corresponding clean data, enabling a single-step posterior sampling even for unseen measurements. Extensive experiments on image restoration tasks, e.g., Gaussian deblur, 4$\\times$ super-resolution, and box inpainting with two benchmark datasets, demonstrate our approach's superior performance over strong baselines. Code is available at https://github.com/mlvlab/DAVI.","url_abs":"https://arxiv.org/abs/2407.16125v1","url_pdf":"https://arxiv.org/pdf/2407.16125v1.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":"diffusion-prior-based-amortized-variational","repo_url":"https://github.com/mlvlab/davi","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diffusion-prior-based-amortized-variational","repo_url":"https://github.com/kdhRick2222/Exposure-slot","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"colorization","task_name":"Colorization"},{"task_slug":"deblurring","task_name":"Deblurring"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"image-colorization","task_name":"Image Colorization"},{"task_slug":"image-deblurring","task_name":"Image Deblurring"},{"task_slug":"image-inpainting","task_name":"Image Inpainting"},{"task_slug":"image-restoration","task_name":"Image Restoration"},{"task_slug":"image-super-resolution","task_name":"Image Super-Resolution"},{"task_slug":"super-resolution","task_name":"Super-Resolution"},{"task_slug":"variational-inference","task_name":"Variational Inference"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"pixel-prediction","method_name":"Inpainting"},{"method_slug":"variational-inference","method_name":"Variational Inference"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-super-resolution-on-imagenet","task":"Image Super-Resolution","dataset":"ImageNet","model":"DAVI","rank_in_archive_order":1,"of":6,"metrics":{"FID":"36.27","PSNR":"26.58"},"uses_additional_data":true}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.16125","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.16125"}},"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/kdhRick2222/Exposure-slot","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mlvlab/davi","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":11,"ran_draft_wrong":5,"ran_honours":2,"ran_fixture":3,"unverified":6},"by_repo_kind":{"official":{"samples":22,"ran":16,"repositories":1},"listed":{"samples":5,"ran":5,"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":5,"samples":[{"code_sha256_prefix":"984662e094837171","entry":"adopt_weight","repo":"mlvlab/davi","repo_kind":"official","path":"cm/losses_perceptual.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/losses_perceptual.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"984662e094837171"}},{"code_sha256_prefix":"cfd76fd0d89574a4","entry":"approx_standard_normal_cdf","repo":"mlvlab/davi","repo_kind":"official","path":"cm/losses.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/losses.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cfd76fd0d89574a4"}},{"code_sha256_prefix":"4e2ac192b520c457","entry":"args_to_dict","repo":"mlvlab/davi","repo_kind":"official","path":"cm/script_util.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/script_util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e2ac192b520c457"}},{"code_sha256_prefix":"34b00ecd08c7ba1b","entry":"betas_for_alpha_bar","repo":"mlvlab/davi","repo_kind":"official","path":"cm/gaussian_diffusion.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/gaussian_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"34b00ecd08c7ba1b"}},{"code_sha256_prefix":"515cde57deed08fc","entry":"calculate_psnr","repo":"kdhRick2222/Exposure-slot","repo_kind":"listed","path":"utils/util.py","file_url":"https://github.com/kdhRick2222/Exposure-slot/blob/HEAD/utils/util.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":"515cde57deed08fc"}},{"code_sha256_prefix":"1133984dd494a9ec","entry":"compute_gaussian_product_coef","repo":"mlvlab/davi","repo_kind":"official","path":"cm/gaussian_diffusion.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/gaussian_diffusion.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1133984dd494a9ec"}},{"code_sha256_prefix":"d86ff56b426bbadf","entry":"compute_psnr_ssim","repo":"kdhRick2222/Exposure-slot","repo_kind":"listed","path":"utils/util.py","file_url":"https://github.com/kdhRick2222/Exposure-slot/blob/HEAD/utils/util.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":"d86ff56b426bbadf"}},{"code_sha256_prefix":"a62c060cb1728fa2","entry":"cropping_patch","repo":"kdhRick2222/Exposure-slot","repo_kind":"listed","path":"utils/util.py","file_url":"https://github.com/kdhRick2222/Exposure-slot/blob/HEAD/utils/util.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":"a62c060cb1728fa2"}},{"code_sha256_prefix":"cd33283d615fb3d7","entry":"discretized_gaussian_log_likelihood","repo":"mlvlab/davi","repo_kind":"official","path":"cm/losses.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/losses.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cd33283d615fb3d7"}},{"code_sha256_prefix":"3c90fb7e207ec90c","entry":"get_named_beta_schedule","repo":"mlvlab/davi","repo_kind":"official","path":"cm/gaussian_diffusion.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/gaussian_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c90fb7e207ec90c"}},{"code_sha256_prefix":"e41367ad14ff58fd","entry":"get_param_groups_and_shapes","repo":"mlvlab/davi","repo_kind":"official","path":"cm/fp16_util.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/fp16_util.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e41367ad14ff58fd"}},{"code_sha256_prefix":"22a83df891d750c6","entry":"hinge_d_loss","repo":"mlvlab/davi","repo_kind":"official","path":"cm/losses_perceptual.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/losses_perceptual.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"22a83df891d750c6"}},{"code_sha256_prefix":"e20dd5102da3b050","entry":"make_master_params","repo":"mlvlab/davi","repo_kind":"official","path":"cm/fp16_util.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/fp16_util.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e20dd5102da3b050"}},{"code_sha256_prefix":"bcd8b4acab199405","entry":"make_output_format","repo":"mlvlab/davi","repo_kind":"official","path":"cm/logger.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/logger.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bcd8b4acab199405"}},{"code_sha256_prefix":"cf2798b666b231ca","entry":"normal_kl","repo":"mlvlab/davi","repo_kind":"official","path":"cm/losses.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/losses.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf2798b666b231ca"}},{"code_sha256_prefix":"9b6e4e070473e76f","entry":"space_timesteps","repo":"mlvlab/davi","repo_kind":"official","path":"cm/respace.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/respace.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9b6e4e070473e76f"}},{"code_sha256_prefix":"82a15cc1e46f7e4d","entry":"to_3d","repo":"kdhRick2222/Exposure-slot","repo_kind":"listed","path":"network_level2.py","file_url":"https://github.com/kdhRick2222/Exposure-slot/blob/HEAD/network_level2.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"82a15cc1e46f7e4d"}},{"code_sha256_prefix":"b20f2a5df739a59e","entry":"to_4d","repo":"kdhRick2222/Exposure-slot","repo_kind":"listed","path":"network_level2.py","file_url":"https://github.com/kdhRick2222/Exposure-slot/blob/HEAD/network_level2.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b20f2a5df739a59e"}},{"code_sha256_prefix":"64fff1e30802b815","entry":"unflatten_master_params","repo":"mlvlab/davi","repo_kind":"official","path":"cm/fp16_util.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/fp16_util.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"64fff1e30802b815"}},{"code_sha256_prefix":"263c54290c553ddd","entry":"vanilla_d_loss","repo":"mlvlab/davi","repo_kind":"official","path":"cm/losses_perceptual.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/losses_perceptual.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"263c54290c553ddd"}},{"code_sha256_prefix":"129b804760b3115f","entry":"zero_module","repo":"mlvlab/davi","repo_kind":"official","path":"cm/nn.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/nn.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"129b804760b3115f"}},{"code_sha256_prefix":"ecd0fc28815b65ae","entry":"avg_pool_nd","repo":"mlvlab/davi","repo_kind":"official","path":"cm/nn.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/nn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ecd0fc28815b65ae"}},{"code_sha256_prefix":"fe4eb545bbb728e0","entry":"conv_nd","repo":"mlvlab/davi","repo_kind":"official","path":"cm/nn.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/nn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe4eb545bbb728e0"}},{"code_sha256_prefix":"cbc1f853e2a39b1c","entry":"create_model","repo":"mlvlab/davi","repo_kind":"official","path":"cm/script_util.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/script_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cbc1f853e2a39b1c"}},{"code_sha256_prefix":"df72d0c85cc7f5ed","entry":"create_named_schedule_sampler","repo":"mlvlab/davi","repo_kind":"official","path":"cm/resample.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/resample.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"df72d0c85cc7f5ed"}},{"code_sha256_prefix":"e515a67f7f32e76d","entry":"mpi_weighted_mean","repo":"mlvlab/davi","repo_kind":"official","path":"cm/logger.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/logger.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e515a67f7f32e76d"}},{"code_sha256_prefix":"0c6607473a4c4c55","entry":"profile","repo":"mlvlab/davi","repo_kind":"official","path":"cm/logger.py","file_url":"https://github.com/mlvlab/davi/blob/HEAD/cm/logger.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0c6607473a4c4c55"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}