{"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/improving-diffusion-models-s-data-corruption","title":"Improving Diffusion Models's Data-Corruption Resistance using Scheduled Pseudo-Huber Loss","arxiv_id":"2403.16728","date":"2024-03-25","proceeding":null,"authors":["Artem Khrapov","Vadim Popov","Tasnima Sadekova","Assel Yermekova","Mikhail Kudinov"],"abstract":"Diffusion models are known to be vulnerable to outliers in training data. In this paper we study an alternative diffusion loss function, which can preserve the high quality of generated data like the original squared $L_{2}$ loss while at the same time being robust to outliers. We propose to use pseudo-Huber loss function with a time-dependent parameter to allow for the trade-off between robustness on the most vulnerable early reverse-diffusion steps and fine details restoration on the final steps. We show that pseudo-Huber loss with the time-dependent parameter exhibits better performance on corrupted datasets in both image and audio domains. In addition, the loss function we propose can potentially help diffusion models to resist dataset corruption while not requiring data filtering or purification compared to conventional training algorithms.","url_abs":"https://arxiv.org/abs/2403.16728v1","url_pdf":"https://arxiv.org/pdf/2403.16728v1.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":"improving-diffusion-models-s-data-corruption","repo_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.16728","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.16728"}},"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/kabachuha/SPHL-for-stable-diffusion","reach":{"status":"ok"}}],"summary":{"ran":3,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":9,"ran":4,"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":9,"samples":[{"code_sha256_prefix":"5b500c1337c4db18","entry":"arg_to_list","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"clipsim.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/clipsim.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":"5b500c1337c4db18"}},{"code_sha256_prefix":"256040ccde7473f2","entry":"collate_fn","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"train_dreambooth_lora.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/train_dreambooth_lora.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"256040ccde7473f2"}},{"code_sha256_prefix":"b344fd961a91fb5b","entry":"conditional_loss","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"diffusers_scripts/text_to_image/train_text_to_image.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/diffusers_scripts/text_to_image/train_text_to_image.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":"b344fd961a91fb5b"}},{"code_sha256_prefix":"03e1c6795642a8db","entry":"determine_scheduler_type","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"diffusers_scripts/dreambooth/train_dreambooth_lora_sdxl.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/diffusers_scripts/dreambooth/train_dreambooth_lora_sdxl.py","link_basis":"harvester_set","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":"03e1c6795642a8db"}},{"code_sha256_prefix":"4b50013a09f2bd73","entry":"get_outpath","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"train_test_runner.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/train_test_runner.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":"4b50013a09f2bd73"}},{"code_sha256_prefix":"76279bf6a5cd2728","entry":"get_samples_outpath","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"train_test_runner.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/train_test_runner.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":"76279bf6a5cd2728"}},{"code_sha256_prefix":"0eb3e94e8635150e","entry":"import_model_class_from_model_name_or_path","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"train_dreambooth_lora.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/train_dreambooth_lora.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":"0eb3e94e8635150e"}},{"code_sha256_prefix":"d42636f926f08aa0","entry":"launch","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"bigprint.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/bigprint.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":"d42636f926f08aa0"}},{"code_sha256_prefix":"e7c647408dcf0307","entry":"parse_args","repo":"kabachuha/SPHL-for-stable-diffusion","repo_kind":"official","path":"train_dreambooth_lora.py","file_url":"https://github.com/kabachuha/SPHL-for-stable-diffusion/blob/HEAD/train_dreambooth_lora.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":"e7c647408dcf0307"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}