arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2603.01814cs.SE
收藏

面向架构的多设计生成用于仓库级特性添加

Architecture-Aware Multi-Design Generation for Repository-Level Feature Addition

Sun Yat-sen University(中山大学)

Mingwei Liu, Zhenxi Chen, Zheng Pei, Zihao Wang, Yanlin Wang, Zibin Zheng

AI总结:

RAIM通过多设计生成和架构感知机制,提升仓库级特性添加的准确性和稳定性。

摘要:

在整个代码库中实现新特性对大型语言模型(LLMs)来说是一个严峻的挑战。这项主动任务需要深入理解整个系统架构,以防止对遗留功能造成意外破坏。传统流程和代理框架在这一领域往往力不从心,因为它们存在架构盲点,并依赖于贪婪的单路径代码生成。为克服这些限制,我们提出了RAIM,一种面向多设计和架构的框架,用于仓库级特性添加。该框架引入了一种定位机制,通过在仓库级代码图上进行多轮探索,准确定位分散的跨文件修改目标。关键在于,RAIM摒弃了线性修补方式,通过生成多个多样化的实现设计。系统随后基于静态和动态分析,采用严格的影响感知选择过程,选择最符合架构要求的补丁,以避免系统退化。在NoCode-bench验证数据集上的全面实验表明,RAIM建立了新的最先进的性能,成功率达到39.47%,相比最强基线提高了36.34%。此外,该方法在各种基础模型上表现出稳健的泛化能力,并使开放式权重模型如DeepSeek-v3.2超越由领先专有模型驱动的基线系统。详细的消融研究证实,多设计生成和影响验证模块对于有效管理复杂依赖关系和减少代码错误至关重要。这些发现突显了结构意识在自动化软件演进中的关键作用。

英文摘要:

Implementing new features across an entire codebase presents a formidable challenge for Large Language Models (LLMs). This proactive task requires a deep understanding of the global system architecture to prevent unintended disruptions to legacy functionalities. Conventional pipeline and agentic frameworks often fall short in this area because they suffer from architectural blindness and rely on greedy single-path code generation. To overcome these limitations, we propose RAIM, a multi-design and architecture-aware framework for repository-level feature addition. This framework introduces a localization mechanism that conducts multi-round explorations over a repository-scale code graph to accurately pinpoint dispersed cross-file modification targets. Crucially, RAIM shifts away from linear patching by generating multiple diverse implementation designs. The system then employs a rigorous impact-aware selection process based on static and dynamic analysis to choose the most architecturally sound patch and avoid system regressions. Comprehensive experiments on the NoCode-bench Verified dataset demonstrate that RAIM establishes a new state-of-the-art performance with a 39.47% success rate, achieving a 36.34% relative improvement over the strongest baseline. Furthermore, the approach exhibits robust generalization across various foundation models and empowers open-weight models like DeepSeek-v3.2 to surpass baseline systems powered by leading proprietary models. Detailed ablation studies confirm that the multi-design generation and impact validation modules are critical to effectively managing complex dependencies and reducing code errors. These findings highlight the vital role of structural awareness in automated software evolution.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑