{"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/understanding-and-mitigating-copying-in-1","title":"Understanding and Mitigating Copying in Diffusion Models","arxiv_id":"2305.20086","date":"2023-05-31","proceeding":"NeurIPS 2023 11","authors":["Gowthami Somepalli","Vasu Singla","Micah Goldblum","Jonas Geiping","Tom Goldstein"],"abstract":"Images generated by diffusion models like Stable Diffusion are increasingly widespread. Recent works and even lawsuits have shown that these models are prone to replicating their training data, unbeknownst to the user. In this paper, we first analyze this memorization problem in text-to-image diffusion models. While it is widely believed that duplicated images in the training set are responsible for content replication at inference time, we observe that the text conditioning of the model plays a similarly important role. In fact, we see in our experiments that data replication often does not happen for unconditional models, while it is common in the text-conditional case. Motivated by our findings, we then propose several techniques for reducing data replication at both training and inference time by randomizing and augmenting image captions in the training set.","url_abs":"https://arxiv.org/abs/2305.20086v1","url_pdf":"https://arxiv.org/pdf/2305.20086v1.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":"understanding-and-mitigating-copying-in-1","repo_url":"https://github.com/somepago/dcr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-captioning","task_name":"Image Captioning"},{"task_slug":"memorization","task_name":"Memorization"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2305.20086","atlas_url":"https://app.syntology.ai/?focus=2305.20086","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.20086"}},"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/somepago/dcr","reach":null}],"summary":{"ran_draft_wrong":3,"ran_fixture":2,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":"abb46f51790a26a8","entry":"collate_fn","repo":"somepago/dcr","repo_kind":"official","path":"diff_train.py","file_url":"https://github.com/somepago/dcr/blob/HEAD/diff_train.py","link_basis":"first_harvest_node","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":"abb46f51790a26a8"}},{"code_sha256_prefix":"070c9b6b4926bf21","entry":"einsum_in_chunks","repo":"somepago/dcr","repo_kind":"official","path":"diff_retrieval.py","file_url":"https://github.com/somepago/dcr/blob/HEAD/diff_retrieval.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"070c9b6b4926bf21"}},{"code_sha256_prefix":"23b6b9bbe42a51ff","entry":"gallery","repo":"somepago/dcr","repo_kind":"official","path":"diff_retrieval.py","file_url":"https://github.com/somepago/dcr/blob/HEAD/diff_retrieval.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23b6b9bbe42a51ff"}},{"code_sha256_prefix":"81a30031f1ae390e","entry":"resize","repo":"somepago/dcr","repo_kind":"official","path":"diff_inference.py","file_url":"https://github.com/somepago/dcr/blob/HEAD/diff_inference.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"81a30031f1ae390e"}},{"code_sha256_prefix":"5766a406869a9f0c","entry":"tv_loss","repo":"somepago/dcr","repo_kind":"official","path":"diff_retrieval.py","file_url":"https://github.com/somepago/dcr/blob/HEAD/diff_retrieval.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5766a406869a9f0c"}},{"code_sha256_prefix":"704bca525db43f35","entry":"parse_args","repo":"somepago/dcr","repo_kind":"official","path":"diff_train.py","file_url":"https://github.com/somepago/dcr/blob/HEAD/diff_train.py","link_basis":"first_harvest_node","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":"704bca525db43f35"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}