MAAD: Automate Software Architecture Design through Knowledge-Driven Multi-Agent Collaboration

📄 arXiv: 2507.21382v1 📥 PDF

作者: Ruiyin Li, Yiran Zhang, Xiyu Zhou, Peng Liang, Weisong Sun, Jifeng Xuan, Zhi Jin, Yang Liu

分类: cs.SE, cs.AI

发布日期: 2025-07-28

备注: 23 pages, 8 images, 1 table, Manuscript submitted to a journal (2025)


💡 一句话要点

MAAD:通过知识驱动的多智能体协作实现软件架构设计的自动化

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 软件架构设计 多智能体系统 自动化 大型语言模型 知识驱动 质量属性评估

📋 核心要点

  1. 软件架构设计复杂且知识密集,传统方法依赖人工,耗时且设计方案有限,难以满足敏捷开发的需求。
  2. MAAD框架通过构建知识驱动的多智能体系统,协调分析师、建模师、设计师和评估师,实现架构设计的自动化。
  3. 实验结果表明,MAAD能够生成更全面的架构组件和结构化的评估报告,并得到了工业界架构师的认可,验证了其可用性。

📝 摘要(中文)

软件架构设计是软件开发中至关重要但又复杂且知识密集的一个阶段。它需要深厚的领域专业知识、开发经验、架构知识、对相互竞争的质量属性进行仔细权衡以及适应不断变化的需求的能力。传统上,这个过程耗时且劳动密集,并且严重依赖架构师,这通常导致设计方案有限,尤其是在敏捷开发的压力下。虽然基于大型语言模型(LLM)的智能体在各种软件工程任务中表现出良好的性能,但它们在架构设计中的应用仍然相对稀少,需要更多的探索,尤其是在多样化的领域知识和复杂的决策制定方面。为了应对这些挑战,我们提出了MAAD(多智能体架构设计),这是一个自动化框架,它采用知识驱动的多智能体系统(MAS)进行架构设计。MAAD协调四个专门的智能体(即分析师、建模师、设计师和评估师),以协作方式解释需求规范,并生成包含基于质量属性的评估报告的架构蓝图。然后,我们通过案例研究和与最先进的MAS基线MetaGPT的比较实验来评估MAAD。我们的结果表明,MAAD的优势在于生成全面的架构组件并提供有见地的结构化架构评估报告。来自11个需求规范的工业架构师的反馈进一步加强了MAAD的实际可用性。最后,我们探索了MAAD框架在使用三个LLM(GPT-4o、DeepSeek-R1和Llama 3.3)时的性能,发现GPT-4o在生成架构设计方面表现更好,这强调了在MAS驱动的架构设计中LLM选择的重要性。

🔬 方法详解

问题定义:软件架构设计是一个复杂且知识密集的过程,传统方法依赖于经验丰富的架构师,耗时费力,且难以在敏捷开发环境下快速生成多种设计方案。现有方法缺乏自动化工具,难以充分利用领域知识和进行全面的质量属性评估。

核心思路:论文的核心思路是利用多智能体系统(MAS)模拟架构师团队的协作过程,每个智能体负责不同的角色(分析、建模、设计、评估),通过知识共享和协同工作,自动化地生成软件架构设计方案。这种方法旨在提高效率、减少人工干预,并提供更全面的设计方案和质量评估。

技术框架:MAAD框架包含四个主要智能体:分析师(Analyst)、建模师(Modeler)、设计师(Designer)和评估师(Evaluator)。分析师负责解析需求规范,提取关键信息;建模师基于需求信息构建架构模型;设计师根据模型生成具体的架构组件;评估师则根据质量属性对架构设计进行评估,并生成评估报告。整个流程通过知识库驱动,智能体之间通过消息传递进行协作。

关键创新:MAAD的关键创新在于将多智能体系统与软件架构设计相结合,通过知识驱动的方式,实现了架构设计的自动化。与传统的基于规则或模板的方法相比,MAAD能够更好地处理复杂的需求和生成多样化的设计方案。此外,MAAD还集成了质量属性评估,为架构师提供了更全面的决策支持。

关键设计:论文中没有详细描述具体的参数设置、损失函数或网络结构等技术细节。但可以推断,每个智能体内部可能使用了LLM进行任务处理,并且智能体之间的通信和知识共享机制是关键的设计要素。此外,质量属性评估模块可能使用了预定义的评估指标和算法。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,MAAD在生成全面的架构组件和结构化的评估报告方面优于MetaGPT。来自工业界架构师的反馈也表明,MAAD具有实际可用性。此外,论文还评估了不同LLM在MAAD框架中的性能,发现GPT-4o在架构设计方面表现更好,强调了LLM选择的重要性。

🎯 应用场景

MAAD可应用于各种软件系统的架构设计,尤其适用于需求复杂、质量属性要求高的场景。它可以帮助软件开发团队快速生成多种架构设计方案,并进行全面的质量评估,从而提高开发效率和软件质量。未来,MAAD可以与持续集成/持续部署(CI/CD)流程集成,实现架构设计的自动化演进。

📄 摘要(原文)

Software architecture design is a critical, yet inherently complex and knowledge-intensive phase of software development. It requires deep domain expertise, development experience, architectural knowledge, careful trade-offs among competing quality attributes, and the ability to adapt to evolving requirements. Traditionally, this process is time-consuming and labor-intensive, and relies heavily on architects, often resulting in limited design alternatives, especially under the pressures of agile development. While Large Language Model (LLM)-based agents have shown promising performance across various SE tasks, their application to architecture design remains relatively scarce and requires more exploration, particularly in light of diverse domain knowledge and complex decision-making. To address the challenges, we proposed MAAD (Multi-Agent Architecture Design), an automated framework that employs a knowledge-driven Multi-Agent System (MAS) for architecture design. MAAD orchestrates four specialized agents (i.e., Analyst, Modeler, Designer and Evaluator) to collaboratively interpret requirements specifications and produce architectural blueprints enriched with quality attributes-based evaluation reports. We then evaluated MAAD through a case study and comparative experiments against MetaGPT, a state-of-the-art MAS baseline. Our results show that MAAD's superiority lies in generating comprehensive architectural components and delivering insightful and structured architecture evaluation reports. Feedback from industrial architects across 11 requirements specifications further reinforces MAAD's practical usability. We finally explored the performance of the MAAD framework with three LLMs (GPT-4o, DeepSeek-R1, and Llama 3.3) and found that GPT-4o exhibits better performance in producing architecture design, emphasizing the importance of LLM selection in MAS-driven architecture design.