Vocabulary Attack to Hijack Large Language Model Applications

Patrick Levi, Christoph P. Neumann
4/3/2024
cs.CRcs.AIcs.DC

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

Abstract

The fast advancements in Large Language Models (LLMs) are driving an increasing number of applications. Together with the growing number of users, we also see an increasing number of attackers who try to outsmart these systems. They want the model to reveal confidential information, specific false information, or offensive behavior. To this end, they manipulate their instructions for the LLM by inserting separators or rephrasing them systematically until they reach their goal. Our approach is different. It inserts words from the model vocabulary. We find these words using an optimization procedure and embeddings from another LLM (attacker LLM). We prove our approach by goal hijacking two popular open-source LLMs from the Llama2 and the Flan-T5 families, respectively. We present two main findings. First, our approach creates inconspicuous instructions and therefore it is hard to detect. For many attack cases, we find that even a single word insertion is sufficient. Second, we demonstrate that we can conduct our attack using a different model than the target model to conduct our attack with.

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. 2 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{levi2024vocabulary,
  title  = {Vocabulary Attack to Hijack Large Language Model Applications},
  author = {Patrick Levi and Christoph P. Neumann},
  year   = {2024},
  eprint = {2404.02637},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.02637v2}
}

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

Discussion