Speculative Safety Honeypot: Toward Proactive Defense Against Multi-turn Agent Attacks

Zezhong Wang, Xueyang Tang, Rui Lian, Yang Lou, Heqing Huang

Introduction

As Large Language Model (LLM) agents evolve from simple chatbots into autonomous entities capable of executing tools and accessing external data, their attack surface has expanded dramatically. The Speculative Safety Honeypot (SSH) is a novel, proactive defense framework designed to protect LLM agents from complex, multi-turn attacks. By "hallucinating" potential future actions through simulated interaction trajectories, SSH uncovers hidden malicious intents before they manifest in the real environment. Remarkably, it achieves a 0% Attack Success Rate (ASR) on major benchmarks without sacrificing the agent's core utility.

The Challenge of Multi-Turn Attacks

Traditional security filters are inherently retrospective: they analyze the current prompt or historical context to identify red flags. However, sophisticated attackers increasingly rely on multi-turn strategies to bypass these filters.

In a "jailbreak" scenario, an attacker might slowly steer an agent toward a compromised state over several turns. Similarly, in an Indirect Prompt Injection (IPI) attack, an agent might retrieve seemingly benign data from an external source that contains hidden instructions meant to be executed later. Because the malicious intent is fragmented across time, retrospective detectors often fail. They either miss the attack entirely or become overly strict, crippling the agent's usefulness.

The Speculative Safety Honeypot (SSH) Framework

Inspired by speculative decoding, SSH introduces a "speculate-and-verify" workflow. Instead of merely monitoring the agent's current state, SSH runs a parallel, asynchronous simulation to predict where the conversation might lead.

Multi-Agent Simulation (MAS)

SSH employs a system of three lightweight LLMs (e.g., 3B parameters) to simulate the interaction ecosystem:

  • Assistant Simulator: Acts as a proxy for the target agent. Crucially, it is fine-tuned to be more vulnerable to attacks than the real agent, serving as a "honeypot" that reveals risks early.
  • User Simulator: Generates diverse and potentially ambiguous follow-up queries to explore various interaction paths.
  • Environment Simulator: Mimics tool outputs (such as API responses or database lookups) without executing them, keeping the simulation safely isolated.

While standard speculative decoding seeks the most likely next token, SSH explores the "risk space." It utilizes a Diversity-Oriented Beam Search, clustering similar behaviors using SimHash and applying a round-robin selection process. This ensures the simulation explores corner-case trajectories where an attack might be concealed.

Asynchronous Verification

As the real target agent executes actions, SSH uses these actions to prune its "Speculation Tree." If a real action matches a simulated branch, that branch is retained; otherwise, it is discarded. The system calculates a risk score based on the proportion of harmful "leaf nodes" in the tree. If this score exceeds a predefined threshold, SSH intervenes by resampling the agent's action or terminating the session entirely.

Experimental Evaluation

The researchers evaluated SSH across four diverse benchmarks:

  • AgentDojo: Evaluates tool-augmented agents against indirect prompt injections in environments like banking and Slack.
  • ActorAttack: A multi-turn jailbreak benchmark covering 1,200 harmful targets.
  • XSTest: A "benign-but-sensitive" dataset used to check for over-defensiveness.
  • BFCL-v3: The Berkeley Function Calling Leaderboard, used to measure the impact on the agent's core utility.

Key Results and Insights

  • Perfect Defense: When integrated with existing detectors (like PromptGuard), SSH reduced the Attack Success Rate (ASR) to 0% across all AgentDojo categories.
  • The "Honeypot" Advantage: Intentionally using a more vulnerable model for the simulation creates an effective early warning system. If the "weak" simulator breaks, the "strong" real agent is likely at risk.
  • Decision Redundancy: By evaluating an entire tree of future possibilities, SSH judges risk based on the evolution of intent rather than a single snapshot, reducing reliance on the absolute precision of individual detection components.
  • Utility Preservation: Unlike many filtering defenses that degrade performance, SSH maintained nearly identical accuracy on BFCL-v3 and showed 0% false refusals on XSTest.
  • Low Overhead: Using a 3B model to defend a 235B model adds only about 1.3% parameter overhead.

Limitations and Future Directions

While highly effective, SSH has some limitations. Running concurrent simulation branches requires non-negligible GPU memory and power, though techniques like vLLM-based batching and KV cache reuse can mitigate this. Additionally, if the system detects a risk and triggers a resampling of the agent's action, it can introduce a latency penalty of 3-7 seconds. Finally, in highly open-ended or creative tasks, the line between ambitious and malicious intent can blur. A high False Positive Rate (FPR) in these scenarios could frustrate users, suggesting that "human-in-the-loop" mechanisms may be necessary for complex edge cases.

Summary updated

BibTeX
@inproceedings{wang2026speculative,
  author = {Zezhong WANG and Xueyang Tang and RUI LIAN and Yang Lou and Heqing Huang},
  title = {{Speculative Safety Honeypot: Toward Proactive Defense Against Multi-turn Agent Attacks}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=F7KJeI4oql},
}
Figure