PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails

Mingyang Song, Luxin Xu, Haoyu Sun, Minzhou Pan, Yu Cheng +1 more
7/7/2026
cs.CVcs.AIcs.CL

No official code found. Best implementation: ssmisya/PolicyShiftGuard (20 stars, MIT, last commit 2026-07-06).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails

200Jul 6, 20263 months agoMIT

Similar Papers

Cite this paper

@article{song2026policyshiftguard,
  title  = {PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails},
  author = {Mingyang Song and Luxin Xu and Haoyu Sun and Minzhou Pan and Yu Cheng and Bo Li},
  year   = {2026},
  eprint = {2607.05910},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.05910v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.05910.svg)](https://codeofpaper.com/paper/2607.05910)

Discussion