{"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/prediff-precipitation-nowcasting-with-latent-1","title":"PreDiff: Precipitation Nowcasting with Latent Diffusion Models","arxiv_id":"2307.10422","date":"2023-07-19","proceeding":"NeurIPS 2023 11","authors":["Zhihan Gao","Xingjian Shi","Boran Han","Hao Wang","Xiaoyong Jin","Danielle Maddix","Yi Zhu","Mu Li","Yuyang Wang"],"abstract":"Earth system forecasting has traditionally relied on complex physical models that are computationally expensive and require significant domain expertise. In the past decade, the unprecedented increase in spatiotemporal Earth observation data has enabled data-driven forecasting models using deep learning techniques. These models have shown promise for diverse Earth system forecasting tasks but either struggle with handling uncertainty or neglect domain-specific prior knowledge, resulting in averaging possible futures to blurred forecasts or generating physically implausible predictions. To address these limitations, we propose a two-stage pipeline for probabilistic spatiotemporal forecasting: 1) We develop PreDiff, a conditional latent diffusion model capable of probabilistic forecasts. 2) We incorporate an explicit knowledge alignment mechanism to align forecasts with domain-specific physical constraints. This is achieved by estimating the deviation from imposed constraints at each denoising step and adjusting the transition distribution accordingly. We conduct empirical studies on two datasets: N-body MNIST, a synthetic dataset with chaotic behavior, and SEVIR, a real-world precipitation nowcasting dataset. Specifically, we impose the law of conservation of energy in N-body MNIST and anticipated precipitation intensity in SEVIR. Experiments demonstrate the effectiveness of PreDiff in handling uncertainty, incorporating domain-specific prior knowledge, and generating forecasts that exhibit high operational utility.","url_abs":"https://arxiv.org/abs/2307.10422v2","url_pdf":"https://arxiv.org/pdf/2307.10422v2.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":"prediff-precipitation-nowcasting-with-latent-1","repo_url":"https://github.com/gaozhihan/PreDiff","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"earth-observation","task_name":"Earth Observation"},{"task_slug":"precipitation-forecasting","task_name":"Precipitation Forecasting"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"latent-diffusion-model","method_name":"Latent Diffusion Model"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/precipitation-forecasting-on-sevir","task":"Precipitation Forecasting","dataset":"SEVIR","model":"PreDiff","rank_in_archive_order":1,"of":1,"metrics":{"CSI-pool16":"0.6244","CSI-pool4":"0.4624"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2307.10422","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.10422"}},"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/gaozhihan/PreDiff","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":3,"ran_honours":2,"ran_fixture":2,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"listed":{"samples":12,"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":"f46bcb6099334fa6","entry":"downsample_2d","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/taming/resnet.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/taming/resnet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f46bcb6099334fa6"}},{"code_sha256_prefix":"3bd7e0cdbd131fdb","entry":"make_beta_schedule","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/diffusion/utils.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/diffusion/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3bd7e0cdbd131fdb"}},{"code_sha256_prefix":"3ee640131c9d4362","entry":"make_ddim_sampling_parameters","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/diffusion/utils.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/diffusion/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3ee640131c9d4362"}},{"code_sha256_prefix":"0ea4e960ea54514c","entry":"make_ddim_timesteps","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/diffusion/utils.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/diffusion/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0ea4e960ea54514c"}},{"code_sha256_prefix":"17eb0a31c91b671c","entry":"normal_kl","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/utils/distributions.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/utils/distributions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"17eb0a31c91b671c"}},{"code_sha256_prefix":"a191f9f21d279753","entry":"rearrange_dims","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/taming/resnet.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/taming/resnet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a191f9f21d279753"}},{"code_sha256_prefix":"7e83c65f054fb972","entry":"timestep_embedding","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/models/utils.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/models/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7e83c65f054fb972"}},{"code_sha256_prefix":"129b804760b3115f","entry":"zero_module","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/models/utils.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/models/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"129b804760b3115f"}},{"code_sha256_prefix":"6fe195fcfd10e259","entry":"checkpoint","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/models/utils.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/models/utils.py","link_basis":"harvester_set","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":"6fe195fcfd10e259"}},{"code_sha256_prefix":"333f0e96a20e3d88","entry":"get_down_block","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/taming/unet_2d_blocks.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/taming/unet_2d_blocks.py","link_basis":"harvester_set","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":"333f0e96a20e3d88"}},{"code_sha256_prefix":"8f6fe233efb4c95a","entry":"get_up_block","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/taming/unet_2d_blocks.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/taming/unet_2d_blocks.py","link_basis":"harvester_set","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":"8f6fe233efb4c95a"}},{"code_sha256_prefix":"31e7ed79c46ee9a9","entry":"upsample_2d","repo":"gaozhihan/PreDiff","repo_kind":"listed","path":"src/prediff/taming/resnet.py","file_url":"https://github.com/gaozhihan/PreDiff/blob/HEAD/src/prediff/taming/resnet.py","link_basis":"harvester_set","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":"31e7ed79c46ee9a9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}