[Paper Review] MASPOB: Bandit-Based Prompt Optimization for Multi-Agent Systems with Graph Neural Networks
MASPOB optimizes prompts for multi-agent LLM workflows by combining topology-aware GNN surrogates with a bandit-based search and coordinate ascent to achieve state-of-the-art results under budget constraints.
Large Language Models (LLMs) have achieved great success in many real-world applications, especially the one serving as the cognitive backbone of Multi-Agent Systems (MAS) to orchestrate complex workflows in practice. Since many deployment scenarios preclude MAS workflow modifications and its performance is highly sensitive to the input prompts, prompt optimization emerges as a more natural approach to improve its performance. However, real-world prompt optimization for MAS is impeded by three key challenges: (1) the need of sample efficiency due to prohibitive evaluation costs, (2) topology-induced coupling among prompts, and (3) the combinatorial explosion of the search space. To address these challenges, we introduce MASPOB (Multi-Agent System Prompt Optimization via Bandits), a novel sample-efficient framework based on bandits. By leveraging Upper Confidence Bound (UCB) to quantify uncertainty, the bandit framework balances exploration and exploitation, maximizing gains within a strictly limited budget. To handle topology-induced coupling, MASPOB integrates Graph Neural Networks (GNNs) to capture structural priors, learning topology-aware representations of prompt semantics. Furthermore, it employs coordinate ascent to decompose the optimization into univariate sub-problems, reducing search complexity from exponential to linear. Extensive experiments across diverse benchmarks demonstrate that MASPOB achieves state-of-the-art performance, consistently outperforming existing baselines.
Motivation & Objective
- Motivate prompt optimization as the primary lever to improve MAS performance when workflow topology is fixed and expert-validated.
- Develop a sample-efficient optimizer that respects topology-induced coupling and limited evaluation budget.
- Propose a framework combining topology-aware prediction, uncertainty-guided exploration, and scalable search for prompt configurations.
- Demonstrate the method’s effectiveness across diverse benchmarks spanning QA, code generation, and mathematics.
Proposed method
- Encode each agent prompt as a d-dimensional embedding and model the MAS workflow as a graph using the adjacency matrix of the DAG.
- Use a Graph Attention Network (GAT) surrogate to predict performance by performing topology-aware message passing over the MAS graph.
- Formulate search as a contextual bandit and apply LinUCB to balance exploitation of predicted high-performing prompts with exploration of uncertain ones.
- Represent prompt combinations as concatenated embeddings and maintain an information matrix to compute uncertainty and construct a UCB acquisition function.
- Decompose the joint prompt optimization into univariate updates with Coordinate Ascent to reduce complexity from exponential to linear in the number of agents.
- Iteratively evaluate the selected prompt combination on the validation set, update the GNN and information matrix, and track the best configuration.
Experimental results
Research questions
- RQ1How can prompt optimization for MAS be made sample-efficient under expensive end-to-end evaluations?
- RQ2Can topology-aware modeling of MAS workflows improve promotion of coordinated prompt configurations?
- RQ3Does a bandit-guided, coordinate-ascent search effectively navigate the combinatorial prompt space under a fixed budget?
- RQ4Do topology-aware surrogates and uncertainty-guided exploration generalize across tasks and LLM backbones?
Key findings
- MASPOB achieves the best results across six benchmarks, with an average score of 80.58%.
- Under the same validation budget of 50 evaluations, MASPOB improves over baselines such as IO, AFlow, and MIPRO by 12.02%, 2.06%, and 1.71% respectively.
- Ablation shows removing the GNN reduces average performance by 2.31%, indicating topology modeling provides meaningful gains.
- MASPOB generalizes to different LLM backbones (Qwen-3-32B) with consistent improvements.
- Coordinate ascent with the MASPOB acquisition function achieves performance close to global search but with huge runtime savings (up to 99.8% faster on HotpotQA).
- On more complex MAS structures, MASPOB remains the top performer among compared methods.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.