Table of Contents
Fetching ...

Ghosting Your LLM: Without The Knowledge of Your Gradient and Data

Abeer Matar A. Almalky, Ziyan Wang, Mohaiminul Al Nahian, Li Yang, Adnan Siraj Rakin

TL;DR

This work reveals a critical security vulnerability in large language models by showing that Bit Flip Attacks can be effectively conducted without gradients or data access. It introduces Gradient-Data-Free-BFA (GDF-BFA), which uses Layer Vulnerability Index (LVI) and Weight Vulnerability Index (WVI) to locate highly sensitive bits offline with public data, enabling a single bit flip to catastrophically degrade performance across tasks and architectures. The approach demonstrates strong transferability across generative and reasoning benchmarks and across multiple numeric precisions, underscoring hardware-level robustness concerns for cloud-based LLM deployment. The findings highlight the need for hardware-aware defenses and robust fault-tolerance mechanisms in LLM security frameworks.

Abstract

In recent years, large language models (LLMs) have achieved substantial advancements and are increasingly integrated into critical applications across various domains. This growing adoption underscores the need to ensure their security and robustness. In this work, we focus on the impact of Bit Flip Attacks (BFAs) on LLMs, which exploits hardware faults to corrupt model parameters, posing a significant threat to model integrity and performance. Existing studies on BFA against LLMs adopt a progressive bit-search strategy that predominantly relies on gradient-based techniques to identify sensitive layers or weights. However, computing gradients comes with two specific challenges: First, in the context of LLMs, it increases computational and memory costs exponentially, and Second, it requires access to a sample victim dataset or knowledge of the victim domain to compute the gradient. In this work, we investigate beyond the scope of attack efficacy and aim to develop an efficient, practical Gradient-Data-free Bit-Flip Attack. The challenge lies in the core principle of adversarial attacks, which relies heavily on computing gradients from sample test/train data and manipulating model weights based on gradient information. To overcome this, we propose novel vulnerability index metrics that can identify vulnerable weight bits in LLMs independent of any gradient or data knowledge. By removing the dependency on gradient computation, our approach drastically reduces memory requirements and scales efficiently across multiple tasks with constant complexity. Experimental results demonstrate the efficiency of our method, requiring as few as a single bit flip to achieve adversarial objectives for five open-source LLMs.

Ghosting Your LLM: Without The Knowledge of Your Gradient and Data

TL;DR

This work reveals a critical security vulnerability in large language models by showing that Bit Flip Attacks can be effectively conducted without gradients or data access. It introduces Gradient-Data-Free-BFA (GDF-BFA), which uses Layer Vulnerability Index (LVI) and Weight Vulnerability Index (WVI) to locate highly sensitive bits offline with public data, enabling a single bit flip to catastrophically degrade performance across tasks and architectures. The approach demonstrates strong transferability across generative and reasoning benchmarks and across multiple numeric precisions, underscoring hardware-level robustness concerns for cloud-based LLM deployment. The findings highlight the need for hardware-aware defenses and robust fault-tolerance mechanisms in LLM security frameworks.

Abstract

In recent years, large language models (LLMs) have achieved substantial advancements and are increasingly integrated into critical applications across various domains. This growing adoption underscores the need to ensure their security and robustness. In this work, we focus on the impact of Bit Flip Attacks (BFAs) on LLMs, which exploits hardware faults to corrupt model parameters, posing a significant threat to model integrity and performance. Existing studies on BFA against LLMs adopt a progressive bit-search strategy that predominantly relies on gradient-based techniques to identify sensitive layers or weights. However, computing gradients comes with two specific challenges: First, in the context of LLMs, it increases computational and memory costs exponentially, and Second, it requires access to a sample victim dataset or knowledge of the victim domain to compute the gradient. In this work, we investigate beyond the scope of attack efficacy and aim to develop an efficient, practical Gradient-Data-free Bit-Flip Attack. The challenge lies in the core principle of adversarial attacks, which relies heavily on computing gradients from sample test/train data and manipulating model weights based on gradient information. To overcome this, we propose novel vulnerability index metrics that can identify vulnerable weight bits in LLMs independent of any gradient or data knowledge. By removing the dependency on gradient computation, our approach drastically reduces memory requirements and scales efficiently across multiple tasks with constant complexity. Experimental results demonstrate the efficiency of our method, requiring as few as a single bit flip to achieve adversarial objectives for five open-source LLMs.

Paper Structure

This paper contains 16 sections, 6 equations, 2 figures, 9 tables.

Figures (2)

  • Figure 1: Overview of Gradient-Data-Free BFA (GDF-BFA). The attacker performs all computations offline using a copy of the model to identify and record the vulnerable weight locations. Later, during the online phase, the attacker flips the bits at these precomputed locations.
  • Figure 2: The evaluation of wikitext-2 PPL after applying BFA on Llama-2-7B-int8 on three settings: (1) blue line shows flipping bits of weights without LVI and WVI. (2) orange line shows flipping bits Without WVI in LVI. green line shows flipping GDF-BFA (ours).