{"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/fast-and-reliable-generation-of-ehr-time","title":"Reliable Generation of Privacy-preserving Synthetic Electronic Health Record Time Series via Diffusion Models","arxiv_id":"2310.15290","date":"2023-10-23","proceeding":null,"authors":["Muhang Tian","Bernie Chen","Allan Guo","Shiyi Jiang","Anru R. Zhang"],"abstract":"Electronic Health Records (EHRs) are rich sources of patient-level data, offering valuable resources for medical data analysis. However, privacy concerns often restrict access to EHRs, hindering downstream analysis. Current EHR de-identification methods are flawed and can lead to potential privacy leakage. Additionally, existing publicly available EHR databases are limited, preventing the advancement of medical research using EHR. This study aims to overcome these challenges by generating realistic and privacy-preserving synthetic electronic health records (EHRs) time series efficiently. We introduce a new method for generating diverse and realistic synthetic EHR time series data using Denoising Diffusion Probabilistic Models (DDPM). We conducted experiments on six databases: Medical Information Mart for Intensive Care III and IV (MIMIC-III/IV), the eICU Collaborative Research Database (eICU), and non-EHR datasets on Stocks and Energy. We compared our proposed method with eight existing methods. Our results demonstrate that our approach significantly outperforms all existing methods in terms of data fidelity while requiring less training effort. Additionally, data generated by our method yields a lower discriminative accuracy compared to other baseline methods, indicating the proposed method can generate data with less privacy risk. The proposed diffusion-model-based method can reliably and efficiently generate synthetic EHR time series, which facilitates the downstream medical data analysis. Our numerical results show the superiority of the proposed method over all other existing methods.","url_abs":"https://arxiv.org/abs/2310.15290v6","url_pdf":"https://arxiv.org/pdf/2310.15290v6.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":"fast-and-reliable-generation-of-ehr-time","repo_url":"https://github.com/muhangtian/timediff","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"de-identification","task_name":"De-identification"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"privacy-preserving","task_name":"Privacy Preserving"},{"task_slug":"time-series-1","task_name":"Time Series"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2310.15290","atlas_url":"https://app.syntology.ai/?focus=2310.15290","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.15290"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/muhangtian/timediff","reach":{"status":"ok"}}],"summary":{"ran_honours":1,"ran":6,"unverified":4},"by_repo_kind":{"official":{"samples":11,"ran":7,"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":11,"samples":[{"code_sha256_prefix":"616b5e82dd2a38f9","entry":"count_params","repo":"muhangtian/timediff","repo_kind":"official","path":"etdiff_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/etdiff_train.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"616b5e82dd2a38f9"}},{"code_sha256_prefix":"1489da8832ce102d","entry":"model_path_to_sample_path","repo":"muhangtian/timediff","repo_kind":"official","path":"etdiff_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/etdiff_train.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":"1489da8832ce102d"}},{"code_sha256_prefix":"78a62e9f2b2428d3","entry":"regular_transform_to_features","repo":"muhangtian/timediff","repo_kind":"official","path":"eval_samples.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/eval_samples.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":"78a62e9f2b2428d3"}},{"code_sha256_prefix":"f60c7d75d7b89020","entry":"replace_nan_with_other_np","repo":"muhangtian/timediff","repo_kind":"official","path":"baselines/timegan_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/baselines/timegan_train.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":"f60c7d75d7b89020"}},{"code_sha256_prefix":"a804179b8725758b","entry":"reverse_normalize","repo":"muhangtian/timediff","repo_kind":"official","path":"baselines/gtgan_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/baselines/gtgan_train.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":"a804179b8725758b"}},{"code_sha256_prefix":"6d9291e185e14832","entry":"reverse_to_nonan_indicator_2d","repo":"muhangtian/timediff","repo_kind":"official","path":"eval_samples.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/eval_samples.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":"6d9291e185e14832"}},{"code_sha256_prefix":"19841fc582fd6a91","entry":"train_val_split","repo":"muhangtian/timediff","repo_kind":"official","path":"baselines/halo_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/baselines/halo_train.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":"19841fc582fd6a91"}},{"code_sha256_prefix":"f95042366cbc7997","entry":"run_epoch","repo":"muhangtian/timediff","repo_kind":"official","path":"baselines/crnngan_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/baselines/crnngan_train.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f95042366cbc7997"}},{"code_sha256_prefix":"6c25783534d01d1d","entry":"run_training","repo":"muhangtian/timediff","repo_kind":"official","path":"baselines/crnngan_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/baselines/crnngan_train.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6c25783534d01d1d"}},{"code_sha256_prefix":"a14451aeea7b385f","entry":"run_validation","repo":"muhangtian/timediff","repo_kind":"official","path":"baselines/crnngan_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/baselines/crnngan_train.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a14451aeea7b385f"}},{"code_sha256_prefix":"fa0e9e549b6bff3f","entry":"train_test_divide","repo":"muhangtian/timediff","repo_kind":"official","path":"baselines/gtgan_train.py","file_url":"https://github.com/muhangtian/timediff/blob/HEAD/baselines/gtgan_train.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fa0e9e549b6bff3f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}