{"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/co-spy-combining-semantic-and-pixel-features","title":"CO-SPY: Combining Semantic and Pixel Features to Detect Synthetic Images by AI","arxiv_id":"2503.18286","date":"2025-03-24","proceeding":"CVPR 2025 1","authors":["Siyuan Cheng","Lingjuan Lyu","Zhenting Wang","Xiangyu Zhang","Vikash Sehwag"],"abstract":"With the rapid advancement of generative AI, it is now possible to synthesize high-quality images in a few seconds. Despite the power of these technologies, they raise significant concerns regarding misuse. Current efforts to distinguish between real and AI-generated images may lack generalization, being effective for only certain types of generative models and susceptible to post-processing techniques like JPEG compression. To overcome these limitations, we propose a novel framework, Co-Spy, that first enhances existing semantic features (e.g., the number of fingers in a hand) and artifact features (e.g., pixel value differences), and then adaptively integrates them to achieve more general and robust synthetic image detection. Additionally, we create Co-Spy-Bench, a comprehensive dataset comprising 5 real image datasets and 22 state-of-the-art generative models, including the latest models like FLUX. We also collect 50k synthetic images in the wild from the Internet to enable evaluation in a more practical setting. Our extensive evaluations demonstrate that our detector outperforms existing methods under identical training conditions, achieving an average accuracy improvement of approximately 11% to 34%. The code is available at https://github.com/Megum1/Co-Spy.","url_abs":"https://arxiv.org/abs/2503.18286v1","url_pdf":"https://arxiv.org/pdf/2503.18286v1.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":"co-spy-combining-semantic-and-pixel-features","repo_url":"https://github.com/megum1/co-spy","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"synthetic-image-detection","task_name":"Synthetic Image Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2503.18286","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.18286"}},"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/megum1/co-spy","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Megum1/Co-Spy","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"ran_fixture":2,"ran_draft_wrong":1,"ran_violates":1,"unverified":6},"by_repo_kind":{"official":{"samples":13,"ran":7,"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":"fc446cf956997c40","entry":"Bottleneck","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fc446cf956997c40"}},{"code_sha256_prefix":"86961d87fd5fab69","entry":"cv2_jpg","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"86961d87fd5fab69"}},{"code_sha256_prefix":"229442b36ab50a29","entry":"data_augment","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"229442b36ab50a29"}},{"code_sha256_prefix":"6754fc7cf147b2c3","entry":"jpeg_from_key","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"DEP_MISSING","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6754fc7cf147b2c3"}},{"code_sha256_prefix":"a3254e6aff2ba505","entry":"pil_jpg","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a3254e6aff2ba505"}},{"code_sha256_prefix":"2d279d661251af46","entry":"sample_continuous","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2d279d661251af46"}},{"code_sha256_prefix":"d9f67916280ae1e3","entry":"sample_discrete","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d9f67916280ae1e3"}},{"code_sha256_prefix":"03dc388e6cfd8b10","entry":"ArtifactDetector","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03dc388e6cfd8b10"}},{"code_sha256_prefix":"ea6444b2029dc4b3","entry":"BaseDetector","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea6444b2029dc4b3"}},{"code_sha256_prefix":"90c883f0b81276fe","entry":"CoSpyFusionDetector","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"90c883f0b81276fe"}},{"code_sha256_prefix":"4e663e8cbd8b097b","entry":"ResNet","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e663e8cbd8b097b"}},{"code_sha256_prefix":"604cf2ee5e85a6d0","entry":"SemanticDetector","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"604cf2ee5e85a6d0"}},{"code_sha256_prefix":"e51a12966ba2acaa","entry":"gaussian_blur","repo":"Megum1/Co-Spy","repo_kind":"official","path":"detectors/progan/fusion.py","file_url":"https://github.com/Megum1/Co-Spy/blob/HEAD/detectors/progan/fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e51a12966ba2acaa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}