• Home
  • Search
  • Uncovering LLM-Generated Code: A Zero-Shot Synthetic Code Detector via Code Rewriting
  • Cite Icon6
  • https://doi.org/10.1609/aaai.v39i1.32082Copy DOI Icon

Uncovering LLM-Generated Code: A Zero-Shot Synthetic Code Detector via Code Rewriting

  • Abstract
  • Literature Map
  • Citations
  • Similar Papers
Abstract

Large Language Models (LLMs) have demonstrated remarkable proficiency in generating code. However, the misuse of LLM-generated (synthetic) code has raised concerns in both educational and industrial contexts, underscoring the urgent need for synthetic code detectors. Existing methods for detecting synthetic content are primarily designed for general text and struggle with code due to the unique grammatical structure of programming languages and the presence of numerous ``low-entropy'' tokens. Building on this, our work proposes a novel zero-shot synthetic code detector based on the similarity between the original code and its LLM-rewritten variants. Our method is based on the observation that differences between LLM-rewritten and original code tend to be smaller when the original code is synthetic. We utilize self-supervised contrastive learning to train a code similarity model and evaluate our approach on two synthetic code detection benchmarks. Our results demonstrate a significant improvement over existing SOTA synthetic content detectors, delivering notable gains in both performance and robustness on the APPS and MBPP benchmarks.

Similar Papers
  • Research Article

Modernizing 90s Era Software to a New Language and Environment Using LLMs — An Empirical Investigation

  • Jul 31, 2025
  • International Journal of Software Engineering and Knowledge Engineering
  • Dragan Bojić +1
  • Research Article

Unlocking the Potential of Large Language Models in Education: Factors Influencing Adoption by Instructional Designers and Academics

  • Jan 01, 2026
  • Journal of Information Technology Education: Research
  • Katherine L Fourie +2
  • Research Article

Evaluating gpt-4 for zero-shot classification of bleeding and clotting events: Can large language models serve as second reviewers?

  • Nov 03, 2025
  • Blood
  • Samantha Rizzo +5
  • Supplementary Content

Large language and vision-language models for robot: safety challenges, mitigation strategies and future directions

  • Jul 29, 2025
  • Industrial Robot: the international journal of robotics research and application
  • Xiangyu Hu +1
  • Research Article

Research and selection of Large Learning Models for automation of ABAP-code migration

  • Sep 24, 2025
  • Management of Development of Complex Systems
  • Oleg Pozdnyakov +1
  • Research Article

Readability & quality of large language model responses in CAR-T patient education

  • Nov 03, 2025
  • Blood
  • Sridhar Balasubramanian +3
  • Research Article

Application of Large Language Models (LLMs) to Geriatric Practice and Its Evaluation at 4 VA GRECCs

  • Dec 01, 2025
  • Innovation in Aging
  • Huai Cheng +2
  • Research Article

1401 Bringing Medicine Expertise to Your Screen: A New Frontier in Curbside Sleep Consultation Leveraging Large Language Models?

  • May 19, 2025
  • SLEEP
  • Nina Kuei +4
  • Front Matter
  • Citations1

Editorial: Large language models in work and business.

  • Nov 29, 2024
  • Frontiers in artificial intelligence
  • Şadi Evren Şeker
  • Research Article
  • Citations15

Large language models in neurosurgery: a systematic review and meta-analysis.

  • Nov 23, 2024
  • Acta neurochirurgica
  • Advait Patil +5
  • Research Article

#2924 Comparison of large language models and traditional natural language processing techniques in predicting arteriovenous fistula failure

  • May 23, 2024
  • Nephrology Dialysis Transplantation
  • Suman Lama +6
  • Research Article
  • Citations1

Optimization of traditional methods for determining the similarity of project names and purchases using large language models

  • Apr 01, 2024
  • Litera
  • Aleksei Aleksandrovich Golikov +2
  • Conference Article
  • Citations18

Medical Adaptation of Large Language and Vision-Language Models: Are We Making Progress?

  • Jan 01, 2024
  • Daniel P Jeong +3
  • Research Article
  • Citations42

Improving accuracy of GPT-3/4 results on biomedical data using a retrieval-augmented language model.

  • Aug 21, 2024
  • PLOS digital health
  • David Soong +10
  • Research Article
  • Citations178

The ethics of disclosing the use of artificial intelligence tools in writing scholarly manuscripts

  • Jun 15, 2023
  • Research Ethics
  • Mohammad Hosseini +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.