{"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-normalizing-flow","title":"Diffusion Normalizing Flow","arxiv_id":"2110.07579","date":"2021-10-14","proceeding":"NeurIPS 2021 12","authors":["Qinsheng Zhang","Yongxin Chen"],"abstract":"We present a novel generative modeling method called diffusion normalizing flow based on stochastic differential equations (SDEs). The algorithm consists of two neural SDEs: a forward SDE that gradually adds noise to the data to transform the data into Gaussian random noise, and a backward SDE that gradually removes the noise to sample from the data distribution. By jointly training the two neural SDEs to minimize a common cost function that quantifies the difference between the two, the backward SDE converges to a diffusion process the starts with a Gaussian distribution and ends with the desired data distribution. Our method is closely related to normalizing flow and diffusion probabilistic models and can be viewed as a combination of the two. Compared with normalizing flow, diffusion normalizing flow is able to learn distributions with sharp boundaries. Compared with diffusion probabilistic models, diffusion normalizing flow requires fewer discretization steps and thus has better sampling efficiency. Our algorithm demonstrates competitive performance in both high-dimension data density estimation and image generation tasks.","url_abs":"https://arxiv.org/abs/2110.07579v1","url_pdf":"https://arxiv.org/pdf/2110.07579v1.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-normalizing-flow","repo_url":"https://github.com/qsh-zh/DiffFlow","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"density-estimation","task_name":"Density Estimation"},{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.07579","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.07579"}},"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/qsh-zh/DiffFlow","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran_violates":2,"ran_fixture":1,"ran_honours":1,"unverified":4},"by_repo_kind":{"official":{"samples":10,"ran":6,"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":"c3a6b977022957cb","entry":"Normalize","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"networks/official_unet.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/networks/official_unet.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":"c3a6b977022957cb"}},{"code_sha256_prefix":"fbf9ec7be545688e","entry":"default","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"networks/unet.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/networks/unet.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fbf9ec7be545688e"}},{"code_sha256_prefix":"608e364a9d2376a3","entry":"exists","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"networks/unet.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/networks/unet.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"608e364a9d2376a3"}},{"code_sha256_prefix":"cb49209c125de1b4","entry":"get_timestep_embedding","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"networks/official_unet.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/networks/official_unet.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb49209c125de1b4"}},{"code_sha256_prefix":"3137073275f8c21a","entry":"nonlinearity","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"networks/official_unet.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/networks/official_unet.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":"3137073275f8c21a"}},{"code_sha256_prefix":"4f66ae7f14b3b240","entry":"num_to_groups","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"networks/unet.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/networks/unet.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f66ae7f14b3b240"}},{"code_sha256_prefix":"4c7cbed22aeb45c7","entry":"batch_noise_square","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"networks/base_model.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/networks/base_model.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":"4c7cbed22aeb45c7"}},{"code_sha256_prefix":"2cd9e9d505aef965","entry":"fix_drift_optimizer","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"modules/optimizers.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/modules/optimizers.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":"2cd9e9d505aef965"}},{"code_sha256_prefix":"e1cf3c0623b93689","entry":"get_tune_optimizer","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"modules/optimizers.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/modules/optimizers.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":"e1cf3c0623b93689"}},{"code_sha256_prefix":"3d6250d220278baf","entry":"point_preprocess","repo":"qsh-zh/DiffFlow","repo_kind":"official","path":"modules/sde_loss.py","file_url":"https://github.com/qsh-zh/DiffFlow/blob/HEAD/modules/sde_loss.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":"3d6250d220278baf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}