DynaSwarm: Dynamically Graph Structure Selection for LLM-based Multi-agent System

Hui Yi Leong, Yuqing Wu
7/31/2025
cs.LGcs.AIcs.MA

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Current multi-agent systems (MAS) frameworks often rely on manually designed and static collaboration graph structures, limiting adaptability and performance. To address these limitations, we propose DynaSwarm, a dynamic framework that enhances LLM-based MAS through two key innovations: (1) an actor-critic reinforcement learning (A2C) mechanism to optimize graph structures with improved stability over prior RL methods, and (2) a dynamic graph selector that adaptively chooses the optimal graph structure for each input sample via parameter-efficient LLM fine-tuning. DynaSwarm eliminates the need for rigid, one-fits-all graph architectures, instead leveraging sample-specific idiosyncrasies to dynamically route queries through specialized agent networks. (c) We propose to fine-tune the demonstration retriever to fully exploit the power of in-context learning (ICL). Extensive experiments on question answering, mathematical reasoning, and coding tasks demonstrate that DynaSwarm consistently outperforms state-of-the-art single-agent and MAS baselines across multiple LLM backbones. Our findings highlight the importance of sample-aware structural flexibility in LLM MAS designs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default β€” verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{leong2025dynaswarm,
  title  = {DynaSwarm: Dynamically Graph Structure Selection for LLM-based Multi-agent System},
  author = {Hui Yi Leong and Yuqing Wu},
  year   = {2025},
  eprint = {2507.23261},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.23261v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.23261.svg)](https://codeofpaper.com/paper/2507.23261)

Discussion