arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.24284cs.SEcs.AIcs.MA
收藏

规范鸿沟:在代码代理中部分知识下的协调失败

The Specification Gap: Coordination Failure Under Partial Knowledge in Code Agents

Catalan Institute of Nanoscience and Nanotechnology (ICN2), CSIC and BIST(加泰罗尼亚纳米科学与纳米技术研究所(ICN2),西班牙国家科研 council(CSIC)和巴塞罗那技术研究所(BIST))

Camilo Chacón Sartori

AI总结:

研究代码代理在部分知识下的协调失败问题,发现规范鸿沟导致两代理整合准确率下降,信息不对称和协调成本是主要因素,支持以规范为导向的多代理代码生成观点。

摘要:

当多个基于LLM的代码代理独立实现同一类的各个部分时,它们必须就共享的内部表示达成一致,即使规范未明确这些选择。本文研究了51个类生成任务中的协调问题,逐步减少规范细节从完整文档字符串(L0)到仅保留签名(L3),并引入对立的结构偏见(列表vs字典)来测试整合。三个发现:首先,持续的规范鸿沟:两代理整合准确率从58%降至25%,而单代理基准下降更温和(89%到56%),留下25-39个百分点的协调鸿沟,这在两个Claude模型(Sonnet, Haiku)和三次独立运行中保持一致。其次,基于AST的冲突检测器在最弱规范级别达到97%的精度,无需额外LLM调用,但因子恢复实验显示,恢复完整规范可恢复单代理天花板(89%),而提供冲突报告无明显益处。第三,将鸿沟分解为协调成本(+16 pp)和信息不对称(+11 pp)表明,这两个效应是独立且近似相加的。鸿沟不仅仅是隐藏信息的后果,而是没有共享决策时产生兼容代码的难度。这些结果支持以规范为导向的多代理代码生成观点:更丰富的规范是主要的协调机制和充分的恢复工具。

英文摘要:

When multiple LLM-based code agents independently implement parts of the same class, they must agree on shared internal representations, even when the specification leaves those choices implicit. We study this coordination problem across 51 class-generation tasks, progressively stripping specification detail from full docstrings (L0) to bare signatures (L3), and introducing opposing structural biases (lists vs. dictionaries) to stress-test integration. Three findings emerge. First, a persistent specification gap: two-agent integration accuracy drops from 58% to 25% as detail is removed, while a single-agent baseline degrades more gracefully (89% to 56%), leaving a 25--39 pp coordination gap that is consistent across two Claude models (Sonnet, Haiku) and three independent runs. Second, an AST-based conflict detector achieves 97% precision at the weakest specification level without additional LLM calls, yet a factorial recovery experiment shows that restoring the full specification alone recovers the single-agent ceiling (89%), while providing conflict reports adds no measurable benefit. Third, decomposing the gap into coordination cost (+16 pp) and information asymmetry (+11 pp) suggests that the two effects are independent and approximately additive. The gap is not merely a consequence of hidden information, but reflects the difficulty of producing compatible code without shared decisions. These results support a specification-first view of multi-agent code generation: richer specifications are both the primary coordination mechanism and the sufficient recovery instrument.

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

↑