Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Safety Fine-Tuning at (Almost) No Cost: A Baseline for Vision Large Language Models

About

Current vision large language models (VLLMs) exhibit remarkable capabilities yet are prone to generate harmful content and are vulnerable to even the simplest jailbreaking attacks. Our initial analysis finds that this is due to the presence of harmful data during vision-language instruction fine-tuning, and that VLLM fine-tuning can cause forgetting of safety alignment previously learned by the underpinning LLM. To address this issue, we first curate a vision-language safe instruction-following dataset VLGuard covering various harmful categories. Our experiments demonstrate that integrating this dataset into standard vision-language fine-tuning or utilizing it for post-hoc fine-tuning effectively safety aligns VLLMs. This alignment is achieved with minimal impact on, or even enhancement of, the models' helpfulness. The versatility of our safety fine-tuning dataset makes it a valuable resource for safety-testing existing VLLMs, training new models or safeguarding pre-trained VLLMs. Empirical results demonstrate that fine-tuned VLLMs effectively reject unsafe instructions and substantially reduce the success rates of several black-box adversarial attacks, which approach zero in many cases. The code and dataset are available at https://github.com/ys-zong/VLGuard.

Yongshuo Zong, Ondrej Bohdal, Tingyang Yu, Yongxin Yang, Timothy Hospedales• 2024

Related benchmarks

TaskDatasetResultRank
Sentiment AnalysisSST-2 (test)
Accuracy94.8
136
Mathematical ReasoningGSM8K (test)
HS49.2
62
Text ClassificationSST-2
Harmful Score49.3
35
Instruction FollowingAlpacaEval (test)
Helpfulness Score37.5
32
Safety AlignmentHarmful Dataset (test)
Harmful Score54.4
30
Safety EvaluationVLSafe Orig.
Unsafe Rate0.23
19
Safety EvaluationJailbreakLLMs Orig.
Unsafe Rate0.00e+0
19
Sentiment AnalysisSST2 (test)
HS Score43.9
14
Topic ClassificationAGNews (test)
Hit Score (HS)43.9
14
Safety EvaluationVLSafe Blank
Unsafe Rate0.00e+0
13
Showing 10 of 21 rows

Other info

Follow for update