The year/Independent research

Paper 2602.05386

Spider-Sense: Intrinsic Risk Sensing for Efficient Agent Defense with Hierarchical Adaptive Screening

Published
Feb 2026
Research lab
Independent
Citations
1
GitHub
21 stars

01 In brief

Summary

The paper introduces SPIDER-SENSE, a framework for defending LLM-based autonomous agents against security threats.

It argues that existing mandatory, stage-wise security checks are inefficient and proposes Intrinsic Risk Sensing (IRS), which embeds risk awareness into the agent's execution flow, triggering defenses only when a risk is perceived.

Once triggered, a Hierarchical Adaptive Screening (HAS) mechanism first uses fast similarity matching against stage-specific attack vector databases (for query, plan, action, and observation stages) and escalates ambiguous cases to deep LLM reasoning.

The authors also introduce S2Bench, a lifecycle-aware benchmark with realistic tool execution, multi-stage attacks, and hard benign prompts.

Experiments on Mind2Web, eICU, and S2Bench show SPIDER-SENSE achieves the lowest Attack Success Rate (ASR) and False Positive Rate (FPR) compared to baselines like GuardAgent and AGrail, with only 8.3% latency overhead.

Ablations confirm the necessity of all four sensing stages and both HAS components.

A case study demonstrates successful interception of a tool-return injection attack.

02 From the paper

Abstract

As large language models (LLMs) evolve into autonomous agents, their real-world applicability has expanded significantly, accompanied by new security challenges. Most existing agent defense mechanisms adopt a mandatory checking paradigm, in which security validation is forcibly triggered at predefined stages of the agent lifecycle. In this work, we argue that effective agent security should be intrinsic and selective rather than architecturally decoupled and mandatory. We propose Spider-Sense framework, an event-driven defense framework based on Intrinsic Risk Sensing (IRS), which allows agents to maintain latent vigilance and trigger defenses only upon risk perception. Once triggered, the Spider-Sense invokes a hierarchical defence mechanism that trades off efficiency and precision: it resolves known patterns via lightweight similarity matching while escalating ambiguous cases to deep internal reasoning, thereby eliminating reliance on external models. To facilitate rigorous evaluation, we introduce S$^2$Bench, a lifecycle-aware benchmark featuring realistic tool execution and multi-stage attacks. Extensive experiments demonstrate that Spider-Sense achieves competitive or superior defense performance, attaining the lowest Attack Success Rate (ASR) and False Positive Rate (FPR), with only a marginal latency overhead of 8.3\%.