ChatPaper.aiChatPaper

LLM 생성 자바스크립트의 숨겨진 DNA: 구조적 패턴을 통한 고정확도 저자 식별

The Hidden DNA of LLM-Generated JavaScript: Structural Patterns Enable High-Accuracy Authorship Attribution

October 12, 2025
저자: Norbert Tihanyi, Bilel Cherif, Richard A. Dubniczky, Mohamed Amine Ferrag, Tamás Bisztray
cs.AI

초록

본 논문에서는 대규모 언어 모델(LLM)이 생성한 JavaScript 코드가 어떤 모델에서 생성되었는지를 밝혀내어 신뢰할 수 있는 저자 귀속 및 모델 지문 인식이 가능한지 탐구하는 첫 번째 대규모 연구를 소개합니다. AI 생성 코드의 급속한 증가 속에서, 취약점 탐지, 악성 콘텐츠 표시, 책임성 확보를 위해 저자 귀속은 중요한 역할을 하고 있습니다. 일반적으로 AI 대 인간 탐지는 AI를 단일 범주로 취급하지만, 우리는 동일한 계열이나 파라미터 크기를 가진 모델들 사이에서도 개별 LLM이 독특한 스타일적 특징을 남긴다는 것을 보여줍니다. 이를 위해, 우리는 20개의 대규모 언어 모델에서 생성된 50,000개의 Node.js 백엔드 프로그램으로 구성된 LLM-NodeJS 데이터셋을 소개합니다. 각 프로그램은 네 가지 변형 버전을 가지며, 이는 250,000개의 고유한 JavaScript 샘플과 두 가지 추가 표현(JSIR 및 AST)을 제공하여 다양한 연구 응용에 활용될 수 있습니다. 이 데이터셋을 사용하여, 우리는 전통적인 머신 러닝 분류기를 미세 조정된 Transformer 인코더와 비교 평가하고, 770M 파라미터 CodeT5 모델에서 디코더를 제거하고 수정된 분류 헤드를 추가한 맞춤형 아키텍처인 CodeT5-JSA를 소개합니다. 이 모델은 5개 클래스 귀속에서 95.8%, 10개 클래스에서 94.6%, 20개 클래스에서 88.5%의 정확도를 달성하며, BERT, CodeBERT, Longformer와 같은 다른 테스트 모델을 능가합니다. 우리는 분류기가 프로그램 데이터 흐름과 구조에서 더 깊은 스타일적 규칙성을 포착하며, 표면적 특징에 의존하지 않는다는 것을 입증합니다. 그 결과, 코드 변형, 주석 제거, 심각한 코드 변환 후에도 저자 귀속이 효과적으로 유지됩니다. 개방형 과학과 재현성을 지원하기 위해, 우리는 LLM-NodeJS 데이터셋, Google Colab 학습 스크립트 및 관련 자료를 GitHub에 공개합니다: https://github.com/LLM-NodeJS-dataset.
English
In this paper, we present the first large-scale study exploring whether JavaScript code generated by Large Language Models (LLMs) can reveal which model produced it, enabling reliable authorship attribution and model fingerprinting. With the rapid rise of AI-generated code, attribution is playing a critical role in detecting vulnerabilities, flagging malicious content, and ensuring accountability. While AI-vs-human detection usually treats AI as a single category we show that individual LLMs leave unique stylistic signatures, even among models belonging to the same family or parameter size. To this end, we introduce LLM-NodeJS, a dataset of 50,000 Node.js back-end programs from 20 large language models. Each has four transformed variants, yielding 250,000 unique JavaScript samples and two additional representations (JSIR and AST) for diverse research applications. Using this dataset, we benchmark traditional machine learning classifiers against fine-tuned Transformer encoders and introduce CodeT5-JSA, a custom architecture derived from the 770M-parameter CodeT5 model with its decoder removed and a modified classification head. It achieves 95.8% accuracy on five-class attribution, 94.6% on ten-class, and 88.5% on twenty-class tasks, surpassing other tested models such as BERT, CodeBERT, and Longformer. We demonstrate that classifiers capture deeper stylistic regularities in program dataflow and structure, rather than relying on surface-level features. As a result, attribution remains effective even after mangling, comment removal, and heavy code transformations. To support open science and reproducibility, we release the LLM-NodeJS dataset, Google Colab training scripts, and all related materials on GitHub: https://github.com/LLM-NodeJS-dataset.
PDF22October 14, 2025