Skip to content
OpenTrain AIFor AI Companies

PolicyShiftGuard: Benchmarking and Improving Policy-Adaptive Image Guardrails

Mingyang Song, Luxin Xu, Haoyu Sun, Minzhou Pan, Yu Cheng +1 morePublished Jul 7, 2026
arXiv PDF
Researcher verdict
Starting point
Use as implementation starting point
Benchmark evidence
Missing
Not verified yet
Time to first repro
A few hours
Fast first run
Risk flags
0
None detected

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

Freshness tier: hot
Image guardrails are typically trained and evaluated under a fixed safety policy, implicitly treating safety as an intrinsic property of an image.

Implementation

Best maintained implementation now

Recommended
Confidence: Medium
Reproducibility: Strong

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

Why this implementation
Confidence: medium

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
Reproduction risks
  • 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

Time to first repro: hours
Last checked: Oct 25, 2026

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.
Open ssmisya/PolicyShiftGuard

Quick start

git clone https://github.com/ssmisya/PolicyShiftGuard.git
pip install -e .

Hugging Face artifacts

No direct paper-linked artifacts were found. Showing strongest curated related artifacts for faster exploration.

Models

Curated Related

Datasets

Curated Related

Spaces

No trustworthy spaces matches right now.

Search spaces on Hugging Face

Research context

Tasks

None detected

Methods

None detected

Domains

Computer vision

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX
Explore similar papers

Jump to Paper2Code search queries derived from this paper's research context.