{"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/manifold-induced-biases-for-zero-shot-and-few","title":"Manifold Induced Biases for Zero-shot and Few-shot Detection of Generated Images","arxiv_id":"2504.15470","date":"2025-04-21","proceeding":null,"authors":["Jonathan Brokman","Amit Giloni","Omer Hofman","Roman Vainshtein","Hisashi Kojima","Guy Gilboa"],"abstract":"Distinguishing between real and AI-generated images, commonly referred to as 'image detection', presents a timely and significant challenge. Despite extensive research in the (semi-)supervised regime, zero-shot and few-shot solutions have only recently emerged as promising alternatives. Their main advantage is in alleviating the ongoing data maintenance, which quickly becomes outdated due to advances in generative technologies. We identify two main gaps: (1) a lack of theoretical grounding for the methods, and (2) significant room for performance improvements in zero-shot and few-shot regimes. Our approach is founded on understanding and quantifying the biases inherent in generated content, where we use these quantities as criteria for characterizing generated images. Specifically, we explore the biases of the implicit probability manifold, captured by a pre-trained diffusion model. Through score-function analysis, we approximate the curvature, gradient, and bias towards points on the probability manifold, establishing criteria for detection in the zero-shot regime. We further extend our contribution to the few-shot setting by employing a mixture-of-experts methodology. Empirical results across 20 generative models demonstrate that our method outperforms current approaches in both zero-shot and few-shot settings. This work advances the theoretical understanding and practical usage of generated content biases through the lens of manifold analysis.","url_abs":"https://arxiv.org/abs/2504.15470v1","url_pdf":"https://arxiv.org/pdf/2504.15470v1.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":"manifold-induced-biases-for-zero-shot-and-few","repo_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"mixture-of-experts","task_name":"Mixture-of-Experts"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2504.15470","atlas_url":"https://app.syntology.ai/?focus=2504.15470","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2504.15470"}},"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/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","reach":null}],"summary":{"ran_draft_wrong":5,"ran_honours":1,"ran_fixture":1},"by_repo_kind":{"official":{"samples":7,"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":7,"samples":[{"code_sha256_prefix":"d5d7ab9f6ad32854","entry":"factory_sdv14_based_criterion","repo":"jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","repo_kind":"official","path":"manifold_bias_criteria.py","file_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images/blob/HEAD/manifold_bias_criteria.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d5d7ab9f6ad32854"}},{"code_sha256_prefix":"2b7972538db74246","entry":"my_flat","repo":"jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","repo_kind":"official","path":"manifold_bias_criteria.py","file_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images/blob/HEAD/manifold_bias_criteria.py","link_basis":"first_harvest_node","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":"2b7972538db74246"}},{"code_sha256_prefix":"fd09abeb34ba227a","entry":"my_resize","repo":"jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","repo_kind":"official","path":"manifold_bias_criteria.py","file_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images/blob/HEAD/manifold_bias_criteria.py","link_basis":"first_harvest_node","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":"fd09abeb34ba227a"}},{"code_sha256_prefix":"08f764cd3913f27c","entry":"normalize_batch","repo":"jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","repo_kind":"official","path":"manifold_bias_criteria.py","file_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images/blob/HEAD/manifold_bias_criteria.py","link_basis":"first_harvest_node","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":"08f764cd3913f27c"}},{"code_sha256_prefix":"85344d5637989af1","entry":"numpy_chunk","repo":"jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","repo_kind":"official","path":"manifold_bias_criteria.py","file_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images/blob/HEAD/manifold_bias_criteria.py","link_basis":"first_harvest_node","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":"85344d5637989af1"}},{"code_sha256_prefix":"de555a9024321407","entry":"postprocess_image","repo":"jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","repo_kind":"official","path":"manifold_bias_criteria.py","file_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images/blob/HEAD/manifold_bias_criteria.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"de555a9024321407"}},{"code_sha256_prefix":"70f788c6789d6219","entry":"preprocess_image_batch","repo":"jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images","repo_kind":"official","path":"manifold_bias_criteria.py","file_url":"https://github.com/jonathanbrok/manifold-induced-biases-for-zero-shot-and-few-shot-detection-of-generated-images/blob/HEAD/manifold_bias_criteria.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"70f788c6789d6219"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}