arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.02138cs.SEcs.AI
收藏

CAM:基于因果分析的多智能体代码生成系统分析框架

CAM: A Causality-based Analysis Framework for Multi-Agent Code Generation Systems

The Hong Kong University of Science and Technology(香港科学与技术大学);The University of Tokyo(东京大学)

Zongyi Lyu, Zhenlan Ji, Songqiang Chen, Liwen Wang, Yuheng Huang, Shuai Wang, Shing-Chi Cheung

AI总结:

CAM提出一种基于因果分析的框架,用于分析多智能体代码生成系统中中间特征对系统正确性的贡献,通过实证分析揭示了依赖上下文的特征和混合架构的优势。

摘要:

尽管多智能体代码生成系统(MACGS)取得了显著成功,但多智能体架构的内在复杂性产生了大量中间输出。截至目前,这些中间输出对系统正确性的个体重要性仍然不透明,这阻碍了针对MACGS设计的有针对性优化。为了解决这一挑战,我们提出了CAM,第一个基于因果分析的MACGS分析框架,系统地量化了不同中间特征对系统正确性的贡献。通过全面分类中间输出并系统地模拟中间特征上的现实错误,我们识别出对系统正确性重要的特征并汇总其重要性排名。我们对识别的重要性排名进行了广泛的实证分析。我们的分析揭示了引人注目的发现:首先,我们发现了依赖上下文的特征——那些重要性主要通过与其他特征的相互作用出现,揭示了MACGS的质量保证应纳入跨特征一致性检查;其次,我们发现混合后端MACGS,通过根据相对优势分配不同后端LLM,实现了高达7.2%的Pass@1提升,凸显了混合架构作为未来MACGS设计的有前途方向。我们进一步通过两个应用证明了CAM的实用价值:(1)故障修复通过优化前3名重要性排名的特征,实现了73.3%的成功率;(2)特征修剪将中间token消耗减少了高达66.8%,同时保持生成性能。我们的工作为MACGS设计和部署提供了可操作的见解,确立了因果分析作为理解和改进MACGS的强大方法。

英文摘要:

Despite the remarkable success that Multi-Agent Code Generation Systems (MACGS) have achieved, the inherent complexity of multi-agent architectures produces substantial volumes of intermediate outputs. To date, the individual importance of these intermediate outputs to the system correctness remains opaque, which impedes targeted optimization of MACGS designs. To address this challenge, we propose CAM, the first \textbf{C}ausality-based \textbf{A}nalysis framework for \textbf{M}ACGS that systematically quantifies the contribution of different intermediate features for system correctness. By comprehensively categorizing intermediate outputs and systematically simulating realistic errors on intermediate features, we identify the important features for system correctness and aggregate their importance rankings. We conduct extensive empirical analysis on the identified importance rankings. Our analysis reveals intriguing findings: first, we uncover context-dependent features\textemdash features whose importance emerges mainly through interactions with other features, revealing that quality assurance for MACGS should incorporate cross-feature consistency checks; second, we reveal that hybrid backend MACGS with different backend LLMs assigned according to their relative strength achieves up to 7.3\% Pass@1 improvement, underscoring hybrid architectures as a promising direction for future MACGS design. We further demonstrate CAM's practical utility through two applications: (1) failure repair which achieves a 73.6\% success rate by optimizing top-3 importance-ranked features and (2) feature pruning that reduces up to 33.6\% intermediate token consumption while maintaining generation performance. Our work provides actionable insights for MACGS design and deployment, establishing causality analysis as a powerful approach for understanding and improving MACGS.

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

↑