{"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/csdi-conditional-score-based-diffusion-models","title":"CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation","arxiv_id":"2107.03502","date":"2021-07-07","proceeding":"NeurIPS 2021 12","authors":["Yusuke Tashiro","Jiaming Song","Yang song","Stefano Ermon"],"abstract":"The imputation of missing values in time series has many applications in healthcare and finance. While autoregressive models are natural candidates for time series imputation, score-based diffusion models have recently outperformed existing counterparts including autoregressive models in many tasks such as image generation and audio synthesis, and would be promising for time series imputation. In this paper, we propose Conditional Score-based Diffusion models for Imputation (CSDI), a novel time series imputation method that utilizes score-based diffusion models conditioned on observed data. Unlike existing score-based approaches, the conditional diffusion model is explicitly trained for imputation and can exploit correlations between observed values. On healthcare and environmental data, CSDI improves by 40-65% over existing probabilistic imputation methods on popular performance metrics. In addition, deterministic imputation by CSDI reduces the error by 5-20% compared to the state-of-the-art deterministic imputation methods. Furthermore, CSDI can also be applied to time series interpolation and probabilistic forecasting, and is competitive with existing baselines. The code is available at https://github.com/ermongroup/CSDI.","url_abs":"https://arxiv.org/abs/2107.03502v2","url_pdf":"https://arxiv.org/pdf/2107.03502v2.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":"csdi-conditional-score-based-diffusion-models","repo_url":"https://github.com/WenjieDu/PyPOTS","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"csdi-conditional-score-based-diffusion-models","repo_url":"https://github.com/ermongroup/csdi","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"csdi-conditional-score-based-diffusion-models","repo_url":"https://github.com/airalcorn2/deformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"csdi-conditional-score-based-diffusion-models","repo_url":"https://github.com/adrianatienza1996/DiffusionModels/tree/main/CSDI","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"csdi-conditional-score-based-diffusion-models","repo_url":"https://github.com/pwc-1/Paper-9/tree/main/6/CSD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"audio-synthesis","task_name":"Audio Synthesis"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"imputation","task_name":"Imputation"},{"task_slug":"missing-values","task_name":"Missing Values"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2107.03502","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.03502"}},"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/ermongroup/CSDI","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/adrianatienza1996/DiffusionModels/tree/main/CSDI","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ermongroup/csdi","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/airalcorn2/deformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pwc-1/Paper-9/tree/main/6/CSD","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WenjieDu/PyPOTS","reach":null}],"summary":{"ran":6,"ran_draft_wrong":2,"ran_honours":2,"unverified":9},"by_repo_kind":{"named_in_paper":{"samples":10,"ran":4,"repositories":1},"listed":{"samples":9,"ran":6,"repositories":2}},"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":1,"samples":[{"code_sha256_prefix":"5dfc5500207d1921","entry":"Conv1d","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5dfc5500207d1921"}},{"code_sha256_prefix":"7340b482ffe44836","entry":"Conv1d_with_init","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"diff_models.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/diff_models.py","link_basis":"harvester_set","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":"7340b482ffe44836"}},{"code_sha256_prefix":"eba03a4da0243c1e","entry":"DEformerCSDI","repo":"airalcorn2/deformer","repo_kind":"listed","path":"deformer_csdi.py","file_url":"https://github.com/airalcorn2/deformer/blob/HEAD/deformer_csdi.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":"eba03a4da0243c1e"}},{"code_sha256_prefix":"e810d3ec37cb56b4","entry":"DiffusionEmbedding","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.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":"e810d3ec37cb56b4"}},{"code_sha256_prefix":"be39f9c54f305b37","entry":"FeedForwardNet","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"be39f9c54f305b37"}},{"code_sha256_prefix":"be774a732d955316","entry":"MultiHead_Attention","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.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":"be774a732d955316"}},{"code_sha256_prefix":"4a2a993673dda35a","entry":"TransformerLayer","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4a2a993673dda35a"}},{"code_sha256_prefix":"0eabe6591b009ad0","entry":"calc_denominator","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"utils.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0eabe6591b009ad0"}},{"code_sha256_prefix":"e706793d7d22ae44","entry":"get_torch_trans","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"diff_models.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/diff_models.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e706793d7d22ae44"}},{"code_sha256_prefix":"ff7efc68e98e1d55","entry":"quantile_loss","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"utils.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff7efc68e98e1d55"}},{"code_sha256_prefix":"aed37e235474038a","entry":"Add_and_Norm","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.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":"aed37e235474038a"}},{"code_sha256_prefix":"641efb52636a5e7c","entry":"CSDI","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.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":"641efb52636a5e7c"}},{"code_sha256_prefix":"d7da28db98f57a53","entry":"ResidualBlock","repo":"adrianatienza1996/DiffusionModels","repo_kind":"listed","path":"CSDI/model.py","file_url":"https://github.com/adrianatienza1996/DiffusionModels/blob/HEAD/CSDI/model.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":"d7da28db98f57a53"}},{"code_sha256_prefix":"265f06f01c273de4","entry":"calc_quantile_CRPS","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"utils.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/utils.py","link_basis":"plan_row","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":"265f06f01c273de4"}},{"code_sha256_prefix":"a8551932723a26a9","entry":"extract_hour","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"dataset_physio.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/dataset_physio.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":"a8551932723a26a9"}},{"code_sha256_prefix":"4206103b12cb44b7","entry":"get_dataloader","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"dataset_forecasting.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/dataset_forecasting.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":"4206103b12cb44b7"}},{"code_sha256_prefix":"3af76bc0fdd74740","entry":"get_dataloader","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"dataset_pm25.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/dataset_pm25.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":"3af76bc0fdd74740"}},{"code_sha256_prefix":"d166bfcd5d4c397e","entry":"parse_data","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"dataset_physio.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/dataset_physio.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":"d166bfcd5d4c397e"}},{"code_sha256_prefix":"5c04f3d80eeca460","entry":"parse_id","repo":"ermongroup/CSDI","repo_kind":"named_in_paper","path":"dataset_physio.py","file_url":"https://github.com/ermongroup/CSDI/blob/HEAD/dataset_physio.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":"5c04f3d80eeca460"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}