PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails
Abstract
Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.
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.
Results and benchmarks
Image guardrails are typically trained and evaluated under a fixed safety policy, implicitly treating safety as an intrinsic property of an image.
Benchmark evidence is limited
Evidence graph: 4 refs, 4 links.
Utility signals: depth 55/100, grounding 85/100, status medium.
Implementation
Best maintained implementation now
PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails
24 stars · 2 forks · Last push Jul 8, 2026 · MIT license
- License
- CI
- Dependencies
- Docker
Matched via arXiv identifier search · Strong overlap with paper title keywords
ssmisya/PolicyShiftGuard is the best available implementation candidate based on ranking signals, but recommendation confidence is not yet high. CI workflows are present. License is declared (MIT).
Open ssmisya/PolicyShiftGuard- No repository-level red flags were detected, but paper-specific preprocessing and hyperparameter details may still be under-specified.
- Selected ssmisya/PolicyShiftGuard as the strongest maintained implementation for new work.
- Includes CI workflow signals.
- Includes dependency/environment manifest signals.
- Repository activity is within the last 24 months.
Reproduction readiness
Ready to run
Ready to reproduce
- Clone ssmisya/PolicyShiftGuard and install dependencies from pyproject.toml.
- CI pipeline detected, so automated tests are in place.
- Last updated 110 days ago.
Quick start
git clone https://github.com/ssmisya/PolicyShiftGuard.git
pip install -e . Validation caveat
Hugging Face artifacts
No direct paper-linked artifacts were found. Showing strongest curated related artifacts for faster exploration.
Models
- PolicyShiftGuard/PolicyShiftGuard-7B
87 downloads · 1 likes
Broaden model search
Datasets
- PolicyShiftGuard/adaptive-policy-v2.8-withreason
201 downloads · 0 likes · Updated Jul 19, 2026
- PolicyShiftGuard/PolicyShiftBench
300 downloads · 0 likes · Updated Jul 19, 2026
Broaden dataset search
Spaces
No trustworthy spaces matches right now.
Search spaces on Hugging FaceResearch context
Tasks
None detected
Methods
None detected
Domains
Computer vision
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.