{"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-models-as-stochastic-quantization","title":"Diffusion Models as Stochastic Quantization in Lattice Field Theory","arxiv_id":"2309.17082","date":"2023-09-29","proceeding":null,"authors":["Lingxiao Wang","Gert Aarts","Kai Zhou"],"abstract":"In this work, we establish a direct connection between generative diffusion models (DMs) and stochastic quantization (SQ). The DM is realized by approximating the reversal of a stochastic process dictated by the Langevin equation, generating samples from a prior distribution to effectively mimic the target distribution. Using numerical simulations, we demonstrate that the DM can serve as a global sampler for generating quantum lattice field configurations in two-dimensional $\\phi^4$ theory. We demonstrate that DMs can notably reduce autocorrelation times in the Markov chain, especially in the critical region where standard Markov Chain Monte-Carlo (MCMC) algorithms experience critical slowing down. The findings can potentially inspire further advancements in lattice field theory simulations, in particular in cases where it is expensive to generate large ensembles.","url_abs":"https://arxiv.org/abs/2309.17082v2","url_pdf":"https://arxiv.org/pdf/2309.17082v2.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-models-as-stochastic-quantization","repo_url":"https://github.com/anguswlx/dmassq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.17082","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.17082"}},"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/anguswlx/dmassq","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":13,"unverified":2},"by_repo_kind":{"official":{"samples":15,"ran":13,"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":"98e8305408831b32","entry":"Euler_Maruyama_sampler","repo":"anguswlx/dmassq","repo_kind":"official","path":"sampler.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/sampler.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":"98e8305408831b32"}},{"code_sha256_prefix":"295164393b62f041","entry":"action","repo":"anguswlx/dmassq","repo_kind":"official","path":"mc.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/mc.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":"295164393b62f041"}},{"code_sha256_prefix":"c1965c68ebd4e36a","entry":"diffusion_coeff","repo":"anguswlx/dmassq","repo_kind":"official","path":"sde.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/sde.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":"c1965c68ebd4e36a"}},{"code_sha256_prefix":"b010a164fe10282d","entry":"get_abs_mag","repo":"anguswlx/dmassq","repo_kind":"official","path":"observable.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/observable.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":"b010a164fe10282d"}},{"code_sha256_prefix":"3e3c5437e484e594","entry":"get_action","repo":"anguswlx/dmassq","repo_kind":"official","path":"mc.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/mc.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":"3e3c5437e484e594"}},{"code_sha256_prefix":"11ac00a92305076c","entry":"get_drift","repo":"anguswlx/dmassq","repo_kind":"official","path":"mc.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/mc.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":"11ac00a92305076c"}},{"code_sha256_prefix":"2fb8f7549fd6da95","entry":"get_mag","repo":"anguswlx/dmassq","repo_kind":"official","path":"observable.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/observable.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":"2fb8f7549fd6da95"}},{"code_sha256_prefix":"a7d4fba206cac9de","entry":"grab","repo":"anguswlx/dmassq","repo_kind":"official","path":"plot_sample.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/plot_sample.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":"a7d4fba206cac9de"}},{"code_sha256_prefix":"3eb7d08565f61611","entry":"jackknife","repo":"anguswlx/dmassq","repo_kind":"official","path":"observable.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/observable.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":"3eb7d08565f61611"}},{"code_sha256_prefix":"73ec3b826b113561","entry":"loss_fn","repo":"anguswlx/dmassq","repo_kind":"official","path":"loss.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/loss.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":"73ec3b826b113561"}},{"code_sha256_prefix":"725b17e24eba5db7","entry":"marginal_prob_std","repo":"anguswlx/dmassq","repo_kind":"official","path":"sde.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/sde.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":"725b17e24eba5db7"}},{"code_sha256_prefix":"979ca6bfb895133d","entry":"ode_likelihood","repo":"anguswlx/dmassq","repo_kind":"official","path":"likelihood.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/likelihood.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":"979ca6bfb895133d"}},{"code_sha256_prefix":"912afada37c424b9","entry":"pc_sampler","repo":"anguswlx/dmassq","repo_kind":"official","path":"sampler.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/sampler.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":"912afada37c424b9"}},{"code_sha256_prefix":"87b6c1b754a69d7f","entry":"ode_sampler","repo":"anguswlx/dmassq","repo_kind":"official","path":"sampler.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/sampler.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":"87b6c1b754a69d7f"}},{"code_sha256_prefix":"5d1e48c8db4f7dcd","entry":"prior_likelihood","repo":"anguswlx/dmassq","repo_kind":"official","path":"likelihood.py","file_url":"https://github.com/anguswlx/dmassq/blob/HEAD/likelihood.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":"5d1e48c8db4f7dcd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}