{"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/detecting-discrepancies-between-ai-generated","title":"Detecting Discrepancies Between AI-Generated and Natural Images Using Uncertainty","arxiv_id":"2412.05897","date":"2024-12-08","proceeding":null,"authors":["Jun Nie","Yonggang Zhang","Tongliang Liu","Yiu-ming Cheung","Bo Han","Xinmei Tian"],"abstract":"In this work, we propose a novel approach for detecting AI-generated images by leveraging predictive uncertainty to mitigate misuse and associated risks. The motivation arises from the fundamental assumption regarding the distributional discrepancy between natural and AI-generated images. The feasibility of distinguishing natural images from AI-generated ones is grounded in the distribution discrepancy between them. Predictive uncertainty offers an effective approach for capturing distribution shifts, thereby providing insights into detecting AI-generated images. Namely, as the distribution shift between training and testing data increases, model performance typically degrades, often accompanied by increased predictive uncertainty. Therefore, we propose to employ predictive uncertainty to reflect the discrepancies between AI-generated and natural images. In this context, the challenge lies in ensuring that the model has been trained over sufficient natural images to avoid the risk of determining the distribution of natural images as that of generated images. We propose to leverage large-scale pre-trained models to calculate the uncertainty as the score for detecting AI-generated images. This leads to a simple yet effective method for detecting AI-generated images using large-scale vision models: images that induce high uncertainty are identified as AI-generated. Comprehensive experiments across multiple benchmarks demonstrate the effectiveness of our method.","url_abs":"https://arxiv.org/abs/2412.05897v1","url_pdf":"https://arxiv.org/pdf/2412.05897v1.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":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2412.05897","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.05897"}},"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":"deterministic:regex_extraction","url":"https://github.com/tmlr-group/WePe","reach":null}],"summary":{"ran_fixture":3,"ran_draft_wrong":1,"ran_violates":1,"ran_honours":1},"by_repo_kind":{"found_in_text":{"samples":6,"ran":6,"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":"5eafa8c345bcf47d","entry":"calculate_acc","repo":"tmlr-group/WePe","repo_kind":"found_in_text","path":"wepe.py","file_url":"https://github.com/tmlr-group/WePe/blob/HEAD/wepe.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5eafa8c345bcf47d"}},{"code_sha256_prefix":"77b509a67b73959b","entry":"calculate_cosine_similarity","repo":"tmlr-group/WePe","repo_kind":"found_in_text","path":"wepe.py","file_url":"https://github.com/tmlr-group/WePe/blob/HEAD/wepe.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"77b509a67b73959b"}},{"code_sha256_prefix":"8135b8bd6213c904","entry":"find_best_threshold","repo":"tmlr-group/WePe","repo_kind":"found_in_text","path":"wepe.py","file_url":"https://github.com/tmlr-group/WePe/blob/HEAD/wepe.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":"8135b8bd6213c904"}},{"code_sha256_prefix":"c187a548ac1863b2","entry":"fpr_and_fdr_at_recall","repo":"tmlr-group/WePe","repo_kind":"found_in_text","path":"wepe.py","file_url":"https://github.com/tmlr-group/WePe/blob/HEAD/wepe.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c187a548ac1863b2"}},{"code_sha256_prefix":"4096d6663c097f49","entry":"get_measures","repo":"tmlr-group/WePe","repo_kind":"found_in_text","path":"wepe.py","file_url":"https://github.com/tmlr-group/WePe/blob/HEAD/wepe.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":"4096d6663c097f49"}},{"code_sha256_prefix":"f48c5f611c741335","entry":"validate","repo":"tmlr-group/WePe","repo_kind":"found_in_text","path":"wepe.py","file_url":"https://github.com/tmlr-group/WePe/blob/HEAD/wepe.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f48c5f611c741335"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}