TF-Attack: Transferable and Fast Adversarial Attacks on Large Language Models

Zelin Li, Kehai Chen, Lemao Liu, Xuefeng Bai, Mingming Yang +2 more
8/26/2024
cs.CL

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

With the great advancements in large language models (LLMs), adversarial attacks against LLMs have recently attracted increasing attention. We found that pre-existing adversarial attack methodologies exhibit limited transferability and are notably inefficient, particularly when applied to LLMs. In this paper, we analyze the core mechanisms of previous predominant adversarial attack methods, revealing that 1) the distributions of importance score differ markedly among victim models, restricting the transferability; 2) the sequential attack processes induces substantial time overheads. Based on the above two insights, we introduce a new scheme, named TF-Attack, for Transferable and Fast adversarial attacks on LLMs. TF-Attack employs an external LLM as a third-party overseer rather than the victim model to identify critical units within sentences. Moreover, TF-Attack introduces the concept of Importance Level, which allows for parallel substitutions of attacks. We conduct extensive experiments on 6 widely adopted benchmarks, evaluating the proposed method through both automatic and human metrics. Results show that our method consistently surpasses previous methods in transferability and delivers significant speed improvements, up to 20 times faster than earlier attack strategies.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2024tfattack,
  title  = {TF-Attack: Transferable and Fast Adversarial Attacks on Large Language Models},
  author = {Zelin Li and Kehai Chen and Lemao Liu and Xuefeng Bai and Mingming Yang and Yang Xiang and Min Zhang},
  year   = {2024},
  eprint = {2408.13985},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.13985v3}
}

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/2408.13985.svg)](https://codeofpaper.com/paper/2408.13985)

Discussion