Mitigating Collaboration Degeneration in Multi-Agent Code Generation via a Controllable Competitive Collaboration Approach
PDF 由论文原始站点提供,PaperCompass 不保存论文文件。
摘要
Empowered by large language models (LLMs), multi-agent systems (MAS) have shown significant potential in code generation by simulating collaborative workflows. However, we identify a collaboration degeneration phenomenon, where one agent dominates while others remain disengaged, occurring in 38.4% of non-routine HumanEval tasks. Surprisingly, introducing competition among LLM agents eliminates this degeneration and sparks innovation in generated code. Inspired by this catfish effect, we posit that competition helps prevent collaboration degeneration. We thus propose C3, a Controllable Competitive Collaboration framework featuring two novel mechanisms: Centralized Auction-Based Competition (CAB) for role allocation via bidding and Decentralized Communication-Aware Competition (DCC) for solution refinement through opponent-aware adaptation. Evaluated on 70 complex projects from extended SoftwareDev, C3 reduces collaboration degeneration from 32.4% to 12.8%, while enhancing code innovation and diversity. Human evaluations further confirm C3’s superiority in functionality, maintainability, and robustness over purely collaborative or competitive baselines.