TokenBreak: Bypassing Text Classification Models Through Token Manipulation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Schulz, Kasimir, Yeung, Kenneth, Evans, Kieran
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915333899550720
author Schulz, Kasimir
Yeung, Kenneth
Evans, Kieran
author_facet Schulz, Kasimir
Yeung, Kenneth
Evans, Kieran
contents 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. 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.
format Preprint
id arxiv_https___arxiv_org_abs_2506_07948
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle TokenBreak: Bypassing Text Classification Models Through Token Manipulation
Schulz, Kasimir
Yeung, Kenneth
Evans, Kieran
Machine Learning
Cryptography and Security
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. 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.
title TokenBreak: Bypassing Text Classification Models Through Token Manipulation
topic Machine Learning
Cryptography and Security
url https://arxiv.org/abs/2506.07948