Researchers have developed a new framework to detect and localize AI-generated code within files. This method models AI authorship at the token level, using a code language model with low-rank adapters to analyze per-token log-likelihood ratios. The system then aggregates this evidence to predict AI involvement at the line, block, and file levels, offering a more granular approach than existing methods that provide only a single score per file. The framework achieved a 72.4 macro F1 score on an internal test set and demonstrated a low false-positive rate on pre-2022 human-written code. AI
IMPACT This framework could improve code integrity and security by accurately identifying AI-generated code segments.
RANK_REASON This is a research paper detailing a new framework for code analysis.
Read on Hugging Face Daily Papers →
AI-generated summary · Google Gemini · from 2 sources. How we write summaries →