跳到正文
arXiv:cs.AI· Xinyuan Song, Zekun Cai, Liang Zhao·· 23 小时前

AI 审查自身代码:代码 LLM 的递归自训练崩溃

When AI Reviews Its Own Code: Recursive Self-Training Collapse in Code LLMs

AI 导读

研究对比了代码 LLM 的三种递归微调机制:无审查、编译与静态检查等外生门控审查、以及基于困惑度和二值自评分的 AI 自门控审查。在多个代码 LLM 和 benchmark 上,所有递归机制的表现均低于各自起点;AI 自门控早期看似有效,后期却进入"橡皮图章"状态——接受分数上升而 benchmark 正确率下降。

正文

View PDF HTML (experimental)

Abstract:Recursive self-training can degrade neural generative models when generated data is reused without fresh human data or external quality control. We study this risk in code LLMs, where AI-generated code can enter real repositories, later become training data, and create a repository-scale self-training loop. While software development traditionally interrupts this loop through pull-request review, tests, compilation, and human approval, AI coding tools now produce code faster than humans can review it, and code review itself is increasingly automated by AI systems. We therefore compare three recursive fine-tuning regimes: no review, human-style exogenous-gate review using model-independent filters such as compilation and static quality checks, and AI-self-gate review using the code LLM's own signals such as perplexity and binary self-scoring. Across multiple code LLMs and benchmarks, every tested recursive regime falls below its own starting point; exogenous filters preserve executable validity and sometimes reduce decline, while AI-self-gate filters can look strong early but later lose their filtering effect. In the clearest case, the binary self-gate enters a rubber-stamp regime where acceptance scores rise while benchmark correctness falls. We explain this behavior by formulating review as gated distributional reweighting, proving that AI self-gating degenerates to ungated self-training under a self-confirming acceptance condition, and giving a spectral analysis of representation-level covariance concentration under recursive retraining. These results suggest that stable recursive code LLM training requires exogenous verification rather than model-coupled self-review.
Comments: Under Review
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
Cite as: arXiv:2606.28438 [cs.SE]
  (or arXiv:2606.28438v2 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2606.28438

arXiv-issued DOI via DataCite

Submission history

From: Zekun Cai [view email]
[v1] Fri, 26 Jun 2026 07:35:43 UTC (1,298 KB)
[v2] Mon, 12 Oct 2026 05:08:08 UTC (1,874 KB)

来源:arXiv:cs.AI · arxiv.org