用观察共享状态替代通信,让多智能体并行写代码更高效且不冲突。
CodeCRDT: Observation-Driven Coordination for Multi-Agent LLM Code Generation
- 通过观测共享状态实现无锁并发,避免传统消息传递的开销。
- 600次实验中最高提速21.1%,所有任务均100%收敛无合并失败。
- 适合任务结构明确、冲突率低的代码生成场景,可帮助评估并行可行性。
多智能体大模型系统因协调成本高而无法实现并行加速。本文提出CodeCRDT,一种基于观测的协调模式:智能体通过监控具有可观测更新和确定性收敛特性的共享状态进行协作,而非依赖显式消息传递。利用冲突自由复制数据类型(CRDTs),CodeCRDT实现无锁、无冲突的并发代码生成,并保证强最终一致性。在600次试验(6个任务,每种模式50次运行)中评估显示:部分任务最高提速21.1%,另一些任务最慢下降39.4%,但所有任务均实现100%收敛且零合并失败。研究形式化了随机大模型智能体的观察驱动协调机制,揭示语义冲突率为5%-10%,并实证刻画了任务结构对并行协调成功与否的影响。
原文摘要 · Abstract (English)
Multi-agent LLM systems fail to realize parallel speedups due to costly coordination. We present CodeCRDT, an observation-driven coordination pattern where agents coordinate by monitoring a shared state with observable updates and deterministic convergence, rather than explicit message passing. Using Conflict-Free Replicated Data Types (CRDTs), CodeCRDT enables lock-free, conflict-free concurrent code generation with strong eventual consistency. Evaluation across 600 trials (6 tasks, 50 runs per mode) shows both benefits and trade-offs: up to 21.1% speedup on some tasks, up to 39.4% slowdown on others, and 100% convergence with zero merge failures. The study formalizes observation-driven coordination for stochastic LLM agents, revealing semantic conflict rates (5-10%) and quality-performance tradeoffs, and provides empirical characterization of when parallel coordination succeeds versus fails based on task structure.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。