Table of Contents
Fetching ...

Energy-Latency Manipulation of Multi-modal Large Language Models via Verbose Samples

Kuofeng Gao, Jindong Gu, Yang Bai, Shu-Tao Xia, Philip Torr, Wei Liu, Zhifeng Li

TL;DR

This work addresses the security risk of energy-latency manipulation in multi-modal LLMs by showing that inference energy and latency scale with the length of generated sequences. It proposes verbose samples—verbose images and verbose videos—crafted under a perturbation budget $||x'-x||_p \le \epsilon$ and optimized via projected gradient descent to maximize the output length $N$. The method introduces three losses: a Delayed EOS loss $\mathcal{L}_1$, an Uncertainty loss $\mathcal{L}_2$, and a modality-specific diversity loss $\mathcal{L}_3$ (token diversity for images, frame-feature diversity for videos), along with a temporal weight scheme to balance them. Empirical results show up to about $8\times$ longer outputs for image-based LLMs and around $4\times$ longer outputs for video-based LLMs, with corresponding increases in energy and latency, underscoring a real security concern and informing possible defenses and safer deployment strategies.

Abstract

Despite the exceptional performance of multi-modal large language models (MLLMs), their deployment requires substantial computational resources. Once malicious users induce high energy consumption and latency time (energy-latency cost), it will exhaust computational resources and harm availability of service. In this paper, we investigate this vulnerability for MLLMs, particularly image-based and video-based ones, and aim to induce high energy-latency cost during inference by crafting an imperceptible perturbation. We find that high energy-latency cost can be manipulated by maximizing the length of generated sequences, which motivates us to propose verbose samples, including verbose images and videos. Concretely, two modality non-specific losses are proposed, including a loss to delay end-of-sequence (EOS) token and an uncertainty loss to increase the uncertainty over each generated token. In addition, improving diversity is important to encourage longer responses by increasing the complexity, which inspires the following modality specific loss. For verbose images, a token diversity loss is proposed to promote diverse hidden states. For verbose videos, a frame feature diversity loss is proposed to increase the feature diversity among frames. To balance these losses, we propose a temporal weight adjustment algorithm. Experiments demonstrate that our verbose samples can largely extend the length of generated sequences.

Energy-Latency Manipulation of Multi-modal Large Language Models via Verbose Samples

TL;DR

This work addresses the security risk of energy-latency manipulation in multi-modal LLMs by showing that inference energy and latency scale with the length of generated sequences. It proposes verbose samples—verbose images and verbose videos—crafted under a perturbation budget and optimized via projected gradient descent to maximize the output length . The method introduces three losses: a Delayed EOS loss , an Uncertainty loss , and a modality-specific diversity loss (token diversity for images, frame-feature diversity for videos), along with a temporal weight scheme to balance them. Empirical results show up to about longer outputs for image-based LLMs and around longer outputs for video-based LLMs, with corresponding increases in energy and latency, underscoring a real security concern and informing possible defenses and safer deployment strategies.

Abstract

Despite the exceptional performance of multi-modal large language models (MLLMs), their deployment requires substantial computational resources. Once malicious users induce high energy consumption and latency time (energy-latency cost), it will exhaust computational resources and harm availability of service. In this paper, we investigate this vulnerability for MLLMs, particularly image-based and video-based ones, and aim to induce high energy-latency cost during inference by crafting an imperceptible perturbation. We find that high energy-latency cost can be manipulated by maximizing the length of generated sequences, which motivates us to propose verbose samples, including verbose images and videos. Concretely, two modality non-specific losses are proposed, including a loss to delay end-of-sequence (EOS) token and an uncertainty loss to increase the uncertainty over each generated token. In addition, improving diversity is important to encourage longer responses by increasing the complexity, which inspires the following modality specific loss. For verbose images, a token diversity loss is proposed to promote diverse hidden states. For verbose videos, a frame feature diversity loss is proposed to increase the feature diversity among frames. To balance these losses, we propose a temporal weight adjustment algorithm. Experiments demonstrate that our verbose samples can largely extend the length of generated sequences.
Paper Structure (21 sections, 1 theorem, 15 equations, 7 figures, 11 tables)

This paper contains 21 sections, 1 theorem, 15 equations, 7 figures, 11 tables.

Key Result

Proposition 1

fazel2002matrixFor a rank minimization or maximization problem, the rank of a matrix can be heuristically measured using the nuclear norm of the matrix.

Figures (7)

  • Figure 1: The approximately positive linear relationship between energy consumption, latency time, and the length of generated sequences in image-based LLMs and video-based LLMs. Following shumailov2021sponge, energy consumption is estimated by NVIDIA Management Library (NVML), and latency time is the response time of an inference.
  • Figure 2: An overview of verbose samples against MLLMs to increase the length of generated sequences, thereby inducing higher energy-latency cost. Two modality non-specific losses are designed to delay EOS occurrence and enhance output uncertainty. Besides, a modality specific loss is proposed for each modality. For verbose images, the goal is to improve token diversity, while for verbose videos, is to improve frame feature diversity. Moreover, a temporal weight adjustment algorithm is proposed to better utilize the three objectives.
  • Figure 3: The length distribution of four image-based LLMs: (a) BLIP. (b) BLIP-2. (c) InstructBLIP. (d) MiniGPT-4. The peak of length distribution of our verbose images shifts towards longer sequences.
  • Figure 4: The length distribution of three video-based LLMs: (a) VideoChat-2. (b) Video-Vicuna. (c) Video-LLaMA. The peak of length distribution of our verbose videos shifts towards longer sequences.
  • Figure 5: GradCAM for the original image $\bm{x}$ and our verbose counterpart $\bm{x}'$. The attention of our verbose images is more dispersed and uniform.
  • ...and 2 more figures

Theorems & Definitions (3)

  • Definition 1
  • Proposition 1
  • Definition 2