TL;DR
This paper introduces OMAC, a novel framework for systematically optimizing Large Language Model (LLM)-based Multi-Agent Systems (MAS). By identifying five key dimensions of MAS optimization (agent functionality and collaboration structure) and employing a unique "Semantic Initializer" and "Contrastive Comparator" approach, OMAC significantly enhances MAS performance across various complex tasks, outperforming existing methods.
What Problem Does This Paper Address?
LLM-powered agents are revolutionizing complex problem-solving, and Multi-Agent Systems (MAS) are a natural extension, enabling agents to collaborate. However, designing and optimizing these MAS is currently a manual, handcrafted process. Existing research often focuses on either agent capabilities or collaboration structures in isolation, lacking a holistic approach. This leaves a significant gap in systematically improving LLM-based MAS, hindering their full potential in sophisticated, multi-step tasks like code generation and complex reasoning.
Methods
OMAC tackles this challenge with a two-pronged approach:
- Five Optimization Dimensions: The authors define five key dimensions for MAS optimization:
- Agent Functionality (Fun-1, Fun-2): Optimizing existing agents' prompts/examples and constructing new agents.
- Collaboration Structure (Str-1, Str-2, Str-3): Optimizing candidate agent selection, dynamic agent participation, and agent communication flows.
- Two LLM-Powered Actors:
- Semantic Initializer: This actor generates an initial set of candidate agents or controllers by exploring the semantic space of prompts and few-shot examples, guided by the task description and the specific optimization dimension.
- Contrastive Comparator: This actor takes a "positive-negative" pair of candidates (high and low performing) and uses contrastive reasoning to identify the factors contributing to the performance difference. It then generates a refined candidate expected to perform better.
OMAC employs an iterative process: candidates are generated, evaluated within the MAS on training data, a positive-negative pair is sampled, the Contrastive Comparator refines the candidate, and this cycle repeats. The framework also supports joint optimization across multiple dimensions.
Datasets
The paper evaluates OMAC on several standard benchmarks:
- Code Generation: HumanEval (function-level code completions with unit tests) and MBPP (crowd-sourced Python programming tasks).
- General Reasoning: MMLU (multi-choice questions across various academic fields).
- Arithmetic Reasoning: MATH dataset (mathematical problems across seven subareas).
- Complex Scenarios: GAIA (challenging real-world questions requiring multi-modal understanding and tool use).
Key Insights and Ideas
- Holistic Optimization is Key: Optimizing MAS is not just about improving individual agents or their communication; it's about systematically refining both functionality and structure together.
- Contrastive Reasoning as a Supervised Signal: The "positive-negative pair" approach provides a powerful supervised signal for LLMs to learn from performance differences, leading to more effective refinement than unsupervised methods.
- Iterative Refinement Pays Off: The iterative nature of OMAC, where candidates are continuously evaluated and refined, is crucial for achieving substantial performance gains, especially when optimizing multiple dimensions.
- Dimension Selection Matters: For computational efficiency, selectively optimizing dimensions that show the most significant individual improvements is a practical strategy for multi-dimensional optimization.
Key Results
- Single-Dimension Optimization: OMAC consistently outperforms strong baselines across all five optimization dimensions on code generation, general reasoning, and arithmetic reasoning tasks. For example, on arithmetic reasoning, OMAC achieved an accuracy of 35.17% with Fun-1.1 optimization, compared to DyLAN's 32.49%.
- Multi-Dimension Optimization: Jointly optimizing multiple dimensions leads to substantially larger performance improvements than single-dimension optimization. For instance, on arithmetic reasoning, joint optimization of Fun-1.1 and Fun-1.2 increased performance from 2.9% to 9.6%.
- Computational Efficiency: OMAC significantly reduces online inference costs by optimizing agent selection and communication flows, outperforming other multi-agent frameworks.
- Robustness: OMAC demonstrates robustness across different LLMs (GPT-3.5-Turbo, GPT-40-mini, DeepSeek-V2.5, Qwen-2.5-72B), indicating the generalizability of its optimization capabilities.
Limitations and Future Work
- Computational Cost: While OMAC improves inference efficiency, training can still be computationally demanding. The authors suggest using randomly sampled subsets of training data as a practical approach to balance efficiency and robustness.
- Bias in LLMs: The use of LLMs for contrastive reasoning might introduce biases. OMAC mitigates this through rigorous supervised evaluation and iterative refinement, but further research into alternative strategies for bias reduction is suggested.
- Gradient-Based Optimization: Exploring gradient-based methods for MAS optimization is identified as a promising research avenue.
- Advanced Tool Use: Extending OMAC to optimize agent collaboration and utilization of more complex and diverse tools is a future direction.
- Other Optimization Components: Investigating OMAC's effectiveness in optimizing components like memory management and retrieval mechanisms is also proposed.
- Joint Multi-Dimension Optimization: Exploring more efficient protocols for joint multi-dimension optimization, such as gradient blending or Pareto-efficient optimization, is a future research direction.
- Theoretical Guarantees: A deeper theoretical study of the optimization landscape and formal guarantees of optimal configurations is suggested.
Summary updated