Skip to main content
QUICK REVIEW

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

Yongshuo Zong, Ondrej Bohdal|arXiv (Cornell University)|Feb 3, 2024
Natural Language Processing TechniquesComputer Science4 citations
TL;DR

This paper introduces VLGuard, the first vision-language safety instruction-following dataset for fine-tuning vision large language models (VLLMs). By applying post-hoc or mixed fine-tuning with VLGuard, VLLMs achieve significantly improved safety—reducing jailbreaking success rates to near zero—while preserving or even enhancing helpfulness, offering a low-cost, effective baseline for VLLM safety alignment.

ABSTRACT

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.

Motivation & Objective

  • Address the critical vulnerability of VLLMs to jailbreaking attacks and harmful content generation, which arises from unsafe data during vision-language instruction fine-tuning.
  • Identify that fine-tuning LLMs with vision-language data breaks their pre-existing safety alignment, increasing susceptibility to harmful outputs.
  • Develop a dedicated, versatile safety dataset (VLGuard) to enable effective safety alignment for VLLMs without compromising their helpfulness.
  • Propose two practical fine-tuning strategies—post-hoc and mixed training—that integrate safety alignment into existing VLLM training pipelines with minimal computational cost.
  • Establish a benchmark for evaluating VLLM safety and provide a foundation for future robust safety mechanisms in multimodal LLMs.

Proposed method

  • Curate VLGuard, a vision-language safety instruction-following dataset covering diverse harmful categories, including text-only and vision-language adversarial examples.
  • Apply post-hoc fine-tuning by training the VLLM on VLGuard data after initial pretraining and vision-language alignment, preserving original capabilities.
  • Implement mixed fine-tuning by jointly training on standard vision-language data and VLGuard data, enabling end-to-end safety integration.
  • Use both full parameter fine-tuning and LoRA (Low-Rank Adaptation) to ensure compatibility with various training regimes and model architectures.
  • Design a comprehensive evaluation suite to test robustness against black-box jailbreaking attacks, including prompt engineering and image-based triggers.
  • Leverage existing safety-aligned LLMs as a base, ensuring that safety alignment is reinforced rather than overwritten during vision-language fine-tuning.

Experimental results

Research questions

  • RQ1To what extent does vision-language instruction fine-tuning degrade the safety alignment of pre-trained LLMs when used to build VLLMs?
  • RQ2Can a dedicated, small-scale vision-language safety dataset effectively improve VLLM safety without degrading helpfulness or performance?
  • RQ3How effective are post-hoc and mixed fine-tuning strategies in enhancing VLLM robustness against black-box jailbreaking attacks?
  • RQ4Can the proposed safety fine-tuning strategy generalize across different VLLM architectures and parameter scales?
  • RQ5What is the impact of integrating safety alignment during training versus applying it as a post-hoc step in terms of safety and performance trade-offs?

Key findings

  • Fine-tuning VLLMs with VLGuard reduces the success rate of black-box jailbreaking attacks to near zero, with some models achieving 100% rejection of unsafe instructions.
  • Post-hoc fine-tuning on LLaVA-v1.5-13B reduced unsafe outputs from 96.67% to 100% in the Safe-Unsafe category, indicating strong alignment improvement.
  • The mixed fine-tuning strategy on MiniGPT-v2 reduced unsafe outputs from 90.00% to 42.00% in the Unsafe category, demonstrating effectiveness across different model architectures.
  • Safety alignment via VLGuard maintains or slightly improves helpfulness, with no significant degradation in performance on standard vision-language benchmarks.
  • The method is computationally efficient, requiring only 2,000 curated images and showing compatibility with both LoRA and full fine-tuning.
  • The dataset and fine-tuning strategy are effective across multiple models, including LLaVA and MiniGPT, suggesting broad applicability and scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.