{"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/raidar-generative-ai-detection-via-rewriting","title":"Raidar: geneRative AI Detection viA Rewriting","arxiv_id":"2401.12970","date":"2024-01-23","proceeding":null,"authors":["Chengzhi Mao","Carl Vondrick","Hao Wang","Junfeng Yang"],"abstract":"We find that large language models (LLMs) are more likely to modify human-written text than AI-generated text when tasked with rewriting. This tendency arises because LLMs often perceive AI-generated text as high-quality, leading to fewer modifications. We introduce a method to detect AI-generated content by prompting LLMs to rewrite text and calculating the editing distance of the output. We dubbed our geneRative AI Detection viA Rewriting method Raidar. Raidar significantly improves the F1 detection scores of existing AI content detection models -- both academic and commercial -- across various domains, including News, creative writing, student essays, code, Yelp reviews, and arXiv papers, with gains of up to 29 points. Operating solely on word symbols without high-dimensional features, our method is compatible with black box LLMs, and is inherently robust on new content. Our results illustrate the unique imprint of machine-generated text through the lens of the machines themselves.","url_abs":"https://arxiv.org/abs/2401.12970v2","url_pdf":"https://arxiv.org/pdf/2401.12970v2.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":"raidar-generative-ai-detection-via-rewriting","repo_url":"https://github.com/cvlab-columbia/raidarllmdetect","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"raidar-generative-ai-detection-via-rewriting","repo_url":"https://github.com/jameslwang/raft","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2401.12970","atlas_url":"https://app.syntology.ai/?focus=2401.12970","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.12970"}},"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":"deterministic:regex_extraction","url":"https://github.com/cvlab-columbia/RaidarLLMDetect","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jameslwang/raft","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cvlab-columbia/raidarllmdetect","reach":{"status":"ok"}}],"summary":{"ran":8,"unverified":2},"by_repo_kind":{"official":{"samples":10,"ran":8,"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":10,"samples":[{"code_sha256_prefix":"c4d3f42a15aeeb27","entry":"GPT_self_prompt","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"Arxiv/gen_fake_arxiv.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/Arxiv/gen_fake_arxiv.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c4d3f42a15aeeb27"}},{"code_sha256_prefix":"794bd23758356fb8","entry":"GPT_self_prompt","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"Arxiv/gen_gpt3weak_inv_rewrite.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/Arxiv/gen_gpt3weak_inv_rewrite.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"794bd23758356fb8"}},{"code_sha256_prefix":"a4fc1609228faee5","entry":"common_elements","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"histogram.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/histogram.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4fc1609228faee5"}},{"code_sha256_prefix":"079bb8b088818abf","entry":"extract_ngrams","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"histogram.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/histogram.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"079bb8b088818abf"}},{"code_sha256_prefix":"e0ff484431e739bc","entry":"rewrite_json","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"Arxiv/gen_arxiv_equi.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/Arxiv/gen_arxiv_equi.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e0ff484431e739bc"}},{"code_sha256_prefix":"d42def8633eec110","entry":"rewrite_json","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"Arxiv/gen_arxiv_rewrite.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/Arxiv/gen_arxiv_rewrite.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d42def8633eec110"}},{"code_sha256_prefix":"8af5d585e399971f","entry":"tokenize_and_normalize","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"histogram.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/histogram.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8af5d585e399971f"}},{"code_sha256_prefix":"0f60a6ff68c1e4af","entry":"tokenize_and_normalize","repo":"cvlab-columbia/raidarllmdetect","repo_kind":"official","path":"Arxiv/fake_gen_by_diff_diff_model/arxiv_gen_other_fake.py","file_url":"https://github.com/cvlab-columbia/raidarllmdetect/blob/HEAD/Arxiv/fake_gen_by_diff_diff_model/arxiv_gen_other_fake.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0f60a6ff68c1e4af"}},{"code_sha256_prefix":"235e87832f8a04cc","entry":"GPT_self_prompt","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"Arxiv/fake_gen_by_diff_diff_model/gen_inv_rewrite4detect.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/Arxiv/fake_gen_by_diff_diff_model/gen_inv_rewrite4detect.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"235e87832f8a04cc"}},{"code_sha256_prefix":"fc05dcecd6ea4278","entry":"rewrite_json","repo":"cvlab-columbia/RaidarLLMDetect","repo_kind":"official","path":"Arxiv/gen_gpt3weak_inv_rewrite.py","file_url":"https://github.com/cvlab-columbia/RaidarLLMDetect/blob/HEAD/Arxiv/gen_gpt3weak_inv_rewrite.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc05dcecd6ea4278"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}