Is This You, LLM? Recognizing AI-written Programs with Multilingual Code Stylometry
Not on the map. Why?
Abstract (arXiv)
With the increasing popularity of LLM-based code completers, like GitHub Copilot, the interest in automatically detecting AI-generated code is also increasing-in particular in contexts where the use of LLMs to program is forbidden by policy due to security, intellectual property, or ethical concerns.We introduce a novel technique for AI code stylometry, i.e., the ability to distinguish code generated by LLMs from code written by humans, based on a transformer-based encoder classifier. Differently from previous work, our classifier is capable of detecting AI-written code across 10 different programming languages with a single machine learning model, maintaining high average accuracy across all languages (84.1% ± 3.8%).Together with the classifier we also release H-AIRosettaMP, a novel open dataset for AI code stylometry tasks, consisting of 121 247 code snippets in 10 popular programming languages, labeled as either human-written or AI-generated. The experimental pipeline (dataset, training code, resulting models) is the first fully reproducible one for the AI code stylometry task. Most notably our experiments rely only on open LLMs, rather than on proprietary/closed ones like ChatGPT.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). First posted on arXiv 19 Dec 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 4; 2026: 1.
6 papers.
- 2024AIGCodeSet: A New Annotated Dataset for AI Generated Code Detectioncited by 5
- 2025MultiAIGCD: A Comprehensive dataset for AI Generated Code Detection Covering Multiple Languages, Models,Prompts, and Scenarioscited by 2
- 2025CodeWatcher: IDE Telemetry Data Extraction Tool for Understanding Coding Interactions with LLMscited by 2
- 2025On Developers' Self-Declaration of AI-Generated Code: An Analysis of Practicescited by 1
- 2025code_transformed: The Influence of Large Language Models on Codecited by 0
- 2026GoCoMA: Hyperbolic Multimodal Representation Fusion for Large Language Model-Generated Code Attributioncited by 0
- 2026GoCoMA: Hyperbolic Multimodal Representation Fusion for Large Language Model-Generated Code Attribution24 Mar 2026
- 2025CodeWatcher: IDE Telemetry Data Extraction Tool for Understanding Coding Interactions with LLMs13 Oct 2025
- 2025MultiAIGCD: A Comprehensive dataset for AI Generated Code Detection Covering Multiple Languages, Models,Prompts, and Scenarios29 Jul 2025
- 2025code_transformed: The Influence of Large Language Models on Code13 Jun 2025
- 2025On Developers' Self-Declaration of AI-Generated Code: An Analysis of Practices23 Apr 2025
- 2024AIGCodeSet: A New Annotated Dataset for AI Generated Code Detection21 Dec 2024