ImgTrojan: Jailbreaking Vision-Language Models with ONE Image

Xijia Tao, Shuai Zhong, Lei Li, Qi Liu, Lingpeng Kong
3/5/2024
cs.CVcs.AI

No official code found. Best implementation: xijia-tao/ImgTrojan (24 stars, last commit 2025-03-26).

Abstract

There has been an increasing interest in the alignment of large language models (LLMs) with human values. However, the safety issues of their integration with a vision module, or vision language models (VLMs), remain relatively underexplored. In this paper, we propose a novel jailbreaking attack against VLMs, aiming to bypass their safety barrier when a user inputs harmful instructions. A scenario where our poisoned (image, text) data pairs are included in the training data is assumed. By replacing the original textual captions with malicious jailbreak prompts, our method can perform jailbreak attacks with the poisoned images. Moreover, we analyze the effect of poison ratios and positions of trainable parameters on our attack's success rate. For evaluation, we design two metrics to quantify the success rate and the stealthiness of our attack. Together with a list of curated harmful instructions, a benchmark for measuring attack efficacy is provided. We demonstrate the efficacy of our attack by comparing it with baseline methods.

View on arXivView PDF

Code Implementations(1)

xijia-tao/ImgTrojanCommunity100%

Code and data for "ImgTrojan: Jailbreaking Vision-Language Models with ONE Image"

242Shell, PythonFeb 23, 20241 years ago

Similar Papers

Cite this paper

@article{tao2024imgtrojan,
  title  = {ImgTrojan: Jailbreaking Vision-Language Models with ONE Image},
  author = {Xijia Tao and Shuai Zhong and Lei Li and Qi Liu and Lingpeng Kong},
  year   = {2024},
  eprint = {2403.02910},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.02910v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.02910.svg)](https://codeofpaper.com/paper/2403.02910)

Discussion