paperbot · PL 论文追踪

全部论文 待读 收藏

P2 FastCoder: Accelerating Repository-level Code Generation via Efficient Retrieval and Verification

FastCoder:通过高效检索与验证加速仓库级代码生成
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 该论文聚焦于加速 LLM 的仓库级代码生成,采用检索与草稿-验证范式,属于代码生成推理效率优化;它不涉及将静态分析用于 ML/Agentic 程序,也不涉及用 LLM/Agent 改进静态分析、形式化验证、浮点程序分析或贝叶斯程序分析。虽然与代码和 LLM 相关,但研究方向与用户核心画像偏离较大。引用 0 inbox
Qianhui Zhao, Li Zhang, Fang Liu, Xiaoli Lian, Qiaoyuanhe Meng, Ziqian Jiao, Zetong Zhou, Jia Li, Lin Shi
crossref: 2026-09-12

AI 速览

一句话:提出面向代码生成的推理加速方法 FastCoder,用多源检索草稿与验证实现最高约 2.5 倍加速且不损质量。

针对仓库级代码生成延迟敏感、现有 LLM 推理加速方法忽视代码语法语义导致效果有限的问题,提出 FastCoder。它采用 draft-verification 范式,构建包含通用与项目特定知识的多源 datastore 以检索高质量草稿,并通过控制检索时机、并行检索及上下文与 LLM 偏好感知缓存降低开销。实验表明,FastCoder 在仓库级和独立代码生成任务上分别取得最高 2.53× 和 2.54× 的加速,较最先进推理加速方法最高提升 88%;与正确性导向的代码生成方法集成后加速仍可超过 2.6×,且不损害输出质量。

问题
仓库级代码生成对时效性要求高,但 LLM 自回归推理开销大;现有通用加速方法未针对代码的语法语义特性,效果有限。
方法
基于 draft-verification 范式,构建多源 datastore 检索通用与项目特定草稿,并通过控制检索时机、并行检索和上下文与 LLM 偏好感知缓存提高效率。
评估
在仓库级与独立代码生成任务上评测,报告相对自回归解码的加速比、与 SOTA 加速方法的对比,以及与正确性导向代码生成方法集成后的效果。
原文摘要(Abstract)

Code generation is a latency-sensitive task that demands high timeliness. However, with the growing interest and inherent difficulty in repository-level code generation, most existing code generation studies focus on improving the correctness of generated code while overlooking the inference efficiency, which is substantially affected by the overhead during LLM generation. Although there has been work on accelerating LLM inference, these approaches are not tailored to the specific characteristics of code generation; instead, they treat code the same as natural language sequences and ignore its unique syntax and semantic characteristics, which are also crucial for improving efficiency. Consequently, these approaches exhibit limited effectiveness in code generation tasks, particularly for repository-level scenarios with considerable complexity and difficulty. To alleviate this issue, following draft-verification paradigm, we propose FastCoder, a simple yet highly efficient inference acceleration approach specifically designed for code generation, without compromising the quality of the output. FastCoder constructs a multi-source datastore, providing access to both general and project-specific knowledge, facilitating the retrieval of high-quality draft sequences. Moreover, FastCoder reduces the retrieval cost by controlling retrieval timing, and enhances efficiency through parallel retrieval and a context- and LLM preference-aware cache. Experimental results show that FastCoder can reach up to 2.53× and 2.54× speedup compared to autoregressive decoding in repository-level and standalone code generation tasks, respectively, outperforming state-of-the-art inference acceleration approaches by up to 88%. FastCoder can also be integrated with existing correctness-focused code generation approaches to accelerate the LLM generation process, and reach a speedup exceeding 2.6×.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9415,
  title = {FastCoder: Accelerating Repository-level Code Generation via Efficient Retrieval and Verification},
  author = {Qianhui Zhao and Li Zhang and Fang Liu and Xiaoli Lian and Qiaoyuanhe Meng and Ziqian Jiao and Zetong Zhou and Jia Li and Lin Shi},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00190}
}