Yue Xu, Xiyang Wang, Hui Liu, Bolei He · 2026 · arXiv (Cornell University)
DOI: 10.48550/arxiv.2610.27863 · cited by 0 works (OpenAlex) · open-access PDF
Mức sử dụng ngày càng tăng của các mô hình ngôn ngữ lớn để tạo mã yêu cầu các phương pháp phân biệt mã được viết bởi con người hoàn toàn từ mã liên quan đến AI: các tập tin trong đó bất kỳ phần nào, dù nhỏ, được tạo ra hoặc thay đổi đáng kể bởi một mô hình. Ngoài việc đánh dấu các tập tin như vậy, chúng tôi nhằm mục đích định vị các dòng hoặc khối có thể được quy cho AI. Các phương pháp tiếp cận hiện có nén một tập tin trên một điểm số duy nhất, từ các tính năng phong cách trên bề mặt hoặc đại diện mã toàn cầu, trong đó trung bình các bằng chứng giữa các tập tin được viết bằng máy và nhân tạo, khi chỉ có một vài khối được tham gia AI. Chúng tôi đề xuất một khuôn khổ mà mô hình AI tác giả ở cấp độ 2,5 và dự đoán các dòng, khối và các tập tin trong sáu cấp độ. Trên một mô hình mã
Machine translation (Meta M2M100); the English original follows.
The increasing use of large language models for code generation calls for methods that distinguish purely human-written code from AI-involved code: files in which any part, however small, was generated or substantially modified by a model. Beyond flagging such files, we aim to localize the lines or blocks attributable to AI. Existing approaches compress a file into a single score, from surface stylistic features or a global code representation, which averages away the evidence when only a few blocks are AI-involved. We propose a framework that models AI authorship at the token level and predicts at the line, block, and file levels. A frozen code language model is equipped with two low-rank adapters, trained separately on machine-written and human-written files; their per-token log-likelihood ratio provides local evidence of AI authorship. Lightweight heads aggregate this evidence within lines and blocks, using the surrounding code context, and their local predictions are aggregated into a file-level decision. We train on mixed-authorship files built from human originals and their AI-generated or AI-modified counterparts, including continuation and fill-in-the-middle scenarios. On an internal test set of 11,773 AI-involved files across six generation regimes against 2,541 human files, our method reaches 72.4 macro F1 at a 1% FPR operating point. With no adaptation, it reaches 62.5 line-level F1 on HybridCodeAuthorship, an external human-AI co-writing benchmark with no training split, above the 56 its own paper reports as the best line-level result. On 19,445 human-written files from repositories created before 2022, the false-positive rate stays between 0.55% and 0.81% under the transported 1% threshold, so the operating point holds on real human code.
Read in: English · Spanish · Chinese · Hindi · Arabic · Portuguese · French · German · Japanese · Russian · Korean · Indonesian · Vietnamese
Topics: Computer science, Code (set theory), Flagging, Set (abstract data type), Language model, Benchmark (surveying)
GET https://store.agentexchange.work/gw/papers/verify?title=...&year=... (0.003 USD), fetch this record as JSON with /gw/papers/paper?id=2610.27863, or list what it cites with /gw/papers/references?id=.... Pay per call in USDC (x402) or with a 19 USD card key for 1,000 calls. Catalogue · llms.txtSources: OpenAlex (CC0), arXiv, Crossref. Agent Exchange