arXiv:2604.06247cs.CRcs.AI2026-04

无需生成即可检测文本与视觉中的越狱攻击,速度快且适用范围广。

SALLIE: Generation-Free Hidden-State Detection of Jailbreaks and Prompt Injections Across Text and Vision

论文配图:SALLIE: Generation-Free Hidden-State Detection of Jailbreaks and Prompt Injections Across Text and Vision
图 1 · 摘自论文原文
  • 通过一次前向传播提取残差特征,用层间近邻探测器判断异常输入。
  • 在多个模型上达到最高0.99的F1值,且视觉攻击零误报。
  • 适用于不同模型和模态,适合部署在低延迟安全系统中。

大语言模型和视觉语言模型易受文本或图像中的越狱攻击和提示注入影响。现有防御方法常限制威胁覆盖范围或增加推理开销。本文提出SALLIE(单次激活查找层间输入评估),一种白盒、无需生成的通用检测器,适用于文本与视觉场景。仅需一次主干网络前向传播,SALLIE提取最后一层残差流表示,应用层间k近邻探测器,并对连续层区间得分求平均,不修改主干也不生成响应。我们对比了共享阈值、全校准等配置在不同主干与模态下的表现。在Gemma-3-4b-it、Phi-3.5-vision-instruct、SmolVLM2-2.2B-Instruct等开源轻量级模型上测试,结果表明:全校准的SALLIE-Phi在三类主干上均取得0.87的综合F1,平衡准确率优于RCS-KCD。在Phi-3.5视觉输入下,仅阈值校准即达F1 0.99,零误报;而零样本的Gemini-2.5-Flash-Lite仅为0.54。在未参与参数选择的Gemma-4-E2B-it上,相同流程使文本输入F1从0.62升至0.79,视觉输入从0.68升至0.98。表明部分表征超参数可跨主干迁移,但操作点仍依赖主干、模态与数据分布。还报告了假阳性率/假阴性率权衡、延迟及表征消融结果。

原文摘要 · Abstract (English)

Large Language Models (LLMs) and Vision-Language Models (VLMs) are vulnerable to jailbreaks and prompt injections delivered through text or images. Existing defenses often narrow threat coverage or add inference cost through input transformations, repeated model queries, generated responses, or threat-specific detectors. We present SALLIE (Single-Pass Activation Lookup for Layerwise Input Evaluation), a white-box, generation-free detector with a common architecture for textual and visual jailbreaks and prompt injections. Using one backbone forward pass, SALLIE extracts last-token residual-stream representations, applies layer-wise k-nearest-neighbor probes, and averages their scores across a contiguous layer range, without modifying the backbone or generating a response. To distinguish reusable detector configurations from deployment-specific tuning, we compare shared, threshold-only, and fully calibrated regimes across backbones and modalities. We evaluate SALLIE on compact open-weight VLMs (Gemma-3-4b-it, Phi-3.5-vision-instruct, SmolVLM2-2.2B-Instruct) using heterogeneous held-out test data spanning both threat families and modalities. Fully calibrated SALLIE-Phi achieves an aggregate F1 of 0.87 and higher aggregate balanced accuracy than RCS-KCD on all three backbones under a matched-calibration protocol. On Phi-3.5 visual inputs, threshold-only calibration yields an F1 of 0.99 with zero observed false positives, versus 0.54 for zero-shot Gemini-2.5-Flash-Lite. On Gemma-4-E2B-it, a backbone held out from representation-hyperparameter selection, the same procedure raises F1 from 0.62 to 0.79 on text and 0.68 to 0.98 on visual inputs. Representation hyperparameters can thus transfer across some backbones, while operating points remain backbone-, modality-, and distribution-dependent. We further report FPR/FNR tradeoffs, latency, and representation ablations.

安全检测越狱攻击多模态无生成

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