TL;DR
Large Language Model-based Multi-Agent Systems (MAS) are highly vulnerable to "sleeper agents"—insider threats that act benignly to build trust before launching coordinated attacks. This paper introduces DynaTrust, a defense framework that models agent interactions as a Dynamic Trust Graph, using Bayesian smoothing and weighted consensus to isolate malicious agents and autonomously heal the system with clean replicas.
What Problem Does This Paper Address?
While Multi-Agent Systems (MAS) excel at breaking down complex tasks like software development, their collaborative nature introduces a severe security risk: the sleeper agent. A sleeper agent behaves perfectly normally during routine operations, gradually accumulating trust within the network. However, once specific conditions or multi-turn triggers are met, it activates a malicious payload (e.g., prompt injection or memory poisoning) to compromise the system from within.
Existing defenses struggle against this insider threat for two main reasons:
- Rigid, Static Policies: Most frameworks use zero-trust rules that permanently block an agent after a single anomaly. Because LLMs naturally hallucinate occasionally, this rigid approach leads to high false-positive rates and severely degrades system availability.
- Naive Consensus: Existing peer-review or voting mechanisms treat all agents as equally reliable, ignoring variations in historical behavior and domain expertise.
Methods
The authors propose DynaTrust, a framework that treats trust as a continuous, evolving process rather than a static attribute. It models the MAS as a Dynamic Trust Graph (DTG) and introduces three core mechanisms:
- Two-Tier Instruction Auditing:
- Fast Auditor: A low-latency local LLM screens all inter-agent communications. Clearly benign inputs pass immediately to save compute.
- Trust-Confidence Weighted Consensus: Ambiguous or potentially harmful instructions are escalated to a dynamically selected "jury" of semantic expert agents. Each juror's vote is weighted by its historical trust score and its real-time confidence.
- Bayesian Trust Smoothing: Trust is modeled mathematically using a Beta distribution. To capture the asymmetric reality of trust—that it is hard to build but easy to break—DynaTrust applies a heavy Bayesian penalty factor ($\Psi$) to unsafe behaviors. Trust drops sharply after a single confirmed violation but recovers slowly through sustained benign interactions.
- Adaptive Isolation and Recovery (Self-Healing): If an agent's trust score falls below a critical threshold ($\tau_{iso} < 0.3$), DynaTrust autonomously restructures the graph. It severs all communication lines to the compromised agent and instantiates a clean replica agent (inheriting the role but discarding the corrupted memory) to restore workflow connectivity without human intervention.
Datasets
To evaluate sleeper agent dynamics, the authors constructed a mixed benchmark combining two prominent datasets at a 5:1 ratio:
- HumanEval: Standard code generation tasks used to evaluate functional correctness and system utility.
- AdvBench: Adversarial triggers designed to activate malicious payloads.
This 5:1 ratio reflects a realistic workload where benign interactions dominate and adversarial triggers occur intermittently. The framework was tested across four distinct MAS architectures (CAMEL, AutoGen, MetaGPT, and ChatDev) using five different LLM backends (including GPT-4o, Gemini-2.5-flash, and DeepSeek-v3).
Key Insights and Ideas
- Temporal Continuity is Essential: Defending against sleeper agents requires looking at long-horizon interaction histories. Stateless, prompt-based auditing fails because malicious intent can be split across multiple ambiguous steps.
- Embracing LLM Stochasticity: By modeling trust probabilistically, DynaTrust successfully differentiates between a malicious attack and a benign LLM hallucination, preventing unnecessary system shutdowns.
- Graph-Level Self-Healing: Detecting a threat is only half the battle. By automatically swapping out a compromised node for a clean replica, the system maintains high availability and operational continuity.
Key Results
DynaTrust effectively balances the trade-off between security and system utility:
- Superior Defense: DynaTrust achieved an average Defense Success Rate (DSR) of 92.4%, outperforming the state-of-the-art baseline (AgentShield) by 41.7%. Crucially, it maintained stable defense rates (>86%) even when paired with heavily self-aligned models like DeepSeek-v3.
- High System Availability: While a strict "Zero-Trust" baseline dropped the Task Success Rate (TSR) to 66.5% due to aggressive blocking, DynaTrust preserved a TSR of 84.9%—nearly identical to an undefended system (85.4%).
- Minimal False Positives: The framework reduced the False Positive Rate (FPR) to just 2.2%, compared to 15.3% for the Zero-Trust approach.
Limitations and Future Work
The authors note two primary constraints:
- The Honest Majority Assumption: The consensus mechanism assumes that most of the selected jury agents are honest. If a coordinated group of malicious agents colludes to dominate a specific domain, they could theoretically validate each other's malicious behavior.
- Computational Latency: Calculating dynamic trust scores and gathering multi-agent consensus votes adds extra delay, which may pose a challenge for massive, real-time applications.
Future Directions: The team plans to explore decentralized verification methods to reduce latency and extend DynaTrust to protect multi-modal environments where malicious payloads might be hidden inside images.
Summary updated