mlsanityData to 14 Oct 2026

CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs

arXiv 2506.11059 ↗First posted 27 May 2025cs.SE cs.CL cs.CYcited by 6

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have become integral to modern software development, producing vast amounts of AI-generated source code. While these models boost programming productivity, their misuse introduces critical risks, including code plagiarism, license violations, and the propagation of insecure programs. As a result, robust detection of AI-generated code is essential. To support the development of such detectors, a comprehensive benchmark that reflects real-world conditions is crucial. However, existing benchmarks fall short -- most cover only a limited set of programming languages and rely on less capable generative models. In this paper, we present CodeMirage, a comprehensive benchmark that addresses these limitations through three major advancements: (1) it spans ten widely used programming languages, (2) includes both original and paraphrased code samples, and (3) incorporates outputs from ten state-of-the-art production-level LLMs, including both reasoning and non-reasoning models from six major providers. Using CodeMirage, we evaluate ten representative detectors across four methodological paradigms under four realistic evaluation configurations, reporting results using three complementary metrics. Our analysis reveals nine key findings that uncover the strengths and weaknesses of current detectors, and identify critical challenges for future work. We believe CodeMirage offers a rigorous and practical testbed to advance the development of robust and generalizable AI-generated code detectors.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 57 of its 93 references that are in the map. First posted on arXiv 27 May 2025.

Builds on

57 of 93 references.

References · 57

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Denoising Diffusion Probabilistic Modelscited by 21,076
  3. 2023GPT-4 Technical Reportcited by 18,396
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,058
  6. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  7. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  8. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  9. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  10. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  11. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
  12. 2021Membership Inference Attacks From First Principlescited by 878
38 more
  1. 2023DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvaturecited by 726
  2. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  3. 2019GLTR: Statistical Detection and Visualization of Generated Textcited by 496
  4. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  5. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
  6. 2023Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defensecited by 429
  7. 2023Can AI-Generated Text be Reliably Detected?cited by 386
  8. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  9. 2023GenImage: A Million-Scale Benchmark for Detecting AI-Generated Imagecited by 321
  10. 2024Spotting LLMs With Binoculars: Zero-Shot Detection of Machine-Generated Textcited by 263
  11. 2019Automatic Detection of Generated Text is Easiest when Humans are Fooledcited by 261
  12. 2021WildDeepfake: A Challenging Real-World Dataset for Deepfake Detectioncited by 209
  13. 2021TURINGBENCH: A Benchmark Environment for Turing Test in the Age of Neural Text Generationcited by 120
  14. 2018FaceForensics: A Large-scale Video Dataset for Forgery Detection in Human Facescited by 119
  15. 2023How Secure is Code Generated by ChatGPT?cited by 81
  16. 2022Is GitHub's Copilot as Bad as Humans at Introducing Vulnerabilities in Code?cited by 67
  17. 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
  18. 2023On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilotcited by 64
  19. 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 60
  20. 2024Raidar: geneRative AI Detection viA Rewritingcited by 52
  21. 2023What Makes Good In-context Demonstrations for Code Intelligence Tasks with LLMs?cited by 47
  22. 2023Will ChatGPT get you caught? Rethinking of Plagiarism Detectioncited by 41
  23. 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detectioncited by 40
  24. 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 34
  25. 2023Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attackscited by 33
  26. 2024Between Lines of Code: Unraveling the Distinct Patterns of Machine and Human Programmerscited by 27
  27. 2024Toward Secure Code Generation: Bridging Correctness and Security via Task-Adaptive Vulnerability Modeling and Execution-Based Benchmarkingcited by 27
  28. 2023Zero-Shot Detection of Machine-Generated Codescited by 24
  29. 2024How secure is AI-generated Code: A Large-Scale Comparison of Large Language Modelscited by 24
  30. 2024LLMs in Web Development: Evaluating LLM-Generated PHP Code Unveiling Vulnerabilities and Limitationscited by 22
  31. 2023How Can ChatGPT Support Human Security Testers to Help Mitigate Supply Chain Attacks?cited by 20
  32. 2024Assessing AI Detectors in Identifying AI-Generated Code: Implications for Educationcited by 18
  33. 2023Poisoned ChatGPT Finds Work for Idle Hands: Exploring Developers' Coding Practices with Insecure Suggestions from Poisoned AI Modelscited by 17
  34. 2024Distinguishing LLM-generated from Human-written Code by Contrastive Learningcited by 16
  35. 2024LiCoEval: Evaluating LLMs on License Compliance in Code Generationcited by 14
  36. 2024Whodunit: Classifying Code as Human Authored or GPT-4 Generated -- A case study on CodeChef problemscited by 13
  37. 2024Do LLMs Know to Respect Copyright Notice?cited by 13
  38. 2024Uncovering LLM-Generated Code: A Zero-Shot Synthetic Code Detector via Code Rewritingcited by 11

50 most cited of 57 All 57 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 2.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024CodeMMLU: A Multi-Task Benchmark for Assessing Code Understanding & Reasoning Capabilities of CodeLLMs
  2. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  3. 2025PACIFIC: a framework for generating benchmarks to check Precise Automatically Checked Instruction Following In Code
  4. 2023SelfEvolve: A Code Evolution Framework via Large Language Models
  5. 2025Dynamic Benchmarking of Reasoning Capabilities in Code Large Language Models Under Data Contamination
  6. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories
  7. 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
  8. 2026Narrowing the Complexity Gap in the Evaluation of Large Language Models ↗