Exploring and Developing a Pre-Model Safeguard with Draft Models

Hongyu Cai, Arjun Arunasalam, Yiming Liang, Antonio Bianchi, Z. Berkay Celik

TL;DR

This paper introduces a novel pre-model safeguard for Large Language Models (LLMs) that catches jailbreak attacks before they reach the target model. By leveraging the fact that jailbreak prompts often transfer from large models to small language models (SLMs), the system uses a tiny "draft model" to generate quick responses that are then audited for safety. This approach slashes the defense failure rate of traditional pre-model guards while avoiding the massive computational overhead of post-model guards.

What Problem Does This Paper Address?

Ensuring that LLMs don't generate harmful content (like hate speech or hacking instructions) relies heavily on safety guardrails. Currently, defenders use two main reactive approaches:

  1. Pre-model guards: These analyze the user's prompt before it hits the LLM. They are computationally cheap but frequently miss sophisticated "jailbreak" attacks because they lack the context of the actual response.
  2. Post-model guards: These evaluate both the prompt and the generated response. While highly accurate, they are incredibly expensive because the target LLM has already spent time and compute generating the full (potentially malicious) response before it gets blocked.

The authors set out to bridge this gap: How can we get the contextual accuracy of a post-model guard without paying the steep computational price of running a massive target LLM on a malicious prompt?

Methods

The authors propose a defense design based on speculative inference. Instead of sending a prompt directly to a 70B-parameter target model, they route it through a tiny, lightweight draft model (an SLM like OPT-125M or SmolLM-135M).

The workflow operates as follows:

  1. Draft Generation: The prompt is fed to the SLM to generate a batch of $b$ draft responses using stochastic sampling strategies (beam search and top-p sampling).
  2. Response Classification: A standard safety classifier (like LlamaGuard) checks these draft responses alongside the original prompt.
  3. Label Aggregation: A threshold-based voting mechanism determines if the prompt is malicious. If the proportion of unsafe draft responses exceeds a threshold ($\tau$), the prompt is blocked immediately. If it passes, it is safely forwarded to the large target LLM.
An overview of our methodology for understanding the transferability of jailbreak attacks.

What makes this method unique is that it flips a common vulnerability—jailbreak transferability—into a defensive tool. If an adversarial prompt is optimized to bypass a large LLM's safety alignment, it will likely cause a smaller, less robust SLM to spit out unaligned, unsafe text, sounding the alarm early.

Datasets

The authors evaluated their approach using two primary datasets:

  • RPAB Dataset: A refined version of AdvBench containing 50 malicious intents spanning seven distinct harmful categories (Hacking, Violence, Theft, Misinformation, Cyberbullying, Illegal Drug Use, and Fraud). This was used to generate thousands of jailbreak prompts via automated attack frameworks like GCG, AutoDAN, and PAIR.
  • Just-Eval Problem-Solving Benchmark: A dataset aggregating tasks from AlpacaEval, LIMA-test, and MT-bench, used to evaluate the safeguard's accuracy on benign, safe user queries.

Key Insights and Ideas

  • The Distributional Gap: The core "aha moment" of the paper is that you don't need an SLM to perfectly replicate an LLM's behavior to protect it. When given a benign prompt, an SLM almost never produces unsafe text (a heavily zero-inflated distribution). However, malicious prompts induce a distinct "long-tail" distribution of unsafe responses. Even if only 1 out of 20 draft responses triggers a safety violation, it is a statistically strong signal of an ongoing attack.
  • Attack Specificity Matters: Prompts generated by gradient-based methods (like GCG) transfer exceptionally well to smaller models (up to 88% transferability). Conversely, genetic-algorithm attacks (like AutoDAN) are highly tailored to the source LLM and transfer less effectively, though they still trigger enough unsafe SLM drafts to be detected by the voting mechanism.
  • Diminishing Returns on Batch Size: Generating more draft responses ($b > 20$) provides very little boost to raw transferability detection, meaning defenders can keep the batch size small and fast without sacrificing security.

Key Results

The safeguard design was benchmarked against LlamaGuard-2-8B (operating in both pre- and post-guard modes) and PerplexityGuard:

  • Lower Failure Rates: Compared to standard pre-model guards, the proposed design reduced the defense failure rate (DFR) of jailbreak prompts by an average of 32.4% for GCG and AutoDAN attacks.
  • Massive Speedups: Relative to post-model guards, it reduced the defense failure rate by an average of 17.38% while slashing prompt-to-response latency by 97.07% on a Llama-3-70B target model. For example, mitigating an AutoDAN attack dropped detection time from 101.6 seconds to under 1 second.
  • Preserved Utility: On benign datasets, the safeguard maintained a 98% accuracy rate (matching the baselines) with a negligible latency increase of just 0.59%.

Limitations and Future Work

  • Computational Overhead: While significantly faster than a post-model guard, running an SLM still introduces a minor computational cost before target inference. The authors suggest that future work could integrate this framework directly with speculative decoding, allowing safe drafts to be reused to accelerate the target LLM's generation.
  • Adaptive Attacks: An attacker with white-box access to both the draft and target models could theoretically optimize a loss function to bypass both simultaneously. However, the authors note that differences in tokenization algorithms and vocabularies between completely different model families make crafting such cross-model adaptive attacks highly difficult in practice.

Summary updated

Abstract

Large Language Model (LLM) alignment remains vulnerable to jailbreak attacks that elicit unsafe responses, motivating pre-model and post-model guards. Pre-model guards audit the safety of prompts before invoking target models. However, relying solely on the prompt often leads to high false-negative rates (i.e., jailbreak attacks go undetected). Post-model guards address this issue by auditing both the user prompt and the target model's response. However, they incur a high computational cost, including increased token usage and processing time, because they operate after target model inference. In this paper, we introduce a safeguard design that leverages the transferability of jailbreak attacks to enforce prompt safety before target model inference. We first conduct a systematic study of jailbreak transferability, particularly from LLMs to small language models (SLMs). Through these experiments, we identify key factors influencing transferability. Building on these insights, we observe that responses from smaller draft models reflect the safety implications of those from large target models; \ie given a jailbreak prompt constructed for an LLM, an SLM is likely to be triggered to generate an unaligned response. Based on this observation, our safeguard design leverages speculative inference with SLMs to generate a set of draft responses. It then feeds the original prompt and these drafts into existing guards to predict their safety. We demonstrate that this design reduces the false-negative rate of pre-model guards and offers a low \Efficiency alternative to post-model guards. \textcolor{red}{\bf Notice: This paper contains examples of harmful language.}
BibTeX
@inproceedings{cai2026exploring,
  author = {Hongyu Cai and Arjun Arunasalam and Yiming Liang and Antonio Bianchi and Z. Berkay Celik},
  title = {{Exploring and Developing a Pre-Model Safeguard with Draft Models}},
  booktitle = {CAIS},
  year = {2026},
  doi = {10.1145/3786335.3813133},
}
Figure