用多智能体协作提升编程算法求解能力,效果远超传统调参。
MAS-Algorithm: A Workflow for Solving Algorithmic Programming Problems with a Multi-Agent System

- 设计模块化多智能体流程,模拟程序员解题思路。
- 在自建数据集上平均提升6.48%通过率,优于微调的0.89%。
- 可解释性强,适合研究算法推理与系统优化的开发者。
算法问题求解是检验AI代码系统结构化推理能力的重要基准,直接反映模型在复杂场景下的推理水平。现有方法主要依赖模型中心策略(如架构改进和数据扩展),成本高且可解释性差;而利用外部工具或提示技术(如思维链)的方法往往碎片化,缺乏统一框架。本文提出MAS-Algorithm,一个受竞赛程序员与算法工程师实践启发的系统性多智能体工作流。该框架将端到端求解过程分解为模块化阶段,支持结构化推理、工具集成与智能体间灵活协作。设计兼顾严谨性与可扩展性,能泛化至多种问题类型。在自建基准上的实验表明,对多个Qwen系列模型均实现稳定提升,平均通过率提高6.48%;相较之下,同数据上的参数高效微调仅带来0.89%的微弱改善。此外,在LiveCodeBench-Pro上获得4.72%的提升,并在其他准确率与效率指标上持续优化。我们还进行了深入分析,揭示了工作流中的错误模式与跨场景行为特征。通过定制替换与消融实验,发现单个智能体贡献最高可达27.7%的性能提升。这些结果凸显了MAS-Algorithm在推动AI驱动算法推理方面的巨大潜力。
原文摘要 · Abstract (English)
Algorithmic problem solving serves as a rigorous testbed for evaluating structured reasoning in AI coding systems, as it directly reflects a model's ability to perform structured reasoning in complex scenarios. Existing approaches predominantly rely on model-centric strategies, such as architectural modifications and data scaling, which are costly and offer limited interpretability. Alternative methods leveraging external tools or prompting techniques (e.g., chain-of-thought) are often fragmented and lack a unified framework. In this paper, we propose MAS-Algorithm, a systematic multi-agent workflow for algorithmic problem solving inspired by the practices of competitive programmers and algorithm engineers. Our framework decomposes the end-to-end solving process into modular stages, enabling structured reasoning, tool integration, and flexible coordination among agents. The design emphasizes both rigor and extensibility, allowing it to generalize across diverse problem types. Experimental results on a self-constructed benchmark demonstrate consistent improvements across multiple Qwen series models, achieving an average gain of 6.48% in acceptance rate. In contrast, parameter-efficient fine-tuning on the same data yields only a marginal improvement of 0.89%. We further observe a 4.72% gain on LiveCodeBench-Pro, along with consistent improvements across additional accuracy and efficiency metrics. Beyond performance gains, we conduct comprehensive analyses to better understand the reasoning process within the workflow, including error patterns and cross-scenario behaviors. We further perform customized replacement and ablation studies to explore the upper bound of the framework, showing that individual agents can contribute improvements of up to 27.7%. These results highlight the strong potential of MAS-Algorithm for advancing AI-driven algorithmic reasoning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。