{"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/data-attribution-for-diffusion-models","title":"Data Attribution for Diffusion Models: Timestep-induced Bias in Influence Estimation","arxiv_id":"2401.09031","date":"2024-01-17","proceeding":null,"authors":["Tong Xie","Haoyu Li","Andrew Bai","Cho-Jui Hsieh"],"abstract":"Data attribution methods trace model behavior back to its training dataset, offering an effective approach to better understand ''black-box'' neural networks. While prior research has established quantifiable links between model output and training data in diverse settings, interpreting diffusion model outputs in relation to training samples remains underexplored. In particular, diffusion models operate over a sequence of timesteps instead of instantaneous input-output relationships in previous contexts, posing a significant challenge to extend existing frameworks to diffusion models directly. Notably, we present Diffusion-TracIn that incorporates this temporal dynamics and observe that samples' loss gradient norms are highly dependent on timestep. This trend leads to a prominent bias in influence estimation, and is particularly noticeable for samples trained on large-norm-inducing timesteps, causing them to be generally influential. To mitigate this effect, we introduce Diffusion-ReTrac as a re-normalized adaptation that enables the retrieval of training samples more targeted to the test sample of interest, facilitating a localized measurement of influence and considerably more intuitive visualization. We demonstrate the efficacy of our approach through various evaluation metrics and auxiliary tasks, reducing the amount of generally influential samples to $\\frac{1}{3}$ of its original quantity.","url_abs":"https://arxiv.org/abs/2401.09031v3","url_pdf":"https://arxiv.org/pdf/2401.09031v3.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":"data-attribution-for-diffusion-models","repo_url":"https://github.com/txie1/diffusion-retrac","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.09031","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.09031"}},"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/txie1/diffusion-retrac","reach":{"status":"ok"}}],"summary":{"ran_honours":3,"ran":5,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":9,"ran":9,"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":"b236cc9fdeeb2655","entry":"cosine_beta_schedule","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"scheduler/ddim.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/scheduler/ddim.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b236cc9fdeeb2655"}},{"code_sha256_prefix":"c4e48f83a9b0720f","entry":"get_ckpts","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"diffusion_tracin.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/diffusion_tracin.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":"c4e48f83a9b0720f"}},{"code_sha256_prefix":"88d9fe4f428f01fc","entry":"get_downsample_layer","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"model/unet.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/model/unet.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":"88d9fe4f428f01fc"}},{"code_sha256_prefix":"379841fe547e7314","entry":"get_upsample_layer","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"model/unet.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/model/unet.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":"379841fe547e7314"}},{"code_sha256_prefix":"3eb58dae620046d3","entry":"l2norm","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"model/_attention.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/model/_attention.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3eb58dae620046d3"}},{"code_sha256_prefix":"a1229a9f4df127e2","entry":"normalize_to_neg_one_to_one","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"utils.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a1229a9f4df127e2"}},{"code_sha256_prefix":"6ab180a2829060f3","entry":"numpy_to_pil","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"utils.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/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":"6ab180a2829060f3"}},{"code_sha256_prefix":"243e5ce0a6f6d207","entry":"trans","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"influence_function.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/influence_function.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":"243e5ce0a6f6d207"}},{"code_sha256_prefix":"97e1bbd232dfe092","entry":"unnormalize_to_zero_to_one","repo":"txie1/diffusion-retrac","repo_kind":"official","path":"utils.py","file_url":"https://github.com/txie1/diffusion-retrac/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"97e1bbd232dfe092"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}