{"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/on-the-detection-of-synthetic-images","title":"On the detection of synthetic images generated by diffusion models","arxiv_id":"2211.00680","date":"2022-11-01","proceeding":null,"authors":["Riccardo Corvi","Davide Cozzolino","Giada Zingarini","Giovanni Poggi","Koki Nagano","Luisa Verdoliva"],"abstract":"Over the past decade, there has been tremendous progress in creating synthetic media, mainly thanks to the development of powerful methods based on generative adversarial networks (GAN). Very recently, methods based on diffusion models (DM) have been gaining the spotlight. In addition to providing an impressive level of photorealism, they enable the creation of text-based visual content, opening up new and exciting opportunities in many different application fields, from arts to video games. On the other hand, this property is an additional asset in the hands of malicious users, who can generate and distribute fake media perfectly adapted to their attacks, posing new challenges to the media forensic community. With this work, we seek to understand how difficult it is to distinguish synthetic images generated by diffusion models from pristine ones and whether current state-of-the-art detectors are suitable for the task. To this end, first we expose the forensics traces left by diffusion models, then study how current detectors, developed for GAN-generated images, perform on these new synthetic images, especially in challenging social-networks scenarios involving image compression and resizing. Datasets and code are available at github.com/grip-unina/DMimageDetection.","url_abs":"https://arxiv.org/abs/2211.00680v1","url_pdf":"https://arxiv.org/pdf/2211.00680v1.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":"on-the-detection-of-synthetic-images","repo_url":"https://github.com/grip-unina/dmimagedetection","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"on-the-detection-of-synthetic-images","repo_url":"https://github.com/AniSundar18/AlignedForensics","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-compression","task_name":"Image Compression"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2211.00680","atlas_url":"https://app.syntology.ai/?focus=2211.00680","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.00680"}},"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/grip-unina/dmimagedetection","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AniSundar18/AlignedForensics","reach":{"status":"ok"}}],"summary":{"ran":15,"ran_draft_wrong":3,"unverified":2},"by_repo_kind":{"official":{"samples":20,"ran":18,"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":"0cf19471e87a45c2","entry":"calculate_eer","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/dmetrics.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/dmetrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0cf19471e87a45c2"}},{"code_sha256_prefix":"6b872402efcb1483","entry":"center_crop","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/normalization.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/normalization.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6b872402efcb1483"}},{"code_sha256_prefix":"be47a06dbf02938c","entry":"check_img","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/csv_operations.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/csv_operations.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"be47a06dbf02938c"}},{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/networks/resnet.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/networks/resnet.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d9def42110729a85"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/networks/resnet.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/networks/resnet.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"67c9ab8e625b4e5f","entry":"conv3x3","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/networks/resnet_mod.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/networks/resnet_mod.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"67c9ab8e625b4e5f"}},{"code_sha256_prefix":"b77e8d2f3ae99b82","entry":"get_bal_sampler","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"training_code/utils/dataset.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/training_code/utils/dataset.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b77e8d2f3ae99b82"}},{"code_sha256_prefix":"436664f4ff92f847","entry":"get_list_norm","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/normalization.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/normalization.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"436664f4ff92f847"}},{"code_sha256_prefix":"8e16d042fbf592d9","entry":"get_method_here","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/get_method_here.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/get_method_here.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8e16d042fbf592d9"}},{"code_sha256_prefix":"6a626b600adb420b","entry":"macc","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/dmetrics.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/dmetrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6a626b600adb420b"}},{"code_sha256_prefix":"a639fc58d11576d3","entry":"normalization_fft","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/normalization.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/normalization.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a639fc58d11576d3"}},{"code_sha256_prefix":"6ccd7d166120f68e","entry":"padding_wrap","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/normalization2.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/normalization2.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6ccd7d166120f68e"}},{"code_sha256_prefix":"c1cd563a01ddb7e3","entry":"pd_at_far","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/dmetrics.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/dmetrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c1cd563a01ddb7e3"}},{"code_sha256_prefix":"d586be93da3254ed","entry":"resnet18","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/networks/resnet.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/networks/resnet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d586be93da3254ed"}},{"code_sha256_prefix":"1ab046e413eb720a","entry":"resnet18","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/networks/resnet_mod.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/networks/resnet_mod.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1ab046e413eb720a"}},{"code_sha256_prefix":"ea87c5c696f3e8f4","entry":"resnet18","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"training_code/networks/resnet_mod.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/training_code/networks/resnet_mod.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ea87c5c696f3e8f4"}},{"code_sha256_prefix":"1601acbe295e6729","entry":"rule_minmax","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/get_method_here.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/get_method_here.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1601acbe295e6729"}},{"code_sha256_prefix":"18315f3fd5065642","entry":"rule_trim","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"test_code/get_method_here.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/test_code/get_method_here.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"18315f3fd5065642"}},{"code_sha256_prefix":"0db59a5c1784496d","entry":"add_dataloader_arguments","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"training_code/utils/dataset.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/training_code/utils/dataset.py","link_basis":"harvester_set","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":"0db59a5c1784496d"}},{"code_sha256_prefix":"96beb5997283006e","entry":"get_dataset","repo":"grip-unina/dmimagedetection","repo_kind":"official","path":"training_code/utils/dataset.py","file_url":"https://github.com/grip-unina/dmimagedetection/blob/HEAD/training_code/utils/dataset.py","link_basis":"harvester_set","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":"96beb5997283006e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}