I Know Which LLM Wrote Your Code Last Summer: LLM generated Code
  Stylometry for Authorship Attribution
Detecting AI-generated code, deepfakes, and other synthetic content is an
emerging research challenge. As code generated by Large Language Models (LLMs)
becomes more common, identifying the specific model behind each sample is
increasingly important. This paper presents the first systematic study of LLM
authorship attribution for C programs. We released CodeT5-Authorship, a novel
model that uses only the encoder layers from the original CodeT5
encoder-decoder architecture, discarding the decoder to focus on
classification. Our model's encoder output (first token) is passed through a
two-layer classification head with GELU activation and dropout, producing a
probability distribution over possible authors. To evaluate our approach, we
introduce LLM-AuthorBench, a benchmark of 32,000 compilable C programs
generated by eight state-of-the-art LLMs across diverse tasks. We compare our
model to seven traditional ML classifiers and eight fine-tuned transformer
models, including BERT, RoBERTa, CodeBERT, ModernBERT, DistilBERT, DeBERTa-V3,
Longformer, and LoRA-fine-tuned Qwen2-1.5B. In binary classification, our model
achieves 97.56% accuracy in distinguishing C programs generated by closely
related models such as GPT-4.1 and GPT-4o, and 95.40% accuracy for multi-class
attribution among five leading LLMs (Gemini 2.5 Flash, Claude 3.5 Haiku,
GPT-4.1, Llama 3.3, and DeepSeek-V3). To support open science, we release the
CodeT5-Authorship architecture, the LLM-AuthorBench benchmark, and all relevant
Google Colab scripts on GitHub: https://github.com/LLMauthorbench/.
685a6c720e4ad7e2197586f2
Tamas Bisztray
685a6c720e4ad7e2197586f3
Bilel Cherif
claimed_verified
2025-06-24T09:32:57.540Z
64d3db80aea0ccb1b4975d95
https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/Mi0eKzNp6wKFrqketK-DN.png
Bilel Cherif
user
Neo111x
685a6c720e4ad7e2197586f4
Richard A. Dubniczky
claimed_verified
2025-06-24T14:43:49.522Z
66f1a481fa0f7d6823e95149
https://cdn-avatars.huggingface.co/v1/production/uploads/66f1a481fa0f7d6823e95149/2_r8tJZSr95KkezLNDRu7.jpeg
Richard A. Dubniczky
user
dubniczky
685a6c720e4ad7e2197586f5
Nils Gruschka
685a6c720e4ad7e2197586f6
Bertalan Borsos
685a6c720e4ad7e2197586f7
Mohamed Amine Ferrag
claimed_verified
2025-06-24T14:43:51.470Z
64404fbc21ec7c165d859938
https://cdn-avatars.huggingface.co/v1/production/uploads/64404fbc21ec7c165d859938/cM9oS5U44j6N5retQ6ZMX.jpeg
Mohamed Amine Ferrag
user
Ferrag
685a6c720e4ad7e2197586f8
Attila Kovacs
685a6c720e4ad7e2197586f9
Vasileios Mavroeidis
685a6c720e4ad7e2197586fa
Norbert Tihanyi
claimed_verified
2025-06-24T13:36:01.107Z
65ae586052e1b2aae48e01fb
https://cdn-avatars.huggingface.co/v1/production/uploads/65ae586052e1b2aae48e01fb/Ga6PC31XgXlfzCteqInNp.png
Norbert Tihanyi
user
tihanyin
I Know Which LLM Wrote Your Code Last Summer: LLM generated Code
  Stylometry for Authorship Attribution
Detecting AI-generated code, deepfakes, and other synthetic content is an
emerging research challenge. As code generated by Large Language Models (LLMs)
becomes more common, identifying the specific model behind each sample is
increasingly important. This paper presents the first systematic study of LLM
authorship attribution for C programs. We released CodeT5-Authorship, a novel
model that uses only the encoder layers from the original CodeT5
encoder-decoder architecture, discarding the decoder to focus on
classification. Our model's encoder output (first token) is passed through a
two-layer classification head with GELU activation and dropout, producing a
probability distribution over possible authors. To evaluate our approach, we
introduce LLM-AuthorBench, a benchmark of 32,000 compilable C programs
generated by eight state-of-the-art LLMs across diverse tasks. We compare our
model to seven traditional ML classifiers and eight fine-tuned transformer
models, including BERT, RoBERTa, CodeBERT, ModernBERT, DistilBERT, DeBERTa-V3,
Longformer, and LoRA-fine-tuned Qwen2-1.5B. In binary classification, our model
achieves 97.56% accuracy in distinguishing C programs generated by closely
related models such as GPT-4.1 and GPT-4o, and 95.40% accuracy for multi-class
attribution among five leading LLMs (Gemini 2.5 Flash, Claude 3.5 Haiku,
GPT-4.1, Llama 3.3, and DeepSeek-V3). To support open science, we release the
CodeT5-Authorship architecture, the LLM-AuthorBench benchmark, and all relevant
Google Colab scripts on GitHub: https://github.com/LLMauthorbench/.
A novel model, CodeT5-Authorship, is introduced to classify the authorship of C programs generated by Large Language Models, achieving high accuracy compared to traditional and transformer-based classifiers.
Large Language Models LLM authorship attribution CodeT5-Authorship encoder-decoder architecture GELU activation dropout LLM-AuthorBench traditional ML classifiers BERT RoBERTa CodeBERT ModernBERT DistilBERT DeBERTa-V3 Longformer LoRA Qwen2-1.5B binary classification multi-class attribution