This academic paper introduces DiffMAS, a framework designed to move multi-agent language systems (MAS) beyond the limitations of natural language communication by using learnable, continuous internal representations.
TL;DR
DiffMAS replaces discrete, text-based messaging between LLM agents with a learnable "latent communication" protocol using shared Key-Value (KV) caches. By optimizing these interactions end-to-end via supervised fine-tuning, the framework achieves massive performance gains—up to +26.7% on AIME24—while significantly improving decoding stability.
What Problem Does This Paper Address?
Multi-agent systems typically collaborate by passing natural language messages. While intuitive, this creates two major bottlenecks:
- Information Loss: Complex reasoning must be compressed into discrete tokens, often losing subtle contextual signals.
- Optimization Boundaries: You cannot easily backpropagate gradients through discrete text. This means we usually optimize agent roles or prompts, but we can't optimize the communication protocol itself.
Existing "latent" alternatives (sharing internal hidden states) often skip training, leading to "distribution mismatch." A model trained on its own thoughts becomes "confused" when another agent's raw internal states are injected into its context, leading to unstable and chaotic reasoning.
Methods
DiffMAS treats inter-agent communication as a differentiable operator within the computation graph. The process unfolds in two stages:
- Stage I (Trace Building): Upstream agents (e.g., a Planner and a Critic) sequentially generate reasoning steps. Instead of outputting text, their internal Key-Value (KV) caches are captured and concatenated into a "shared KV trace."
- Stage II (End-to-End Optimization): The final agent (the Solver) performs autoregressive decoding conditioned on this accumulated latent trace.
The authors use Parameter-Efficient Fine-Tuning (LoRA) to update the model. Crucially, because the communication channel is continuous (KV states), gradients can flow back through the entire multi-agent trajectory. This allows the system to learn a task-specific "latent language" where upstream agents learn how to encode useful info, and downstream agents learn how to interpret it.
Datasets
The authors evaluated DiffMAS across a diverse suite of reasoning benchmarks:
- Mathematics & Science: AIME 2024, AIME 2025, and GPQA-Diamond.
- Code Generation: HumanEval+ and MBPP+.
- Commonsense Reasoning: OpenBookQA.
For training, they used surprisingly small, curated datasets (e.g., only 210 samples for math and 50 for code), demonstrating that DiffMAS is highly sample-efficient at learning effective communication protocols.
Key Insights and Ideas
- The Concatenation Advantage: The paper provides a mathematical proof (Proposition 3.1) showing that concatenating latent traces avoids the "vanishing gradient" problem inherent in systems that overwrite a fixed-size hidden state. In DiffMAS, every agent's contribution remains equally accessible to the gradient, regardless of how early they appear in the chain.
- Stability through Alignment: Raw latent injection is often "brittle." By training the interface, DiffMAS aligns the injected KV states with the model's expected distribution. This results in much smoother entropy curves and lower perplexity during decoding compared to training-free methods.
- Compactness vs. Noise: Interestingly, more communication isn't always better. The authors found that a small number of latent steps (around 10) is optimal; beyond that, longer traces introduce redundancy and noise that can degrade performance.
Key Results
DiffMAS consistently outperformed single-agent baselines, text-based MAS, and training-free latent methods:
- Reasoning Jumps: On the difficult AIME24 math benchmark, DiffMAS (using Qwen3-8B) achieved 76.7%, a massive +26.7% improvement over the single-agent baseline.
- Hard Science: On GPQA-Diamond, it reached 60.1% (+20.2% gain).
- Decoding Stability: As shown in the perplexity analysis, DiffMAS produces a much tighter distribution of results with fewer "chaotic" outliers than prior latent methods.
The framework also showed significantly higher self-consistency. While text-based systems often fail consistently or succeed sporadically, DiffMAS shifts the outcome toward high-consistency success (3-4 correct samples out of 4).
Limitations and Future Work
- Context Window Pressure: Because KV traces are concatenated, the total context length grows with the number of agents and steps. This could hit hardware memory limits for very long reasoning chains.
- Fixed Sequential Topology: This study focused on a linear pipeline (Planner → Critic → Refiner → Solver). The authors suggest that future work should explore more complex, non-linear communication graphs.
- Interpretability: Since the communication happens in latent space, humans cannot "read" what the agents are saying to each other, which may be a drawback for applications requiring high transparency.
Summary updated