{"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/distribution-aware-data-expansion-with","title":"Distribution-Aware Data Expansion with Diffusion Models","arxiv_id":"2403.06741","date":"2024-03-11","proceeding":null,"authors":["Haowei Zhu","Ling Yang","Jun-Hai Yong","Hongzhi Yin","Jiawei Jiang","Meng Xiao","Wentao Zhang","Bin Wang"],"abstract":"The scale and quality of a dataset significantly impact the performance of deep models. However, acquiring large-scale annotated datasets is both a costly and time-consuming endeavor. To address this challenge, dataset expansion technologies aim to automatically augment datasets, unlocking the full potential of deep models. Current data expansion techniques include image transformation and image synthesis methods. Transformation-based methods introduce only local variations, leading to limited diversity. In contrast, synthesis-based methods generate entirely new content, greatly enhancing informativeness. However, existing synthesis methods carry the risk of distribution deviations, potentially degrading model performance with out-of-distribution samples. In this paper, we propose DistDiff, a training-free data expansion framework based on the distribution-aware diffusion model. DistDiff constructs hierarchical prototypes to approximate the real data distribution, optimizing latent data points within diffusion models with hierarchical energy guidance. We demonstrate its capability to generate distribution-consistent samples, significantly improving data expansion tasks. DistDiff consistently enhances accuracy across a diverse range of datasets compared to models trained solely on original data. Furthermore, our approach consistently outperforms existing synthesis-based techniques and demonstrates compatibility with widely adopted transformation-based augmentation methods. Additionally, the expanded dataset exhibits robustness across various architectural frameworks. Our code is available at https://github.com/haoweiz23/DistDiff","url_abs":"https://arxiv.org/abs/2403.06741v2","url_pdf":"https://arxiv.org/pdf/2403.06741v2.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":"distribution-aware-data-expansion-with","repo_url":"https://github.com/haoweiz23/distdiff","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"informativeness","task_name":"Informativeness"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.06741","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.06741"}},"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/haoweiz23/distdiff","reach":{"status":"ok"}}],"summary":{"ran":6,"ran_honours":2,"ran_draft_wrong":2,"ran_fixture":1,"ran_violates":1,"unverified":2},"by_repo_kind":{"official":{"samples":14,"ran":12,"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":14,"samples":[{"code_sha256_prefix":"1f6ce19e4dcb2553","entry":"add_encoder_image_method","repo":"haoweiz23/distdiff","repo_kind":"official","path":"model_utils.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/model_utils.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":"1f6ce19e4dcb2553"}},{"code_sha256_prefix":"a8377f4852c0c2ce","entry":"encode_prompt","repo":"haoweiz23/distdiff","repo_kind":"official","path":"dataloader.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/dataloader.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":"a8377f4852c0c2ce"}},{"code_sha256_prefix":"34a498b0a1a5b5ed","entry":"extract_performance","repo":"haoweiz23/distdiff","repo_kind":"official","path":"parse_logs.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/parse_logs.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":"34a498b0a1a5b5ed"}},{"code_sha256_prefix":"9f75cd937e9f1824","entry":"float_parameter","repo":"haoweiz23/distdiff","repo_kind":"official","path":"augmentations/augmentations.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/augmentations/augmentations.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9f75cd937e9f1824"}},{"code_sha256_prefix":"fa762f2f1e10f2e4","entry":"int_parameter","repo":"haoweiz23/distdiff","repo_kind":"official","path":"augmentations/augmentations.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/augmentations/augmentations.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fa762f2f1e10f2e4"}},{"code_sha256_prefix":"97f484048ac03556","entry":"mixup_criterion","repo":"haoweiz23/distdiff","repo_kind":"official","path":"augmentations/mixup.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/augmentations/mixup.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"97f484048ac03556"}},{"code_sha256_prefix":"345e624f9cc2e32a","entry":"mixup_data","repo":"haoweiz23/distdiff","repo_kind":"official","path":"augmentations/mixup.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/augmentations/mixup.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"345e624f9cc2e32a"}},{"code_sha256_prefix":"5cc8d4764ac07a35","entry":"sample_level","repo":"haoweiz23/distdiff","repo_kind":"official","path":"augmentations/augmentations.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/augmentations/augmentations.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5cc8d4764ac07a35"}},{"code_sha256_prefix":"160b28a12db42974","entry":"simple_preprocess","repo":"haoweiz23/distdiff","repo_kind":"official","path":"generate_data.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/generate_data.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":"160b28a12db42974"}},{"code_sha256_prefix":"a67a2074238bd9ef","entry":"tokenize_prompt","repo":"haoweiz23/distdiff","repo_kind":"official","path":"dataloader.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/dataloader.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":"a67a2074238bd9ef"}},{"code_sha256_prefix":"d54a985a9bdd066a","entry":"vae_tensor_to_pil_image","repo":"haoweiz23/distdiff","repo_kind":"official","path":"generate_data.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/generate_data.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":"d54a985a9bdd066a"}},{"code_sha256_prefix":"5dcf0f0ff560ab07","entry":"wrap_clip_forward","repo":"haoweiz23/distdiff","repo_kind":"official","path":"model_utils.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/model_utils.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":"5dcf0f0ff560ab07"}},{"code_sha256_prefix":"e39ea3d3e4b88bdf","entry":"compute_text_embeddings","repo":"haoweiz23/distdiff","repo_kind":"official","path":"dataloader.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/dataloader.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":"e39ea3d3e4b88bdf"}},{"code_sha256_prefix":"114aaac37fbe6be6","entry":"denoise_one_step","repo":"haoweiz23/distdiff","repo_kind":"official","path":"generate_data.py","file_url":"https://github.com/haoweiz23/distdiff/blob/HEAD/generate_data.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":"114aaac37fbe6be6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}