arXiv:2605.19321cs.CRcs.AI2026-05

用小模型预判大模型风险,低成本防范提示词攻击

Exploring and Developing a Pre-Model Safeguard with Draft Models

论文配图:Exploring and Developing a Pre-Model Safeguard with Draft Models
图 1 · 摘自论文原文
  • 用小模型生成草稿响应,提前检测提示词危险性
  • 将误判率降低至传统前置防护的1/3以下
  • 适合需要快速部署安全防护的应用场景

大型语言模型对提示词攻击仍存安全隐患,现有前置防护因仅分析提示词易漏检。本文研究提示词攻击在大模型与小模型间的迁移特性,发现针对大模型的攻击提示常可触发小模型生成不合规响应。基于此,提出一种基于小模型草稿推理的安全防护机制:先用小模型生成多个草稿响应,再将原始提示和草稿输入现有安全检测器判断安全性。该方法显著降低前置防护的漏检率,同时计算开销远低于后置防护,实现高效、低成本的安全保障。

原文摘要 · Abstract (English)

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.}

安全防护提示攻击小模型效率优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。