Skip to yearly menu bar Skip to main content


Poster with Prerecorded Video
in
Workshop: Tokenization Workshop (TokShop)

Adversarial Tokenization

Renato Geh · Zilei Shao · Guy Van den Broeck

Keywords: [ Alignment ] [ LLM Safety ] [ Adversarial Attacks ]

[ ] [ Project Page ]
Fri 18 Jul 10:50 a.m. PDT — noon PDT

Abstract: Current LLM pipelines account for only one possible tokenization for a given string, ignoring exponentially many alternative tokenizations during training and inference. For example, the standard $\texttt{Llama}$ tokenization of penguin is $\texttt{[p,enguin]}$, yet $\texttt{[peng,uin]}$ is another perfectly valid alternative. In this paper, we show that despite LLMs being trained solely on one tokenization, they still retain semantic understanding of other tokenizations, raising questions about their implications in LLM safety. Put succinctly, we answer the following question: can we adversarially tokenize an obviously malicious string to evade safety and alignment restrictions? We show that not only is adversarial tokenization an effective yet previously neglected axis of attack, but it is also competitive against existing state-of-the-art adversarial approaches without changing the text of the harmful request. We empirically validate this exploit across three state-of-the-art LLMs and adversarial datasets, revealing a previously unknown vulnerability in subword models.

Chat is not available.