arXiv:2607.05910cs.CVcs.AI2026-07

让图像安全检测适应政策变化,提升模型泛化能力。

PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails

论文配图:PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails
图 1 · 摘自论文原文
  • 构建动态政策测试基准,检验模型是否依赖固定安全判断。
  • 提出新方法在265张图上平均7.55个提示下实现76.9%准确率。
  • 适合需要灵活适配安全策略的AI系统开发者使用。

图像安全防护通常在固定安全策略下训练与评估,隐含将安全视为图像固有属性。但在真实场景中,同一图像可能在不同产品中被允许、受限或因政策变更而被禁用。本文研究政策自适应图像防护,要求模型判断图像是否违反当前策略,并泛化至未见策略。我们提出PolicyShiftBench基准,包含2,000个政策敏感实例,覆盖265张图像,每张图像平均搭配7.55个政策条件提示,用于测试模型能否依据当前策略而非图像固有安全先验作出判断。随后提出PolicyShiftGuard,一种轻量级政策条件防护模型,采用两阶段训练:随机策略SFT(RP-SFT)与边界对政策适应(BP-Adapt)。BP-Adapt通过标准标签监督与成对比较损失,为相同图像和风险类别训练匹配的通过/阻断提示,有效分离不同政策。实验表明,现有VLM与专用防护模型在政策变动下仍脆弱,而PolicyShiftGuard显著提升政策敏感性能。7B模型在PolicyShiftBench上达到76.9%平均F1与72.1%平均PSS,可良好迁移至UnSafeBench与SafeEditBench,且以简洁输出格式改善延迟-性能平衡。消融实验证实匹配的通过/阻断边界对是稳定政策适应的关键。

原文摘要 · Abstract (English)

Image guardrails are typically trained and evaluated under a fixed safety policy, implicitly treating safety as an intrinsic property of an image. Real deployments are different: the same image may be allowed in one product, restricted in another, and newly disallowed when a policy boundary changes. We study policy-adaptive image guardrailing, where a model must decide whether an image violates the currently supplied policy and generalize to held-out policy definitions. We introduce PolicyShiftBench, a comprehensive benchmark with 2,000 policy-discriminative instances over 265 images, where each image is paired with 7.55 policy-conditioned prompts on average to test whether models adapt to the active policy rather than relying on image-level safety priors. We then propose PolicyShiftGuard, a compact policy-conditioned guardrail trained with a two-stage training recipe that combines Randomized Policy SFT (RP-SFT) with Boundary-Pair Policy Adaptation (BP-Adapt). BP-Adapt trains matched prompts for the same image and risk category using standard label supervision and a pairwise comparison loss that separates blocking policies from passing policies. Experiments show that existing VLMs and specialized guardrails remain brittle under policy shifts, while PolicyShiftGuard substantially improves policy-sensitive performance. The 7B model achieves SOTA performance of 76.9 Avg. F1 and 72.1 Avg. PSS on PolicyShiftBench, transfers well to UnSafeBench and SafeEditBench, and improves the latency-performance trade-off with a concise output format. Ablations confirm that matched pass/block boundary pairs are essential for stable policy adaptation.

图像安全政策适应基准测试大模型

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