{"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/on-conditional-diffusion-models-for-pde","title":"On conditional diffusion models for PDE simulations","arxiv_id":"2410.16415","date":"2024-10-21","proceeding":null,"authors":["Aliaksandra Shysheya","Cristiana Diaconu","Federico Bergamin","Paris Perdikaris","José Miguel Hernández-Lobato","Richard E. Turner","Emile Mathieu"],"abstract":"Modelling partial differential equations (PDEs) is of crucial importance in science and engineering, and it includes tasks ranging from forecasting to inverse problems, such as data assimilation. However, most previous numerical and machine learning approaches that target forecasting cannot be applied out-of-the-box for data assimilation. Recently, diffusion models have emerged as a powerful tool for conditional generation, being able to flexibly incorporate observations without retraining. In this work, we perform a comparative study of score-based diffusion models for forecasting and assimilation of sparse observations. In particular, we focus on diffusion models that are either trained in a conditional manner, or conditioned after unconditional training. We address the shortcomings of existing models by proposing 1) an autoregressive sampling approach that significantly improves performance in forecasting, 2) a new training strategy for conditional score-based models that achieves stable performance over a range of history lengths, and 3) a hybrid model which employs flexible pre-training conditioning on initial conditions and flexible post-training conditioning to handle data assimilation. We empirically show that these modifications are crucial for successfully tackling the combination of forecasting and data assimilation, a task commonly encountered in real-world scenarios.","url_abs":"https://arxiv.org/abs/2410.16415v1","url_pdf":"https://arxiv.org/pdf/2410.16415v1.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":"on-conditional-diffusion-models-for-pde","repo_url":"https://github.com/cambridge-mlg/pdediff","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"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=2410.16415","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.16415"}},"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/cambridge-mlg/pdediff","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"official":{"samples":8,"ran":1,"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":"bbdb77ef35f27398","entry":"zero_module","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/nn/condition_utils.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/nn/condition_utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bbdb77ef35f27398"}},{"code_sha256_prefix":"10b9e731d7229515","entry":"conv_layer","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/nn/oned_unet.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/nn/oned_unet.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":"10b9e731d7229515"}},{"code_sha256_prefix":"f886b810fa74e3d2","entry":"curl","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/mcs.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/mcs.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":"f886b810fa74e3d2"}},{"code_sha256_prefix":"76ef916d2504a595","entry":"fourier_embedding","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/nn/condition_utils.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/nn/condition_utils.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":"76ef916d2504a595"}},{"code_sha256_prefix":"e8e7a5b3c08bb545","entry":"get_category_dict","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/loop.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/loop.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":"e8e7a5b3c08bb545"}},{"code_sha256_prefix":"3dfd476c24ad6cf8","entry":"get_time_category","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/sde.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/sde.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":"3dfd476c24ad6cf8"}},{"code_sha256_prefix":"cb58dd6e5e5a3853","entry":"load_score","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/score.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/score.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":"cb58dd6e5e5a3853"}},{"code_sha256_prefix":"be85519f11c66420","entry":"make_score","repo":"cambridge-mlg/pdediff","repo_kind":"official","path":"pdediff/score.py","file_url":"https://github.com/cambridge-mlg/pdediff/blob/HEAD/pdediff/score.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":"be85519f11c66420"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}