Token-level evidence pinpoints AI-written lines and blocks inside mixed code files

Two low-rank adapters on a frozen code model yield per-token likelihood ratios that locate AI-authored spans within human-written files.

Chinese Tech
Yue Xu · Xiyang Wang · Hui Liu · Bolei He

Peking University · Baidu Inc.

Research Digest··2 min read
Xu, Wang, Liu and He propose a detection framework that keeps evidence at the token level, using two low-rank adapters on a frozen code model, and aggregates that evidence into line, block, and file predictions.

Two LoRA adapters are trained on a frozen code language model, one on machine-written and one on human-written files, with a causal language modeling objective.

§