{"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/detectrl-benchmarking-llm-generated-text","title":"DetectRL: Benchmarking LLM-Generated Text Detection in Real-World Scenarios","arxiv_id":"2410.23746","date":"2024-10-31","proceeding":null,"authors":["Junchao Wu","Runzhe Zhan","Derek F. Wong","Shu Yang","Xinyi Yang","Yulin Yuan","Lidia S. Chao"],"abstract":"Detecting text generated by large language models (LLMs) is of great recent interest. With zero-shot methods like DetectGPT, detection capabilities have reached impressive levels. However, the reliability of existing detectors in real-world applications remains underexplored. In this study, we present a new benchmark, DetectRL, highlighting that even state-of-the-art (SOTA) detection techniques still underperformed in this task. We collected human-written datasets from domains where LLMs are particularly prone to misuse. Using popular LLMs, we generated data that better aligns with real-world applications. Unlike previous studies, we employed heuristic rules to create adversarial LLM-generated text, simulating advanced prompt usages, human revisions like word substitutions, and writing errors. Our development of DetectRL reveals the strengths and limitations of current SOTA detectors. More importantly, we analyzed the potential impact of writing styles, model types, attack methods, the text lengths, and real-world human writing factors on different types of detectors. We believe DetectRL could serve as an effective benchmark for assessing detectors in real-world scenarios, evolving with advanced attack methods, thus providing more stressful evaluation to drive the development of more efficient detectors. Data and code are publicly available at: https://github.com/NLP2CT/DetectRL.","url_abs":"https://arxiv.org/abs/2410.23746v1","url_pdf":"https://arxiv.org/pdf/2410.23746v1.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":"detectrl-benchmarking-llm-generated-text","repo_url":"https://github.com/nlp2ct/detectrl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"llm-generated-text-detection","task_name":"LLM-generated Text Detection"},{"task_slug":"text-detection","task_name":"Text Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.23746","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.23746"}},"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/NLP2CT/DetectRL","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nlp2ct/detectrl","reach":{"status":"ok"}}],"summary":{"ran_honours":1,"unverified":15},"by_repo_kind":{"official":{"samples":16,"ran":1,"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":16,"samples":[{"code_sha256_prefix":"accb4f4eb000e081","entry":"lexical_diversity","repo":"NLP2CT/DetectRL","repo_kind":"official","path":"Analysis/benchmark_statistics/statistics_lexical_diversity.py","file_url":"https://github.com/NLP2CT/DetectRL/blob/HEAD/Analysis/benchmark_statistics/statistics_lexical_diversity.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"accb4f4eb000e081"}},{"code_sha256_prefix":"125ca1328bad554f","entry":"bt_translation","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/data_generation.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/data_generation.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":"125ca1328bad554f"}},{"code_sha256_prefix":"3173c07643d9b286","entry":"chat_deepinfra","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/Chat_API.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/Chat_API.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":"3173c07643d9b286"}},{"code_sha256_prefix":"71794aa47e77d1cc","entry":"chat_openai","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/Chat_API.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/Chat_API.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":"71794aa47e77d1cc"}},{"code_sha256_prefix":"23c3416429f69fee","entry":"count_masks","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Detectors/DetectGPT.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Detectors/DetectGPT.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":"OPAQUE_PARAMS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"23c3416429f69fee"}},{"code_sha256_prefix":"0178d9374b7ab0be","entry":"get_bm25_retriver","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/data_generation.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/data_generation.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":"0178d9374b7ab0be"}},{"code_sha256_prefix":"e2fc29bd5a992600","entry":"get_ll","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Detectors/loss.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Detectors/loss.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":"e2fc29bd5a992600"}},{"code_sha256_prefix":"d0cd5a24eb8ebb54","entry":"get_lls","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Detectors/loss.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Detectors/loss.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":"d0cd5a24eb8ebb54"}},{"code_sha256_prefix":"cd334919390112d3","entry":"get_sampling_discrepancy_analytic","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Detectors/Fast_DetectGPT.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Detectors/Fast_DetectGPT.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":"cd334919390112d3"}},{"code_sha256_prefix":"e86e359f633b93cb","entry":"get_sentences_in_paragraph","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/data_mixing.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/data_mixing.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":"e86e359f633b93cb"}},{"code_sha256_prefix":"c3a387dd367bcfa3","entry":"get_text_crit","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Detectors/Fast_DetectGPT.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Detectors/Fast_DetectGPT.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":"c3a387dd367bcfa3"}},{"code_sha256_prefix":"0af108cefcec3d33","entry":"read_data","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/DIPPER.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/DIPPER.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":"0af108cefcec3d33"}},{"code_sha256_prefix":"cd67487f05408843","entry":"replace_masks","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Detectors/DetectGPT.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Detectors/DetectGPT.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":"cd67487f05408843"}},{"code_sha256_prefix":"e4e96676b2972694","entry":"sample_multiple_of_four","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/data_mixing.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/data_mixing.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":"e4e96676b2972694"}},{"code_sha256_prefix":"150e39aff29a1dc7","entry":"spilt_paragraph","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Data_Generation/DIPPER.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Data_Generation/DIPPER.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":"150e39aff29a1dc7"}},{"code_sha256_prefix":"6bef9b8781ddec1a","entry":"tokenize_and_mask","repo":"nlp2ct/detectrl","repo_kind":"official","path":"Detectors/DetectGPT.py","file_url":"https://github.com/nlp2ct/detectrl/blob/HEAD/Detectors/DetectGPT.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":"6bef9b8781ddec1a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}