跳到正文
arXiv cs.CL· Zhenlong Dai, Zhuoluo Zhao, Xiu Tang, Sai Wu, Chang Yao, Zhipeng Gao, Jingyuan Chen·· 11 小时前AI 评分31

用强化学习提升真实场景下的仓库级代码补全

Enhancing Repository-Level Code Completion with Reinforcement Learning in Real-World Scenarios

AI 导读

研究者提出一个面向仓库级代码补全的强化学习框架,通过标识符驱动的意图识别捕捉补全意图,并用奖励驱动的补全学习增强跨文件推理。该框架还引入选择性探索策略,引导模型关注低置信度、高奖励的 token。实验显示该方法显著提升了 Code LLM 的性能,代码与数据集已公开,论文被 EMNLP 2026 接收。

正文 · 原文

View PDF HTML (experimental)

Abstract:The rapid development of large language models (LLMs) for code, which closely aligns with the practical needs of real-world software development, has sparked growing attention in repository-level code completion. However, existing Code LLMs present challenges in focusing on suitable contexts from the repository and in deeply reasoning about cross-file dependencies. To address these challenges, we propose a novel reinforcement learning framework for repository-level code completion. To better understand both in-file and cross-file contexts, we employ identifier-driven intent recognition to capture completion intent, thereby improving the model's performance in real-world scenarios. To enhance cross-file reasoning, we propose a reward-driven completion learning to effectively reward in complex repository completion scenarios. To guide LLMs in completing code that aligns with intended functionality and repository context, we introduce a selective-exploration strategy that directs the model to focus on low-confidence, high-reward tokens, promoting the exploration of valuable, underexplored completion patterns. Experimental results show that our approach significantly improves the performance of Code LLMs. The code and the dataset are available at this https URL.
Comments: Accepted by EMNLP 2026 Main
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2611.07510 [cs.CL]
  (or arXiv:2611.07510v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2611.07510

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Zhenlong Dai [view email]
[v1] Thu, 5 Nov 2026 06:17:01 UTC (271 KB)

来源:arXiv cs.CL · arxiv.org