Detecting LLM-generated Code with Subtle Modification by Adversarial Training
Xin Yin, Xinrui Li, Chao Ni, Xiaodan Xu, Xiaohu Yang

TL;DR
This paper introduces CodeGPTSensor+, an adversarial training method that significantly improves the robustness and accuracy of detecting LLM-generated code, even when the code has been manually modified.
Contribution
The paper presents CodeGPTSensor+, a novel adversarial training approach with MIST for generating adversarial samples, enhancing detection robustness against code modifications.
Findings
Significantly improved detection accuracy on adversarial code samples.
Maintains high accuracy on original code detection.
Demonstrates superior robustness over previous methods.
Abstract
With the rapid development of Large Language Models (LLMs), their powerful code-generation capabilities have been widely applied in tasks like code completion and automated development, demonstrating the value of improving coding efficiency. However, the extensive use of LLM-generated code also raises several new challenges. On the one hand, issues such as the regulation of code provenance, copyright disputes, and code quality have become increasingly concerning. How to effectively detect LLM-generated code and ensure its compliant and responsible use has become a critical and urgent issue. On the other hand, in practical applications, LLM-generated code is often subject to manual modifications, such as variable renaming or structural adjustments. Although some recent studies have proposed training-based and zero-shot methods for detecting LLM-generated code, these approaches show…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsIntegrated Circuits and Semiconductor Failure Analysis · Metal and Thin Film Mechanics · Advanced Surface Polishing Techniques
