Source-linked AI summary

Safety of Multimodal Large Language Models on Images and Texts

Xin Liu, Yichen Zhu, Yunshi Lan, Chao Yang, Yu Qiao

arXiv:2402.00357v3cs.CV

TL;DR

Research on MLLM safety is still in its early stages, and a comprehensive account of image-related risks is lacking. This paper surveys safety evaluation, attacks, and defenses, concluding that images introduce distinct risks including low-cost perturbations, obedience to visual instructions through OCR, and weakened alignment after cross-modal training.

  • Problem

    MLLM safety research is still in its early stages, and the lack of a comprehensive survey leaves the field’s landscape unclear, including the distinct risks images introduce.

    Source: §1 · p. 1
  • Method

    The paper reviews MLLM safety foundations, evaluation datasets and metrics, attack and defense approaches, and research challenges.

    Source: §1 · p. 2, §7 · p. 7
  • Results

    The survey identifies three visual-modality risks: low-cost image perturbations can achieve effective attacks, OCR can lead models to obey malicious visual instructions, and cross-modal training can weaken aligned LLMs’ safety alignment.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The survey maps current MLLM safety research and highlights unresolved challenges and promising future research opportunities.

    Source: §7 · p. 7

    Many attack studies lack in-depth explanations of success, quantitative evaluation, or direct comparisons across attacks.

    Source: §6.2 · p. 7

Abstract

from arXiv · show

Attracted by the impressive power of Multimodal Large Language Models (MLLMs), the public is increasingly utilizing them to improve the efficiency of daily work. Nonetheless, the vulnerabilities of MLLMs to unsafe instructions bring huge safety risks when these models are deployed in real-world scenarios. In this paper, we systematically survey current efforts on the evaluation, attack, and defense of MLLMs' safety on images and text. We begin with introducing the overview of MLLMs on images and text and understanding of safety, which helps researchers know the detailed scope of our survey. Then, we review the evaluation datasets and metrics for measuring the safety of MLLMs. Next, we comprehensively present attack and defense techniques related to MLLMs' safety. Finally, we analyze several unsolved issues and discuss promising research directions. The latest papers are continually collected at https://github.com/isXinLiu/MLLM-Safety-Collection.

1 Introduction

MLLM safety research is still early, and image inputs raise distinct risks alongside inherited LLM vulnerabilities. This survey maps safety evaluation, attacks, defenses, and future research for MLLMs on images and text.

1 Introduction

  • LLMs have brought convenience but also safety risks, while alignment techniques have enhanced their security.The authors describe MLLM safety research as early-stage and note the lack of a comprehensive survey.Source: §1 · p. 1
  • The introduction frames key questions around image-specific risks, how to measure MLLM safety, and methods for resisting unsafe queries.The authors say evaluation is essential for judging how close MLLMs are to achieving safety.Source: §1 · p. 1
  • Visual-modality risks include low-cost adversarial image perturbations, obedience to malicious visual instructions through OCR, and weakened alignment after cross-modal training.The survey reports that aligned LLMs usually reject malicious textual instructions, but may obey corresponding visual instructions.Source: §1 · pp. 1–2
  • The survey compares safety-evaluation datasets and metrics, reviews attack and defense approaches, and identifies future research opportunities.It focuses on MLLMs handling 2D images and text unless otherwise specified.Source: §1 · pp. 1–2
  • The paper’s roadmap covers MLLM and safety background, evaluation, attacks, defenses, future directions, and a conclusion.The roadmap places evaluation in Section 3, attacks in Section 4, defenses in Section 5, and future directions in Section 6.Source: §1 · p. 2

2 Background

This background defines the survey’s scope as general-domain MLLM safety on images and text. It outlines common MLLM architectures and explains why safety lacks a settled, unified definition.

2 Background

  • The survey focuses on general-domain safety because professional domains such as robotics, medicine, law, and finance involve distinct, complicated problems.It excludes tool-augmented LLMs and LLM agents.Source: §2 · p. 2, §2.2 · p. 2

2.1 An Overview of MLLMs

  • An MLLM combines an LLM of at least 1B parameters, a vision encoder, and a cross-modal fusion module; common fusion designs include linear projection, learnable queries, and cross-attention.Visual instruction tuning lets the fusion module learn cross-modal information for image and text inputs.Source: §2.1 · p. 2

2.2 Understanding of Safety

  • Safety has no consensus definition: toxicity is subjective and covers only a subset of potential harms, while prior work uses differing safety dimensions.The paper notes that safety risks vary across development stages and calls for a more mature, unified understanding.Source: §2.2 · pp. 2–3

3 Evaluation

The survey reviews representative MLLM safety datasets and groups evaluation metrics into human, rule-based, and model-based automatic approaches. It notes that open-ended answers complicate subjective evaluation and that cost must be balanced against accuracy.

3.1 Dataset

  • Representative MLLM safety datasets cover privacy, meme-based social abuse, toxic image captions, and benchmarks built from visual prompts or natural images.The survey focuses on recently constructed datasets for MLLMs, rather than detailing benchmarks created only for individual experiments.Source: §3.1 · p. 3

3.2 Metric

  • Open-ended MLLM answers make subjective evaluation difficult, while evaluation methods must balance cost and accuracy.The survey classifies approaches as human, rule-based, or model-based automatic evaluation.Source: §3.2 · p. 3

Human Evaluation

  • Human evaluation uses annotators to judge unsafe answers and often reports attack success rate as the proportion of samples eliciting unsuitable text.Other reported measures include recognition success rate and defense success rate; one study asks whether tool-abuse responses appear natural and helpful.Source: Human Evaluation · pp. 3–4

3.1 Dataset

  • Table 1 compares representative evaluation datasets; its volume marker limits the stated count to the multimodal test set, and ToViLaG tests caption toxicity without ground-truth captions.The table caption identifies these qualifications but does not provide dataset-specific comparisons in the supplied passage.Source: Table 1 · p. 4

Rule-based Evaluation

  • Rule-based evaluation checks outputs against target strings or treats safety as classification, while generative tasks may use image-captioning and response-utility metrics.Examples include accuracy and F1 for classification, CIDEr and BLEU-4 for image captioning, and SSIM for image perturbations.Source: Rule-based Evaluation · p. 4

Model-based Automatic Evaluation

  • Model-based automatic evaluation uses specialized toxicity models or powerful LLMs, which can support more customized judgments of semantic alignment, refusal, and harmlessness.GPT-4 scoring described in the survey considers relevance, safety, and persuasiveness.Source: Model-based Automatic Evaluation · p. 4

4 Attack

The survey organizes MLLM attacks around malicious images and malicious text. It describes image perturbations and embedded visual instructions, alongside textual prompt construction and attacks that combine visual and textual perturbations.

4 Attack

  • The survey groups attacks into malicious image and text construction, noting that some works study both.For images, it distinguishes adversarial attacks from visual prompt injection.Source: §4 · p. 4, §4.1 · p. 4

Adversarial Attack

  • Adversarial-image studies range from end-to-end perturbation optimization to attacks using visual-encoder access, and include attacks on commercial-model defenses.Reported effects include toxic outputs, privacy leakage, and toxic-content abuse; other work studies third-party attacks against honest users, including tool misuse.Source: Adversarial Attack · p. 5
  • Some adversarial attacks pair visual and textual perturbations during optimization, while the textual perturbations are absent at test time in CroPA.Qi et al. report visual-attack computational cost at approximately one-twelfth of text-attack cost; Tu et al. evaluate attacks across GPT-4, GPT-4V, and ten open-source MLLM categories.Source: Adversarial Attack · p. 5

Visual Prompt Injection

  • Visual prompt injection embeds malicious raw text in an image, which MLLMs may obey through OCR even when corresponding textual prompts are refused.The reviewed examples include altered identity information, unsafe phrases rendered in images, and split-word visual prompts intended to evade OCR detection.Source: Visual Prompt Injection · pp. 5–6

4.2 Malicious Text Construction

  • Malicious text attacks use crafted or optimized prompts, including adversarial prefixes and two-hop templates targeting model defenses.Studies also report that textual adversarial attacks can achieve higher success rates on LLaVA than on its original LLMs, and that fine-tuning on LLaVA-Instruct can degrade LLM safety alignment.Source: §4.2 · p. 6

5 Defense

The survey distinguishes inference-time alignment from training-time alignment as two lines of MLLM safety defense. The former acts through prompts or activations, while the latter adds training feedback or output-processing modules.

5 Defense

  • The survey presents inference-time and training-time alignment as its two main defense lines.It also points to further potential directions for improving MLLM safety.Source: §5 · p. 6

5.1 Inference-time Alignment

  • Inference-time alignment uses prompt engineering or safety steering vectors, without requiring the cost of training a model or module.Examples include detailed system prompts and Self-Moderation, which iteratively revises privacy-leaking responses and asks the model to judge them.Source: §5.1 · p. 6, §5.2 · p. 6

5.2 Training-time Alignment

  • Training-time approaches add safety feedback or modules that detect and detoxify unsafe outputs.One approach uses GPT-4-generated Natural Language Feedback in modified conditional reinforcement learning; another adds an unsafe-content detector and output detoxifier.Source: §5.2 · pp. 6–7

6 Future Research Opportunities

The survey identifies open questions in safety evaluation, attack analysis, and alignment. It calls for broader benchmarks, deeper study of attack-enabling factors, and attention to both safety and utility in alignment.

6.1 Reliable Safety Evaluation

  • Safety benchmarks need broader coverage and finer-grained capability taxonomies, with explicit choices about unsafe elements, data resources, diversity, volume, and quality control.For LLM-based evaluation, carefully designed prompts are needed to define objective rules and metrics.Source: §6.1 · p. 7

6.2 In-Depth Study of Safety Risk

  • Attack research often lacks analysis of what enables success, quantitative evaluation, and direct comparison across attacks.The survey also calls for studying how architecture, model parameters, cross-modal training data, and attack resource requirements relate to safety.Source: §6.2 · p. 7

Alignment Techniques

  • For visual instruction tuning, the survey identifies unresolved choices about safety-dataset quality, example diversity, sample numbers, and training order.It also says the challenges of applying RLHF to MLLM safety and the construction of preference data remain unclear.Source: Alignment Techniques · p. 7

Balance between Safety and Utility

  • Alignment must balance refusing malicious instructions against preserving utility, and the appropriate balance may differ across applications and audiences.The survey cites privacy-protection scoring and a loss balancing response utility with attack success as relevant inspiration.Source: Balance between Safety and Utility · p. 7

7 Conclusion

The paper surveys MLLM safety to characterize the field’s current development. It reviews safety evaluation, attacks, and defenses, then identifies challenges and future research opportunities.

  • The survey reviews evaluation, attack, and defense work to demonstrate the current development status of MLLM safety.Source: §7 · p. 7
  • It introduces an overview of MLLMs and the paper’s understanding of safety before reviewing safety research.Source: §7 · p. 7
  • It identifies existing challenges and points to promising future research opportunities.Source: §7 · p. 7
Loading 2402.00357v3…