Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

SafeR-CLIP: Mitigating NSFW Content in Vision-Language Models While Preserving Pre-Trained Knowledge

About

Improving the safety of vision-language models like CLIP via fine-tuning often comes at a steep price, causing significant drops in their generalization performance. We find this trade-off stems from rigid alignment strategies that force unsafe concepts toward single, predefined safe targets, disrupting the model's learned semantic structure. To address this, we propose a proximity-aware approach: redirecting unsafe concepts to their semantically closest safe alternatives to minimize representational change. We introduce SaFeR-CLIP, a fine-tuning framework that applies this principle of minimal intervention. SaFeR-CLIP successfully reconciles safety and performance, recovering up to 8.0% in zero-shot accuracy over prior methods while maintaining robust safety. To support more rigorous evaluation, we also contribute NSFW-Caps, a new benchmark of 1,000 highly-aligned pairs for testing safety under distributional shift. Our work shows that respecting the geometry of pretrained representations is key to achieving safety without sacrificing performance.

Adeel Yousaf, Joseph Fioresi, James Beetham, Amrit Singh Bedi, Mubarak Shah• 2025

Related benchmarks

TaskDatasetResultRank
Compositional Image GenerationGenEval
Overall Score39.5
94
Text-to-Image Safety EvaluationSafety Benchmarks (MMA, Sneaky, I2P-S, Ring, P4D)
MMA24.6
10
Safety EvaluationSafety Benchmarks
Average ASR35.1
10
Compositional generationT2I-CompBench++
Color Score22
10
Text-to-Image GenerationUtility Evaluation Set
CLIPScore22.4
10
Text-to-Image GenerationTIFA
Object Score58.6
10
Showing 6 of 6 rows

Other info

Follow for update