Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Structural Representations for Cross-Attack Generalization in AI Agent Threat Detection

About

Autonomous AI agents executing multi-step tool sequences face semantic attacks that manifest in behavioral traces rather than isolated prompts. A critical challenge is cross-attack generalization: can detectors trained on known attack families recognize novel, unseen attack types? We discover that standard conversational tokenization -- capturing linguistic patterns from agent interactions -- fails catastrophically on structural attacks like tool hijacking (AUC 0.39) and data exfiltration (AUC 0.46), while succeeding on linguistic attacks like social engineering (AUC 0.78). We introduce structural tokenization, encoding execution-flow patterns (tool calls, arguments, observations) rather than conversational content. This simple representational change dramatically improves cross-attack generalization: +46 AUC points on tool hijacking, +39 points on data exfiltration, and +71 points on unknown attacks, while simultaneously improving in-distribution performance (+6 points). For attacks requiring linguistic features, we propose gated multi-view fusion that adaptively combines both representations, achieving AUC 0.89 on social engineering without sacrificing structural attack detection. Our findings reveal that AI agent security is fundamentally a structural problem: attack semantics reside in execution patterns, not surface language. While our rule-based tokenizer serves as a baseline, the structural abstraction principle generalizes even with simple implementation.

Vignesh Iyer• 2026

Related benchmarks

TaskDatasetResultRank
Attack DetectionAttack Traces IID
AUC93
3
Attack DetectionAttack Traces Social engineering
AUC89
3
Attack DetectionAttack Traces Prompt injection
AUC83
3
Attack DetectionAttack Traces Data exfiltration
AUC0.85
3
Attack DetectionAttack Traces Tool hijack
AUC0.85
3
Attack DetectionAttack Traces (Unknown)
AUC0.97
3
Attack DetectionAttack Traces OOD Average
AUC0.83
3
Attack DetectionAgent Traces (Held-out)
ROC-AUC (Social engineering)0.89
3
Attack DetectionAgent Traces IID
ROC AUC0.93
3
Showing 9 of 9 rows

Other info

Follow for update