Skip to content

DriftNet: Dual-Head Trajectory Transformer Detects and Localizes Prompt Injection in LLM AgentsDriftNet: A Dual-Head Trajectory Transformer for Detecting and Localizing Prompt Injection in LLM Agents

arXiv: Agent & MCP Security· arXiv:2609.10892· Asif Pinjari, Mithun Paul Saint-Germain·Indexed by this site · 2026-10-01· Originally publishedDefenses
AI summary

Asif Pinjari proposes DriftNet, a dual-head trajectory Transformer that reads recorded tool-call trajectories and answers three questions in a single forward pass: whether the trajectory is compromised, at which step the attack enters, and which steps are hijacked; the second head labels each step as benign, injection point, hijacked, or failed injection. The method embeds each step with a frozen sentence encoder and four world features without identity information, the backbone has fewer than two million parameters, and it is trained with a class-weighted dual-head joint objective, without needing access to the Agent's own model.

Read originalarxiv.org