From Tokens to Files: Multi-Granularity Detection and Localization of AI-Involved Code
Read the original on Hugging Face Trending Papers →The Flow has not summarised this story yet — read it at Hugging Face Trending Papers.
The Flow has not summarised this story yet — read it at Hugging Face Trending Papers.
The paper introduces a multi-granularity framework for detecting AI involvement in code, distinguishing human-written from AI-generated or modified files and localizing the specific lines or blocks. It uses a frozen code language model with low-rank adapters trained on machine- and human-written data, producing per-token log-likelihood ratios that feed lightweight heads for line, block, and file-level predictions. Evaluated on thousands of mixed-authorship files, the method achieves high macro F1 scores and maintains low false-positive rates on real human code.
arXiv:2606. 12620v1 Announce Type: cross Abstract: Thanks to the rapid adoption of AI code assistants powered by large language models (LLMs), industry codebases are, increasingly, a hybrid of AI- and human-authored code.
arXiv:2606. 06481v1 Announce Type: cross Abstract: As AI writing assistants become increasingly integrated into real-world drafting and revision workflows, many documents are no longer purely human-written or AI-generated, but instead result from progressive human-AI co-editing.
The paper argues that current AI‑text detection methods, which estimate human contribution by measuring how predictive a user’s prompt is of the final text, can be easily manipulated. By introducing SPECIFICITY PADDING—adding random IDs to the prompt—the authors show that a title‑only request can appear far more human than one containing the article’s key ideas, and that scores can swing dramatically when the evaluator’s view of the prompt is altered. Across a range of large language models, the same documents can be scored as 85 % human or 15 % human depending solely on the prompt used, revealing a fundamental limitation of likelihood‑based metrics for reliably measuring human authorship. whyItMatters":"The study demonstrates that likelihood‑based scores cannot reliably establish human contribution without additional evidence of what the person added and how the text was produced."
arXiv:2607. 21458v1 Announce Type: new Abstract: The rise of human-AI collaborative writing has created a growing need for fine-grained detection methods that support localizing likely LLM-generated content in mixed-authorship documents.
The rise of human-AI collaborative writing has created a growing need for fine-grained detection methods that support localizing likely LLM-generated content in mixed-authorship documents. Existing methods for detecting LLM-generated text mainly focus on document-level classification and cannot identify which parts of the text are generated by LLMs.