{"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/a-single-simple-patch-is-all-you-need-for-ai","title":"A Single Simple Patch is All You Need for AI-generated Image Detection","arxiv_id":"2402.01123","date":"2024-02-02","proceeding":null,"authors":["Jiaxuan Chen","Jieteng Yao","Li Niu"],"abstract":"The recent development of generative models unleashes the potential of generating hyper-realistic fake images. To prevent the malicious usage of fake images, AI-generated image detection aims to distinguish fake images from real images. However, existing method suffer from severe performance drop when detecting images generated by unseen generators. We find that generative models tend to focus on generating the patches with rich textures to make the images more realistic while neglecting the hidden noise caused by camera capture present in simple patches. In this paper, we propose to exploit the noise pattern of a single simple patch to identify fake images. Furthermore, due to the performance decline when handling low-quality generated images, we introduce an enhancement module and a perception module to remove the interfering information. Extensive experiments demonstrate that our method can achieve state-of-the-art performance on public benchmarks.","url_abs":"https://arxiv.org/abs/2402.01123v2","url_pdf":"https://arxiv.org/pdf/2402.01123v2.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":"a-single-simple-patch-is-all-you-need-for-ai","repo_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"all","task_name":"All"}],"methods":[{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.01123","atlas_url":"https://app.syntology.ai/?focus=2402.01123","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.01123"}},"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/bcmi/SSP-AI-Generated-Image-Detection","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"ran_draft_wrong":2},"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":0,"samples":[{"code_sha256_prefix":"981b7b1273758511","entry":"compute","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"utils/patch.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/utils/patch.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":"981b7b1273758511"}},{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"networks/resnet.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d9def42110729a85"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"networks/resnet.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"93bb446ef12aa375","entry":"patch_img","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"utils/patch.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/utils/patch.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":"93bb446ef12aa375"}},{"code_sha256_prefix":"c9b68441724f363d","entry":"poly_lr","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"utils/util.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/utils/util.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":"c9b68441724f363d"}},{"code_sha256_prefix":"8a9a86cb02c105a9","entry":"resnet18","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"networks/resnet.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/networks/resnet.py","link_basis":"plan_row","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":"8a9a86cb02c105a9"}},{"code_sha256_prefix":"c716b1e835cec125","entry":"sample_continuous","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"utils/tdataloader.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/utils/tdataloader.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":"c716b1e835cec125"}},{"code_sha256_prefix":"e3287363e619218a","entry":"sample_discrete","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"utils/tdataloader.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/utils/tdataloader.py","link_basis":"harvester_set","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":"e3287363e619218a"}},{"code_sha256_prefix":"63bb414a806f4380","entry":"sample_randint","repo":"bcmi/SSP-AI-Generated-Image-Detection","repo_kind":"official","path":"utils/tdataloader.py","file_url":"https://github.com/bcmi/SSP-AI-Generated-Image-Detection/blob/HEAD/utils/tdataloader.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":"63bb414a806f4380"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}