TokenBreak: Bypassing Text Classification Models Through Token Manipulation

Kasimir Schulz, Kenneth Yeung, Kieran Evans
6/9/2025
cs.LGcs.CR

No confident code implementation found for this paper.

Abstract

Natural Language Processing (NLP) models are used for text-related tasks such as classification and generation. To complete these tasks, input data is first tokenized from human-readable text into a format the model can understand, enabling it to make inferences and understand context.

Show full abstract

Text classification models can be implemented to guard against threats such as prompt injection attacks against Large Language Models (LLMs), toxic input and cybersecurity risks such as spam emails. In this paper, we introduce TokenBreak: a novel attack that can bypass these protection models by taking advantage of the tokenization strategy they use. This attack technique manipulates input text in such a way that certain models give an incorrect classification. Importantly, the end target (LLM or email recipient) can still understand and respond to the manipulated text and therefore be vulnerable to the very attack the protection model was put in place to prevent. The tokenizer is tied to model architecture, meaning it is possible to predict whether or not a model is vulnerable to attack based on family. We also present a defensive strategy as an added layer of protection that can be implemented without having to retrain the defensive model.

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. Any repos shown below are weak matches — 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{schulz2025tokenbreak,
  title  = {TokenBreak: Bypassing Text Classification Models Through Token Manipulation},
  author = {Kasimir Schulz and Kenneth Yeung and Kieran Evans},
  year   = {2025},
  eprint = {2506.07948},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.07948v1}
}

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

Discussion