Source-linked AI summary
Context Learning for Multi-Agent Discussion
Xingyuan Hua, Sheng Yue, Xinyi Li, Yizhe Zhao, Jinrui Zhang, Ju Ren
TL;DR
Current multi-agent discussion methods can produce inconsistent reasoning because agents’ individual contexts are misaligned. M2CL learns adaptive per-agent context generators and improves performance across reasoning, embodied, and mobile-control benchmarks, outperforming existing methods by 20%–50% with limited overhead and transferability across LLM architectures.
Problem
Existing MAD methods struggle with inconsistent reasoning because individual contexts lack aligned inter-LLM guidance and simple correctness criteria ignore dependencies among differently contextualized agents.
Method
M2CL learns a context generator for each agent to dynamically organize and refine per-round instructions, using self-adaptive control of context coherence and output discrepancies.
Results
M2CL consistently outperforms existing methods by 20%–50% across 9 challenging benchmarks, with at most 10% runtime overhead for more than 20% performance gains and transferable improvements across LLM architectures.
Takeaways & Limitations
M2CL improves MAD problem-solving across diverse benchmarks while maintaining computational efficiency and supporting migration of learned context generators across LLM architectures.
Takeaways & Limitations
MAD currently relies on multiple heterogeneous LLMs for diversity, which is computationally inefficient; deployment may also propagate initialization biases or amplify consensus errors in high-stakes domains.
Abstract
from arXiv · showhide
Multi-Agent Discussion (MAD) has garnered increasing attention very recently, where multiple LLM instances collaboratively solve problems via structured discussion. However, we find that current MAD methods easily suffer from discussion inconsistency, LLMs fail to reach a coherent solution, due to the misalignment between their individual contexts.In this paper, we introduce a multi-LLM context learning method (M2CL) that learns a context generator for each agent, capable of dynamically generating context instructions per discussion round via automatic information organization and refinement. Specifically, inspired by our theoretical insights on the context instruction, M2CL train the generators to control context coherence and output discrepancies via a carefully crafted self-adaptive mechanism.It enables LLMs to avoid premature convergence on majority noise and progressively reach the correct consensus. We evaluate M2CL on challenging tasks, including academic reasoning, embodied tasks, and mobile control. The results show that the performance of M2CL significantly surpasses existing methods by 20%--50%, while enjoying favorable transferability and computational efficiency.
1 INTRODUCTION
Multi-Agent Discussion uses multiple LLMs with distinct contexts, but context misalignment can produce inconsistent reasoning and noise-dominated decisions. M2CL dynamically evolves agent contexts and substantially improves performance across challenging benchmarks.
- Multi-Agent Discussion coordinates multiple LLM instances through structured discussion toward a solution consensus.
- Discussion inconsistency arises when rigid, incomplete, or biased contexts fail to guide information fusion across agents.
- M2CL learns a context generator for each agent to organize and refine context instructions at every discussion round.
- M2CL initializes agents with diverse, approximately orthogonal instructions to cover complementary solution perspectives.
- 20%–50% improvement: M2CL consistently outperforms existing methods across 9 benchmarks, with at most 10% runtime overhead for more than 20% gains.
- The learned context generators transfer across different LLM architectures with consistent performance improvement.
2 RELATED WORK
Related work develops multi-agent frameworks for collaborative refinement and context-learning methods for adapting model behavior through input contexts.
- Multi-agent frameworks use iterative generation and evaluation or larger groups of LLMs to improve reasoning beyond single-LLM prompting.
- Context learning modifies input contexts at inference time, including selecting relevant examples or information without gradient-based training.
3 PRELIMINARIES
The preliminaries define context learning as dynamic information organization and formulate MAD contexts as evolving combinations of task goals, discussion history, and generated instructions.
- Context learning organizes instructions, external knowledge, tools, and memory dynamically rather than treating context as a static text string.
- Each MAD agent receives an evolving instruction context containing the task description, available tools, and aggregated knowledge.
- At round t, an agent’s context combines the task goal, other agents’ previous responses, and its current instruction context.
- Unlike static preassigned roles, an instruction generator adaptively refines each agent’s per-step instruction using the task goal and initial instruction.
- After T interaction rounds, MAD obtains the final result by majority voting over outputs from the final round.
4 MOTIVATION
The motivation analyzes how contexts affect MAD through attention activations, showing that initialization should preserve diverse perspectives while evolution should reduce discrepancies and promote consensus.
- Attention activation a(·) provides the basis for quantifying how contexts influence MAD representations.
- Theorem 4.1 assumes an L_a-smooth attention activation function and characterizes the distance between correct-answer and context-induced activations.
- Activation distance measures divergence among agents and deviation from initial contexts, motivating continuous context evolution for coherent reasoning.
- Orthogonal initial activations provide a comprehensive basis for approximating the correct activation, highlighting the value of diverse initial perspectives.
- The resulting design has two stages: initialize contexts for diverse perspectives, then evolve intermediate contexts toward consensus.
5 MULTI-LLM CONTEXT LEARNING
M2CL learns diverse initial contexts and dynamically refines them across discussion rounds to improve coherence among LLM agents. Its objectives combine problem-solving capability, temporal consistency, inter-agent alignment, and adaptive context adjustment.
- Multi-LLM Context Learning: M2CL learns context generators that dynamically adapt each agent’s instructions to the evolving task completion status.The method organizes and refines information across discussion rounds.
- Context Initialization: Initial contexts are selected from a diverse prompt pool to provide distinct reasoning perspectives and expand the solution search space.The initialization mechanism encourages near-orthogonal context activations, so agents contribute non-overlapping information.
- Multi-Round Context Evolving: Fixed individual contexts can produce inconsistent reasoning because they lack instructions for integrating perspectives exchanged among LLMs.M2CL therefore iteratively refines context instructions during collaboration.
- Context Contribution: The round-wise utility criterion evaluates context contributions using both retained problem-solving capability and activation-based consistency with prior responses and other agents.This supplies denser feedback while accounting for dependencies among LLMs with different contexts.
- Multi-Round Context Evolving: A per-agent alternative avoids bias from optimizing against stale snapshots of other agents’ contexts.The resulting criterion decouples inter-agent dependencies during context learning.
- Multi-Round Context Evolving: The self-adaptive balancing mechanism weakens preservation of initial contexts when answers diverge and maintains a constraint as agents approach agreement.This balances initial diversity with progressive convergence and helps prevent premature consensus.
6 EXPERIMENT
M2CL is evaluated across nine datasets and varying numbers of LLMs, with experiments examining comparative performance, efficiency, scaling, context constraints, ablations, discrepancy reduction, and transferability.
- Comparative results: M2CL consistently outperforms baselines across all 9 datasets, including LLM reasoning, embodied agentic tasks, and mobile GUI control.Experiments use datasets spanning MMLU, MATH, GPQA, HumanEval, ALFWorld, SciWorld, GAIA, PDDL, and AndroidWorld.
- Efficiency: M2CL achieves more than 20% performance improvement while increasing runtime by less than 10%.The authors attribute this efficiency to the lightweight context generator.
- Multi-agent scaling law: M2CL performance grows logarithmically before saturation and improves faster than baselines as the number of LLMs increases from 4 to 64.Selected scaling results appear in Figure 4, with full results reported in additional tables and figures.
- Context constraint: Performance initially improves as context constraint β increases, but tends to drop once β becomes sufficiently large.Small β keeps generated contexts close to initial contexts, whereas loose constraints can produce identical answers and insufficient creativity.
- Ablation studies: Context initialization provides high-impact specialized contexts, while context evolution supplies collaborative guidance based on previous responses.Without tuning α, agents may agree in the first round and lose creativity and diversity; without evolution, they cannot effectively leverage other agents’ outputs.
- Discrepancy intensity: M2CL reduces discrepancy intensity faster than other methods, indicating faster convergence of the multiple LLMs’ search space.The discrepancy intensity is defined as maxi,j∈[N] ∥a_i − a_j∥_2.
- Transferability of contexts: Contexts transferred directly to stronger LLMs deliver consistent improvement without additional retraining.This result supports adaptation of the trained context generator across a wider range of models.
7 LIMITATION AND DISCUSSION
The discussion identifies computational inefficiency as a limitation of MAD because diversity depends on multiple LLMs with heterogeneous characteristics, and proposes subtask specialization as future work.
- Limitation and discussion: MAD diversity depends on multiple heterogeneous LLMs, making the framework computationally inefficient.Future work could enable LLMs to capture subtasks they are interested in or particularly suited to solve.
ETHICS STATEMENT
The paper reports improvements in accuracy, diversity, and consensus, while warning that deployment may propagate initialization biases or amplify consensus errors in high-stakes domains.
- Ethics statement: M2CL demonstrates improvements in accuracy, diversity, and consensus across multiple benchmarks.
- Ethics statement: Multi-agent discussion may propagate context-initialization biases or amplify consensus errors, posing risks in legal, financial, and healthcare applications.The passage links these risks to potentially significant ethical, social, or economic consequences.
REPRODUCIBILITY STATEMENT
The paper provides algorithmic and implementation details, source code, checkpoints, and complete theoretical proofs to support reproduction of the reported experiments.
- Reproducibility statement: The paper presents full algorithmic details, additional implementation information, and hyperparameter settings.
- Reproducibility statement: Source code and checkpoints are provided for training, evaluation, and reproducing the reported experiments.
- Reproducibility statement: Complete proofs for the theoretical results are included in Sections B to D.
B PROOF OF THEOREM 4.1
The proof develops bounds connecting attention activations across contexts, using linear-attention approximations, triangle inequalities, smoothness, and constrained optimization steps.
- Activation bounds: Triangle-inequality arguments separately bound the terms contributing to the overall activation difference.The proof bounds the first and second terms in Eq. (18), then combines them using the stated activation-function smoothness property.
- Assumptions: The theoretical development includes a one-block-transformer assumption linking activation diversity to differences between instructions and responses.This assumption motivates measuring context-related diversity through activation differences.
- Attention approximation: The analysis compares softmax attention with linear attention to obtain tractable bounds.The linear-attention form is defined and its deviation from softmax attention is bounded under norm and smoothness assumptions.
- Activation bounds: The proof bounds activation differences between long prompts and combinations of component activations.It decomposes long prompts into components and derives upper bounds through intermediate attention-activation relations.
- Optimization: The final optimization uses a Lagrangian and dual formulation, with α and round-specific quantities optimized subject to an inequality constraint.The constraint is required to keep the minimization well-defined, and the temperature parameter is learned across rounds.
F.1 DATASETS
The evaluation uses seven established datasets across three application areas, with held-out testing and comparisons against six baselines. M2CL training uses an automatically constructed context pool and learned context generators.
- Datasets: The study evaluates M2CL across three areas using seven datasets widely used in prior studies.The listed benchmarks include MMLU, MATH, and GPQA, covering world knowledge, logical reasoning, symbolic mathematics, and graduate-level science questions.
- Datasets: 20% of the questions are used for training and the remainder for testing.The same split supports construction of the training and evaluation sets.
- Baselines: M2CL is compared with six baselines implemented from publicly available implementations.The baselines include single execution, Best-of-N sampling, and several multi-agent discussion methods.
- Implementation: The shared context pool is generated with GPT-4o to cover diverse reasoning perspectives across mathematics, science, coding, embodied reasoning, and domain-specific subcontexts.The pool is shared across tasks and includes multiple domain-specific sub-contexts.
- Implementation: Context generators use T5-small with 512-dimensional context vectors, while generator and α learning rates are both 1e −4.The generator training also uses 20% of the questions for context initialization and generator learning.
- Training procedure: Training first learns context initialization, then jointly trains context generators and α during discussion.The implementation uses PyTorch with Llama2, Qwen2.5, and Qwen2.5-VL parameters on eight NVIDIA H800 GPUs.
G.1 COMPARISON WITH MORE MODELS
Across model scales and varying numbers of participating LLMs, M2CL consistently outperforms the compared methods, with gains reaching 50% and becoming more pronounced as collaboration expands. Its generated contexts also support faster performance growth than baselines.
- Model-scale comparison: M2CL can collaborate weaker Llama models to achieve performance comparable to stronger closed-source models as the number of LLMs increases.Llama-series models perform worse with fewer participants but achieve higher accuracy as participation increases.
- Comparative results: M2CL consistently outperforms existing baselines across nine datasets, often by a significant margin.The comparison varies base models and uses four LLMs in the selected Table 1 results, with full results reported for additional settings.
- Comparative results: 20%–50% performance gains are reported across challenging tasks, particularly complex GUI control and other agentic settings.The paper reports these gains across varying numbers of participating LLMs and emphasizes complex tasks such as math and tool use.
- Model-scale comparison: Performance gains become more pronounced with more participating LLMs across different model scales, with reported improvements reaching 50%.The authors connect this scalability to exploiting diverse responses while maintaining consistency during complex interactions.
- Discussion consistency: Dynamic context adjustment increases the initial discrepancy intensity while enabling faster reduction of disagreement across discussion rounds.The authors associate this pattern with better reception of information from other LLMs and faster convergence toward agreement.
G.7.2 ABLATION
Ablations show that context initialization, adaptive α tuning, and context evolution each support effective multi-agent collaboration. Runtime measurements indicate that M2CL adds little computational cost relative to LLM inference.
- Context initialization: Removing context initialization produces homogeneous policies, duplicated effort, and poor adaptability to novel questions.The ablation supports initializing contexts before discussion to develop specialized expertise.
- Adaptive α tuning: Removing α tuning causes first-round agreement, reducing response creativity, diversity, and problem-solving ability.The result supports tuning α during discussion rounds rather than fixing it throughout training.
- Context evolution: Removing context evolution prevents LLMs from incorporating inter-LLM dependencies, leading to discussion inconsistency and poorer collaboration efficiency.The ablation identifies context evolution as necessary for using information contributed by other agents across rounds.
- Efficiency: M2CL’s runtime is slightly longer than other multi-LLM discussion methods because context-generator runtime is negligible relative to LLM inference.The runtime comparison uses the same model size on eight NVIDIA H800 GPUs.
H.1 CASE STUDY OF M2CL (OURS)
M2CL progressively tightens collaboration instructions across discussion rounds, moving from diverse and potentially conflicting outputs toward a consistent solution. In contrast, Debate with fixed instructions exhibits discussion inconsistency.
- M2CL: M2CL contexts evolve from encouraging attention to others’ responses to requiring cross-checking and full agreement.The progression is shown across the first, intermediate, and final discussion rounds.
- M2CL: The models’ outputs transition from diverse, potentially conflicting answers toward a consistent solution as the generated contexts become stricter.This illustrates context evolution guiding consensus while retaining initial diversity.
- M2CL: M2CL guides LLMs toward consensus without sacrificing initial creativity.The method modulates context evolution rather than enforcing strict agreement from the outset.
- Debate: Debate exhibits an inconsistency during discussion when using fixed instructions.The observation is illustrated in the Debate visualizations across the discussion rounds.