Arrow Research search
Back to EAAI

EAAI 2025

Detecting code paraphrased by large language models using coding style features

Journal Article journal-article Applied Artificial Intelligence ยท Artificial Intelligence

Abstract

Recent progress in large language models (LLMs) for code generation has raised serious concerns about intellectual property protection. Malicious users can exploit LLMs to produce paraphrased versions of proprietary code that closely resemble the original. While the potential for LLM-assisted code paraphrasing continues to grow, research on detecting it remains limited, underscoring an urgent need for a detection system. We respond to this need by proposing two tasks. The first task is to detect whether code generated by an LLM is a paraphrased version of original human-written code. The second task is to identify which LLM is used to paraphrase the original code. For these tasks, we construct a dataset consisting of pairs of human-written code and LLM-paraphrased code using various LLMs. We statistically confirm significant differences in the coding styles of human-written and LLM-paraphrased code, particularly in terms of naming consistency, code structure, and readability. Based on these findings, we develop a detection method that identifies paraphrase relationships between human-written and LLM-generated code, and discover which LLM is used for the paraphrasing. Our detection method outperforms the best baselines in two tasks, improving F1 scores by 2. 64% and 15. 17% while achieving speedups of 1, 343x and 213x, respectively.

Authors

Keywords

  • Detecting paraphrased codes
  • Large language models
  • Benchmark dataset
  • Feature engineering

Context

Venue
Engineering Applications of Artificial Intelligence
Archive span
1988-2026
Indexed papers
13269
Paper id
1148171345859288939
v2026.09.13