{"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/metropolis-sampling-for-constrained-diffusion","title":"Metropolis Sampling for Constrained Diffusion Models","arxiv_id":"2307.05439","date":"2023-07-11","proceeding":"NeurIPS 2023 11","authors":[],"abstract":"Denoising diffusion models have recently emerged as the predominant paradigm for generative modelling on image domains. In addition, their extension to Riemannian manifolds has facilitated a range of applications across the natural sciences. While many of these problems stand to benefit from the ability to specify arbitrary, domain-informed constraints, this setting is not covered by the existing (Riemannian) diffusion model methodology. Recent work has attempted to address this issue by constructing novel noising processes based on the reflected Brownian motion and logarithmic barrier methods. However, the associated samplers are either computationally burdensome or only apply to convex subsets of Euclidean space. In this paper, we introduce an alternative, simple noising scheme based on Metropolis sampling that affords substantial gains in computational efficiency and empirical performance compared to the earlier samplers. Of independent interest, we prove that this new process corresponds to a valid discretisation of the reflected Brownian motion. We demonstrate the scalability and flexibility of our approach on a range of problem settings with convex and non-convex constraints, including applications from geospatial modelling, robotics and protein design.","url_abs":"https://arxiv.org/abs/2307.05439v2","url_pdf":"https://arxiv.org/pdf/2307.05439v2.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":[],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"protein-design","task_name":"Protein Design"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2307.05439","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.05439"}},"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/oxcsml/score-sde","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/oxcsml/geomstats","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":8},"by_repo_kind":{"found_in_text":{"samples":8,"ran":8,"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":"16247bca6040a5c1","entry":"autograd_only","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/tests.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/tests.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":"16247bca6040a5c1"}},{"code_sha256_prefix":"a471d46b2ce2d0ad","entry":"check_tf_error","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/errors.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/errors.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":"a471d46b2ce2d0ad"}},{"code_sha256_prefix":"01c0388601d634d0","entry":"euler_step","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/integrator.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/integrator.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":"01c0388601d634d0"}},{"code_sha256_prefix":"ee344cd6f0c3eb6b","entry":"get_types","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/vectorization.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/vectorization.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":"ee344cd6f0c3eb6b"}},{"code_sha256_prefix":"9e48b1ad1875e44a","entry":"np_and_tf_only","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/tests.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/tests.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":"9e48b1ad1875e44a"}},{"code_sha256_prefix":"63c5721f63f69b20","entry":"np_only","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/tests.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/tests.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":"63c5721f63f69b20"}},{"code_sha256_prefix":"b8eefd4ae398de2b","entry":"rk2_step","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/integrator.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/integrator.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":"b8eefd4ae398de2b"}},{"code_sha256_prefix":"f67e779882c85537","entry":"rk4_step","repo":"oxcsml/geomstats","repo_kind":"found_in_text","path":"geomstats/integrator.py","file_url":"https://github.com/oxcsml/geomstats/blob/HEAD/geomstats/integrator.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":"f67e779882c85537"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}