{"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/mirror-diffusion-models-for-constrained-and","title":"Mirror Diffusion Models for Constrained and Watermarked Generation","arxiv_id":"2310.01236","date":"2023-10-02","proceeding":"NeurIPS 2023 11","authors":["Guan-Horng Liu","Tianrong Chen","Evangelos A. Theodorou","Molei Tao"],"abstract":"Modern successes of diffusion models in learning complex, high-dimensional data distributions are attributed, in part, to their capability to construct diffusion processes with analytic transition kernels and score functions. The tractability results in a simulation-free framework with stable regression losses, from which reversed, generative processes can be learned at scale. However, when data is confined to a constrained set as opposed to a standard Euclidean space, these desirable characteristics appear to be lost based on prior attempts. In this work, we propose Mirror Diffusion Models (MDM), a new class of diffusion models that generate data on convex constrained sets without losing any tractability. This is achieved by learning diffusion processes in a dual space constructed from a mirror map, which, crucially, is a standard Euclidean space. We derive efficient computation of mirror maps for popular constrained sets, such as simplices and $\\ell_2$-balls, showing significantly improved performance of MDM over existing methods. For safety and privacy purposes, we also explore constrained sets as a new mechanism to embed invisible but quantitative information (i.e., watermarks) in generated data, for which MDM serves as a compelling approach. Our work brings new algorithmic opportunities for learning tractable diffusion on complex domains. Our code is available at https://github.com/ghliu/mdm","url_abs":"https://arxiv.org/abs/2310.01236v2","url_pdf":"https://arxiv.org/pdf/2310.01236v2.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":"mirror-diffusion-models-for-constrained-and","repo_url":"https://github.com/ghliu/mdm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.01236","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.01236"}},"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":"deterministic:regex_extraction","url":"https://github.com/ghliu/mdm","reach":null}],"summary":{"ran_honours":1,"unverified":5},"by_repo_kind":{"official":{"samples":5,"ran":0,"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":1,"samples":[{"code_sha256_prefix":"cacd4f6ec202d9b4","entry":"parse_int_list","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"cacd4f6ec202d9b4"}},{"code_sha256_prefix":"2283638ea23d5477","entry":"ConstraintSet","repo":"ghliu/mdm","repo_kind":"official","path":"mdm/constraintset.py","file_url":"https://github.com/ghliu/mdm/blob/HEAD/mdm/constraintset.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":"2283638ea23d5477"}},{"code_sha256_prefix":"9fbf646e18eed1db","entry":"ablation_sampler","repo":"ghliu/mdm","repo_kind":"official","path":"generate_watermark.py","file_url":"https://github.com/ghliu/mdm/blob/HEAD/generate_watermark.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":"9fbf646e18eed1db"}},{"code_sha256_prefix":"a888a5e028b6239e","entry":"build_ckpt_option","repo":"ghliu/mdm","repo_kind":"official","path":"eval_constr_gen.py","file_url":"https://github.com/ghliu/mdm/blob/HEAD/eval_constr_gen.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":"a888a5e028b6239e"}},{"code_sha256_prefix":"8b16b0674af254db","entry":"edm_sampler","repo":"ghliu/mdm","repo_kind":"official","path":"generate_watermark.py","file_url":"https://github.com/ghliu/mdm/blob/HEAD/generate_watermark.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":"8b16b0674af254db"}},{"code_sha256_prefix":"d4f7521fb1839dd1","entry":"get_ref_x0","repo":"ghliu/mdm","repo_kind":"official","path":"eval_constr_gen.py","file_url":"https://github.com/ghliu/mdm/blob/HEAD/eval_constr_gen.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":"d4f7521fb1839dd1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}