A new paper from Silverfort shows that the key to stopping AutoDAN-style attacks is not a better model — it is a better procedure. Here is what they built, why it works, and what it means for every team deploying tool-augmented AI agents.


Every few months, a new jailbreak makes the rounds on Twitter. Someone crafts a prompt that slips past the safety guardrails. The model generates something it should not. The security team scrambles. The cycle repeats.

This is the wrong frame.

The real problem is not that models lack better safety training. The real problem is architectural. Most defenses treat jailbreak detection as a classification task: an input comes in, a model says malicious or benign, the system acts on that verdict. Done. But modern jailbreak attacks — especially the AutoDAN-style variants that power real-world prompt injection catalogs — are not single-move operations. They unfold across context, hide in encoding, split their payloads across turns, and rely on the defender's inability to reason over structure.

Silverfort's research team, led by Doron Shavit, just published a paper that reframes the entire problem. Their framework, called RLM-JB, does not compete on model quality. It competes on procedure. By treating jailbreak detection as a multi-stage analysis program rather than a one-shot classification, they achieved 98% recall with 99% precision on AutoDAN-style attacks — and they did it with a design that any team can adopt, regardless of which LLM backs their screening pipeline.

The paper is dry, as academic papers tend to be. But the insight underneath is immediately practical for anyone building or securing agentic AI systems.


The Problem No One Wants to Talk About

Before getting into the solution, it is worth being precise about why traditional defenses fail.

When a jailbreak attack succeeds against a production system, one of three things usually happened. The attack hid inside a long context window where attention mechanisms deprioritized the center — the classic "lost in the middle" effect. The attack used semantic framing to wrap a harmful request inside a role-play scenario or fictional premise, making it invisible to classifiers that look for keywords. Or the attack distributed its payload across multiple messages, none of which contained enough signal alone to trigger a detector.

These are not edge cases. AutoDAN, the automated adversarial prompt generation framework, systematically exploits all three. It uses genetic search to craft prompts that look benign to static filters but produce high attack success rates against unprotected models. Real-world injection catalogs — InjectPrompt and others — document techniques that transfer across models and tasks, meaning attackers are not starting from scratch with each new target.

In a tool-augmented agent handling email, calendar, financial transactions, or any sensitive workflow, a successful jailbreak is not a research problem. It is an operational incident. The attacker does not need to steal weights or compromise a model. They just need to craft an input that the agent processes without flagging, then let the agent execute a tool on their behalf.

Per-message classifiers cannot handle this. They make binary decisions on isolated inputs. They have no mechanism for decoding a Base64 payload, chunking a long context to guarantee coverage, or aggregating evidence across multiple segments. The architecture is the problem.


What RLM-JB Does Differently

RLM-JB stands for Recursive Language Models for Jailbreak Detection. The name is more intimidating than the concept.

An RLM couples an LLM with a constrained sandbox environment for safe, bounded code execution. The root model orchestrates analysis by writing code, calling worker models over specific segments, collecting their verdicts, and aggregating evidence into a final decision. Every step produces an intermediate artifact — a chunk verdict, a confidence score, an extracted signal — that can be inspected and audited.

This is categorically different from a classifier. A classifier is a function from input to label. An RLM is a program that reasons over the input, transforming it, dissecting it, and composing evidence from distributed analysis.

RLM-JB runs the following four-stage procedure on every input that crosses the detection boundary.

Normalization and de-obfuscation. The root model applies lightweight canonicalization: whitespace normalization, separator standardization, case normalization. These are low-cost transformations that prevent attackers from hiding intent in formatting tricks. When the pipeline detects high-signal encoding patterns — Base64-like spans, for example — it attempts decoding and carries both the original and decoded representations forward for analysis. The detector does not miss attacks hiding in plain text because it always checks the decoded layer too.

Coverage-guaranteeing chunking. Long inputs are split into overlapping segments. Each segment receives independent analysis. This is the direct counter to long-context hiding. By breaking the input into chunks, no portion of the text can bury itself in context and escape scrutiny. The overlap ensures that boundary regions — where an attacker might hide a payload at a chunk edge — receive double coverage.

Parallel chunk screening. Worker models analyze each chunk independently and return structured assessments: a malicious or benign verdict, a confidence score, and extracted signals. The signals are specific attack indicators — instruction hijacking cues, persona escalation prompts, tool-manipulation patterns. Screening is parallelizable, which means the multi-pass analysis does not add prohibitively to latency. Every chunk gets its own dedicated look rather than fighting for attention in a single global pass.

Compositional evidence aggregation. The root model examines chunk-level evidence to recover split-payload structures. If one chunk provides an "ignore all previous instructions" preamble and another contains the actionable harmful request, the aggregator links them into a single attack hypothesis. The final verdict comes with a concise explanation: which chunks contributed evidence, what signals triggered, and why the decision was reached.

The result is a detection that looks like an investigation, not a verdict.


The Numbers Worth Paying Attention To

RLM-JB was evaluated on AutoDAN-style benchmarks using three different screening backends: DeepSeek-V3.2, GPT-4o, and GPT-5.2.

Across all three, recall ranged from 92.5% to 98.0%, and precision held between 98.99% and 100%. False positive rates on synthetic benign prompts ranged from 0.0% to 2.0%, with the strongest model showing the highest FPR. This sensitivity-specificity trade-off is the key operational parameter. GPT-4o lands at a good balance point: high recall with low over-blocking. GPT-5.2 maximizes sensitivity but at a slightly higher cost in benign blocking.

The comparison that matters most is against GPT-5.2 used directly, without the RLM-JB procedure. A single-pass baseline achieves 59.57% recall on AutoDAN attacks. With RLM-JB's procedural pipeline layered on top, recall jumps to 98.00%. That is a 38.43 percentage point gain. F1 improves from 69.71% to 98.49%, a 28.78 point absolute improvement.

These are not incremental gains. They represent the difference between a detector that catches most attacks and one that misses more than a third of them.

Against external benchmarks, RLM-JB's best configuration reaches F1 of 98.49%, compared to 82.1% for Granite Guardian 3.0 and 75.8% for Llama-Guard 2. JBShield, a comparable multi-method defense, reports average F1 of 0.94. RLM-JB's score represents a 4.49 point advantage.

When tested on InjectPrompt payloads — real-world injection techniques from public catalogs and common permutations — RLM-JB achieved 100% accuracy with zero false positives. The procedure generalizes beyond the specific AutoDAN transformation patterns it was evaluated on.


Why the Procedure Matters More Than the Model

There is a temptation to read these results as evidence that GPT-5.2 is simply better than GPT-4o or DeepSeek. That is not the right takeaway.

The data shows that the sensitivity-specificity trade-off tracks the screening backend — stronger models catch more attacks but over-block slightly more benign inputs. But the quality gains relative to direct single-pass classification are attributable to the procedure itself, not to the model doing the screening.

The chunking strategy directly addresses long-context hiding. The de-obfuscation stage catches encoding-based attacks. The compositional aggregation recovers split payloads that no single chunk would flag alone. These are architectural decisions, not model capabilities. A moderate model running the full procedure outperforms a stronger model making single-pass decisions.

This finding has direct deployment implications. RLM-JB suggests a tiered architecture: use a lightweight detector as an early filter for latency-sensitive paths, then invoke full RLM-JB analysis for high-risk inputs flagged by preliminary screening. This hybrid approach preserves responsiveness while maintaining high recall on inputs that actually matter.

The procedure also produces auditable intermediate artifacts. When RLM-JB flags an attack, it can explain exactly which chunks contributed evidence and how the aggregation reached its conclusion. This interpretability matters in regulated environments where a security decision needs to be defensible to a human reviewer, not just a downstream policy engine.


Limitations That Are Worth Knowing

Academic evaluations do not always reflect production realities, and this paper is no exception.

The AutoDAN benchmark is realistic, but it does not represent an adaptive adversary who knows the RLM-JB architecture and crafts inputs specifically to exploit its blind spots. Chunk boundaries and de-obfuscation heuristics could be targeted by an attacker who reverse-engineers the procedure. Real production deployments would need ongoing red-teaming against the detection pipeline itself, not just against the models it uses.

Code execution support is required. The RLM paradigm depends on a constrained sandbox environment where the root model can write and execute analysis code. Models that do not support code execution — the paper mentions Llama-4-Maverick as an example — cannot serve as RLM-JB screening backends. This is a meaningful deployment constraint in environments with restricted runtime capabilities.

The false positive rate was estimated using synthetic benign prompts generated by an LLM, not real-world user traffic. Actual over-blocking rates in a production system processing diverse, naturalistic user inputs could differ. The authors acknowledge this and recommend treating the FPR numbers as directional indicators rather than precise operational estimates.

These limitations do not undermine the core contribution. They frame the right questions for teams evaluating whether and how to adopt this approach.


The Bigger Picture for Agentic Security

RLM-JB is a specific piece of research, but it points to a broader shift in how the field should think about AI security.

Tool-augmented agents are not going away. The entire value proposition of modern AI systems is that they can take actions — read email, write documents, execute transactions, call APIs — on behalf of users. Every tool call is a potential attack surface. Every piece of untrusted content that an agent processes — a retrieved document, a calendar invite, a message from a third party — is a potential injection vector.

Per-message classification was never going to be sufficient for this environment. The attack surface is too large, the attack patterns too diverse, and the stakes too high for a single-shot verdict.

Recursive Language Models provide an architectural pattern for structured procedural defense. By treating detection as a program with explicit stages, coverage guarantees, and composable evidence aggregation, RLM-JB addresses the specific failure modes that make modern jailbreaks effective.

The procedure is not tied to any specific model. The chunking, normalization, de-obfuscation, and aggregation pipeline can evolve as models improve. A team that adopts RLM-JB today is not locked into a specific backend — they are building a defense architecture that can absorb better screening models as they become available.

For teams building or securing agentic AI systems, the core recommendation is straightforward: normalize and decode inputs before screening, chunk long contexts to guarantee coverage, screen in parallel, and aggregate evidence conservatively. The procedure is the defense. The model is an ingredient.

The jailbreak arms race is not slowing down. AutoDAN-style optimization is systematic and automated. Real-world injection catalogs are growing. Multi-turn attacks that unfold across dozens of turns are no longer theoretical. Any team deploying tool-augmented agents today should be thinking about layered, procedural defenses — not because single-pass classifiers are useless, but because they are insufficient on their own.

RLM-JB is a concrete, evaluated template for what that layered defense looks like. It is worth reading the paper, running the numbers, and deciding where the approach fits in your stack.


Paper: Recursive Language Models for Jailbreak Detection: A Procedural Defense for Tool-Augmented Agents (arXiv:2602.16520) by Doron Shavit. Submitted February 2026.