Introduction
As artificial intelligence transitions from single-agent chatbots to complex Multi-Agent Systems (MAS), multiple Large Language Models (LLMs) are increasingly collaborating to solve intricate software engineering and reasoning tasks. While this collaborative approach yields strong performance, it significantly expands the "attack surface." If just one agent is compromised, it can propagate misinformation through the network, eventually steering the entire group toward a harmful or incorrect conclusion.
Current state-of-the-art defenses, such as G-Safeguard or GUARDIAN, attempt to secure these systems using text embeddings. They convert messages into vector representations and use anomaly detection to identify and prune "weird-looking" or suspicious messages. However, this paper reveals a fundamental flaw in this approach: embedding-based defenses assume malicious messages will always manifest as obvious outliers. In reality, attackers can easily bypass these safeguards using "near-benign" attacks that mimic normal conversation in the embedding space.
To address this vulnerability, the authors propose moving beyond external text embeddings and instead leveraging model-internal token-level confidence scores to prune or down-weight suspicious messages before they can corrupt group decisions.
How Attackers Bypass Embedding Defenses
The authors provide theoretical proof demonstrating that embedding-based defenses often learn an overly broad "acceptance region," leaving a substantial gap for stealthy attacks. They introduce three novel "near-benign" attack strategies designed to exploit this gap:
- Slow Drift: The attacker gradually shifts its message embeddings over multiple communication rounds, avoiding the abrupt changes that typically trigger outlier detectors.
- Benign Wrapper: The attacker conceals a small malicious "payload" inside a lengthy, helpful-looking message. The overall embedding remains dominated by the benign content, allowing it to slip past defenses.
- Chaos Seeding: Instead of directly pushing a malicious narrative, the attacker focuses on making the benign agents disagree with one another. This artificially widens the distribution of "normal" messages, making it nearly impossible for a detector to draw a clean boundary around suspicious behavior.
A New Approach: Confidence-Guided Defense
To counter these stealthy attacks, the authors propose a Confidence-Guided Defense. Instead of evaluating what the agent said (the external embedding), this method evaluates how the agent said it (the internal certainty).
By measuring the entropy of the token-level logits, the system can determine if the model was "confused" or "uncertain" while generating a message. The critical insight here is that even when an attacker forces a model to produce a "benign-looking" string, the model's internal uncertainty often remains high. This provides a hidden, robust layer of defense.
The authors implement this internal signal in two ways:
- Confidence Pruning: Outright blocking messages that fall below a specific certainty threshold.
- Confidence Down-weighting: Attaching a confidence score to messages so that receiving agents are explicitly instructed to "discount" uncertain information during their reasoning process.
Experimental Setup and Key Results
The researchers evaluated their attacks and defenses across three diverse task families: factual knowledge (MMLU), multi-step arithmetic (GSM8K), and logical inference (Big-Bench Hard / BBH). Tests were conducted on both open-weight models (LLaMA-3-8B, Qwen3-4B) and black-box API models (GPT-4o-mini).
The results starkly highlight the limitations of current defenses:
- Embedding Defenses Collapse: Under "near-benign" attacks, existing defenses saw their performance plummet. On MMLU with LLaMA-3, embedding defenses achieved only ~32-39% accuracy under attack—barely better than having no defense at all (~38.8%).
- Confidence Wins: In the exact same scenario, the proposed confidence-guided defense proved significantly more robust, achieving 52.7% accuracy.
- Consistent Generalization: This trend held across different models. On the Qwen3-4B model, the confidence-guided approach maintained 74.9% accuracy under attack, compared to just ~65-66% for embedding-based methods.
The Importance of Network Topology and Early Intervention
The study also uncovered a critical dynamic in multi-agent communication known as the "Self-Mixing" Problem. Once a malicious message is accepted into the network, benign agents begin to echo it. This self-mixing causes the embeddings and confidence signals of all agents to converge over time, eventually washing out the defensive signal entirely.
Because of this decay effect, the structure (topology) of the agent network significantly impacts safety. Denser topologies, like fully connected graphs, accelerate the spread of poisoned information, drastically shortening the window for effective intervention. In these dense networks, the "half-life" of a defensive signal is often as low as 1 or 2 rounds. Conversely, sparse topologies (like chains) preserve the defensive signal for longer. Regardless of the topology, the findings emphasize that defenses must act immediately to be effective.
Limitations and Future Directions
While highly effective, the confidence-guided approach does have limitations. Primarily, it relies on access to token-level probabilities (logits). While readily available in open-source models, some commercial APIs restrict access to this data, complicating implementation for "black-box" users.
Furthermore, the authors utilized basic entropy as their uncertainty metric. Future work could explore more sophisticated internal signals, such as logit margins, calibration-aware confidence, or reasoning-answer agreement.
Ultimately, embeddings and confidence scores are complementary. The most promising future direction is a "multi-modal" defense system that combines both signals—using embeddings to catch obvious stylistic outliers and internal confidence to neutralize stealthy, high-uncertainty attacks.
Summary updated