TL;DR
SafeSieve is a progressive pruning algorithm for Large Language Model (LLM) multi-agent systems that dynamically optimizes communication topologies on the fly. By combining early-stage semantic heuristics with real-time performance feedback and structure-aware 0-extension clustering, it cuts token costs by up to 27.8% while maintaining or improving task accuracy and boosting adversarial robustness.
What Problem Does This Paper Address?
LLM-based multi-agent systems (MAS) excel at collaborative problem-solving, but their dense, round-robin communication style comes with a heavy price tag: massive token overhead and high inference costs. Furthermore, excessive chatter can dilute an agent's attention over key information, leading to performance degradation and expanding the attack surface for prompt-injection exploits.
Existing solutions fall into two camps, both with significant drawbacks:
- Pre-design approaches: These construct compact communication graphs before task execution. While efficient at startup, they are static and cannot adapt to runtime dynamics.
- Post-pruning approaches: These dynamically remove redundant connections during execution. However, they typically rely on greedy, localized Top-k selection strategies, which risk cutting critical communication paths and isolating essential agents.
SafeSieve bridges this gap by introducing a unified "plan-then-adjust" framework that transitions smoothly from early-stage semantic heuristics to experience-driven refinement without breaking essential group structures.
Methods
SafeSieve optimizes multi-agent communication through a dynamic edge-scoring matrix and a novel clustering mechanism:
- Two-Stage Edge Scoring: Edges are initialized using Semantic Heuristic Initialization, which combines embedding-based role similarity with expert LLM evaluations of agent complementarity. As tasks progress, the system tracks each edge's contribution to successful answers (Historical Complementarity), gradually shifting weight from static heuristics to learned, experience-based scores.
- 0-Extension Clustering: Instead of aggressively dropping individual low-scoring edges (greedy Top-k), SafeSieve models agent grouping as a $k$-terminal 0-extension problem. This mathematically principled approach identifies structurally coherent agent communities and minimizes distances across cluster boundaries. Pruning is restricted to ineffective links that cross these boundaries, ensuring that critical intra-community communication paths remain intact.
- Post-Pruning Regularization: After each pruning step, edge scores are normalized and historical weights are re-calibrated to ensure the scoring mechanism remains stable despite the changing graph topology.
Datasets
The authors evaluated SafeSieve across six standard reasoning and mathematical benchmarks using DeepSeek-V3 (671B) and GPT-4o-mini (~8B) as backbones:
- MMLU: General multi-task language understanding.
- GSM8K & SVAMP: Mathematical word problems.
- AQuA: Algebraic word problems with rationale generation.
- MATH-500: Advanced mathematical reasoning.
- HumanEval: Python coding tasks.
No new datasets were introduced. For heterogeneous settings, the framework was additionally validated using LLaMA3-8B, Qwen2.5-72B, and Kimi-K2.
Key Insights and Ideas
- The "Plan-Then-Adjust" Paradigm: Emulating human teamwork—where a team establishes an initial workflow and refines it based on project outcomes—outperforms purely static or purely reactive topologies.
- Connectivity-Aware Pruning: Greedy edge removal creates "information islands." By framing pruning around graph connectivity and community structures (via 0-extension), the system maintains a minimum viable graph that preserves agent complementarity.
- The "Barrel Effect" in Knowledge Tasks: In heterogeneous setups (mixing large and small models), the authors observed a strict bottleneck on knowledge-intensive tasks (like MMLU), where overall performance is limited by the weakest model. Conversely, on structured mathematical tasks (like SVAMP), a large model "commander" can successfully coordinate cheaper, smaller models to achieve high accuracy at a fraction of the cost.
- Inherent Adversarial Resilience: Because SafeSieve continuously downgrades edges that do not contribute to correct answers, it naturally isolates malicious or low-quality agents (e.g., those suffering from prompt injection) within a few iterations.
Key Results
Efficiency and Accuracy
SafeSieve achieved the highest average accuracy among all post-pruning methods while significantly lowering token consumption:
- DeepSeek-V3: Reached 94.01% average accuracy (outperforming single-agent CoT at 90.58% and AgentPrune at 92.78%) while reducing token usage by 12.4% to 27.8%.
- Task Gains: Showed substantial improvements on complex tasks, boosting MMLU by 4.42 percentage points and HumanEval by 6.58 percentage points compared to vanilla baselines.
Robustness to Attacks
When malicious agents were injected into the system, SafeSieve demonstrated superior defense capabilities, suffering an average accuracy drop of only 1.23%, compared to 2.21% for AgentDropout and 4.59% for AgentPrune.
Heterogeneous Cost Savings
In cross-model production environments, SafeSieve intelligently allocated 59.3% of the computational load to smaller models while reserving the primary backbone (DeepSeek-V3) for core reasoning and extraction. This strategy cut total deployment costs by 13.3% relative to the AgentPrune baseline.
Limitations and Future Work
While the paper demonstrates strong empirical results, a few areas remain open for exploration:
- Hyperparameter Sensitivity: The dynamic thresholding mechanism relies on parameters like the growth rate ($k$) and chronological weights, which may require careful tuning depending on the task complexity.
- Dependence on Feedback: The experience-driven refinement stage requires clear correctness feedback (e.g., test cases or ground-truth answers), which might be harder to obtain in open-ended generation tasks like creative writing or abstract summarization.
- Future Directions: The authors suggest expanding this structure-aware pruning framework to broader, real-world production deployments with even more diverse, specialized agent roles.
Summary updated