{"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/sampling-with-flows-diffusion-and","title":"Sampling with flows, diffusion and autoregressive neural networks: A spin-glass perspective","arxiv_id":"2308.14085","date":"2023-08-27","proceeding":null,"authors":["Davide Ghio","Yatin Dandi","Florent Krzakala","Lenka Zdeborová"],"abstract":"Recent years witnessed the development of powerful generative models based on flows, diffusion or autoregressive neural networks, achieving remarkable success in generating data from examples with applications in a broad range of areas. A theoretical analysis of the performance and understanding of the limitations of these methods remain, however, challenging. In this paper, we undertake a step in this direction by analysing the efficiency of sampling by these methods on a class of problems with a known probability distribution and comparing it with the sampling performance of more traditional methods such as the Monte Carlo Markov chain and Langevin dynamics. We focus on a class of probability distribution widely studied in the statistical physics of disordered systems that relate to spin glasses, statistical inference and constraint satisfaction problems. We leverage the fact that sampling via flow-based, diffusion-based or autoregressive networks methods can be equivalently mapped to the analysis of a Bayes optimal denoising of a modified probability measure. Our findings demonstrate that these methods encounter difficulties in sampling stemming from the presence of a first-order phase transition along the algorithm's denoising path. Our conclusions go both ways: we identify regions of parameters where these methods are unable to sample efficiently, while that is possible using standard Monte Carlo or Langevin approaches. We also identify regions where the opposite happens: standard approaches are inefficient while the discussed generative methods work well.","url_abs":"https://arxiv.org/abs/2308.14085v1","url_pdf":"https://arxiv.org/pdf/2308.14085v1.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":"sampling-with-flows-diffusion-and","repo_url":"https://github.com/idephics/diffsamp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.14085","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.14085"}},"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/idephics/diffsamp","reach":{"status":"ok"}}],"summary":{"ran":18},"by_repo_kind":{"official":{"samples":18,"ran":18,"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":18,"samples":[{"code_sha256_prefix":"f3ba183427dcfaa6","entry":"SE","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SparseT_Sph_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SparseT_Sph_SE.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":"f3ba183427dcfaa6"}},{"code_sha256_prefix":"9a5633826b9619e2","entry":"SE","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SparseT_Sph_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SparseT_Sph_SE.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":"9a5633826b9619e2"}},{"code_sha256_prefix":"4847f643afaa468a","entry":"SEterm","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SK_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SK_SE.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":"4847f643afaa468a"}},{"code_sha256_prefix":"5a005b81d64a94a7","entry":"SEterm","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SparseT_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SparseT_SE.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":"5a005b81d64a94a7"}},{"code_sha256_prefix":"95a6935d8f1eb14d","entry":"SEterm","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SK_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SK_SE.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":"95a6935d8f1eb14d"}},{"code_sha256_prefix":"003db12fdf3f665c","entry":"SEterm","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SparseT_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SparseT_SE.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":"003db12fdf3f665c"}},{"code_sha256_prefix":"7316fa8533840271","entry":"logZ","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SparseT_Sph_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SparseT_Sph_SE.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":"7316fa8533840271"}},{"code_sha256_prefix":"8281b13c6da7c683","entry":"logZ","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SparseT_Sph_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SparseT_Sph_SE.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":"8281b13c6da7c683"}},{"code_sha256_prefix":"96af2eb83ae1699d","entry":"logZterm1","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SK_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SK_SE.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":"96af2eb83ae1699d"}},{"code_sha256_prefix":"1d38faf37dba9546","entry":"logZterm1","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SparseT_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SparseT_SE.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":"1d38faf37dba9546"}},{"code_sha256_prefix":"186646103371e8bd","entry":"logZterm1","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SK_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SK_SE.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":"186646103371e8bd"}},{"code_sha256_prefix":"74a95d87138df336","entry":"logZterm1","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SparseT_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SparseT_SE.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":"74a95d87138df336"}},{"code_sha256_prefix":"ea42e408724ef70a","entry":"logZterm2","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SK_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SK_SE.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":"ea42e408724ef70a"}},{"code_sha256_prefix":"62c52538e96e2bf0","entry":"logZterm2","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SparseT_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SparseT_SE.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":"62c52538e96e2bf0"}},{"code_sha256_prefix":"69353130827a164e","entry":"logZterm2","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SK_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SK_SE.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":"69353130827a164e"}},{"code_sha256_prefix":"0e198ba52d5e9971","entry":"logZterm2","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SparseT_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SparseT_SE.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":"0e198ba52d5e9971"}},{"code_sha256_prefix":"e1a0734d6b42fcce","entry":"uninf_SE","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Deci_SparseT_Sph_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Deci_SparseT_Sph_SE.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":"e1a0734d6b42fcce"}},{"code_sha256_prefix":"b6b389499c666e03","entry":"uninf_SE","repo":"idephics/diffsamp","repo_kind":"official","path":"Codes/Diff_SparseT_Sph_SE.py","file_url":"https://github.com/idephics/diffsamp/blob/HEAD/Codes/Diff_SparseT_Sph_SE.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":"b6b389499c666e03"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}