Skip to content

Researchers propose adversarial tokenization attack that can bypass LLM safety restrictions without changing the textAdversarial Tokenization

Paper Tracker· arXiv:2503.02174· ACL 2025· Renato Lui Geh, Zilei Shao, Guy Van den Broeck·Indexed by this site · 2026-10-09· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

AdvTok jailbreaks by changing only tokenization, not text; on Malicious, Llama3 has an SRScore of .517 (Table 1).

Threat modelThe attacker does not change the malicious string, only its tokenization, to elicit unsafe responses, cause safety classifiers to judge it as safe, or in prompt injection, only append the payload. AdvTok requires the target model's logits. The paper does not use terms like white-box or black-box. The victims are subword LLMs and safety classifiers.

Questions
LLM pipelines typically use only one canonical tokenization, ignoring all other valid tokenizations. The authors ask: can one bypass safety alignment and still generate meaningful responses by changing only the tokenization, without altering the malicious text?
Methods
Tokenization is organized using edit distance with insertion cost 1 and deletion cost 0, and MRMDD is used to sample by distance. AdvTok greedily maximizes the target response prefix probability on the neighborhood of distance 2, and the same tokenization can be connected to GCG, AutoDAN, and FFA.
Experiments and results
Jailbreak data are AdvBench, Malicious, and Masterkey. The authors claim AdvTok has the highest standalone SRScore on Llama3; combined with AutoDAN it is higher on OLMo2. In safety model bypass and prompt injection, adversarial tokenization also outperforms the canonical tokenization baseline.
Limitations and future work
The authors note limited applicability to closed-source models: logits are needed, and models that do not allow inputting raw token sequences will block this attack (Section 12). Experiments include open-source LLMs in the main text along with LlamaGuard and ShieldGemma; the defenses in Section 10 have no accompanying experimental results.
Experimental setupLlama3.2-1B、Llama3.2-3B et al. · AdvBench、Malicious et al. · SRScore、ASR et al.
Evaluated models
Llama3.2-1BLlama3.2-3BLlama3.1-8BGemma2 (2B)OLMo2 (7B)LlamaGuardShieldGemma
Benchmarks
AdvBenchMaliciousMasterkeyTruthfulQAQ&A dataset (Appendix C)
Metrics
SRScoreASRAHSBypass Rateprompt injection success rateaccuracy
AI summaryThe paper proposes an adversarial tokenization attack: the same string has exponentially many tokenizations, while LLM training and inference typically use only one, e.g., Llama3 splits penguin into [p,enguin], while [peng,uin] is equally valid. The authors find that models, though trained on only one tokenization, can still understand other tokenizations, and use this to retokenize clearly malicious strings to bypass safety and alignment restrictions. Experiments on three frontier LLMs and adversarial datasets validate the attack; the authors claim its effectiveness is competitive with existing state-of-the-art adversarial methods, without modifying the text of harmful requests, revealing a previously unknown vulnerability in subword models. The paper was published at ACL 2025.

The paper proposes an adversarial tokenization attack: the same string has exponentially many tokenizations, while LLM training and inference typically use only one, e.g., Llama3 splits penguin into [p,enguin], while [peng,uin] is equally valid. The authors find that models, though trained on only one tokenization, can still understand other tokenizations, and use this to retokenize clearly malicious strings to bypass safety and alignment restrictions. Experiments on three frontier LLMs and adversarial datasets validate the attack; the authors claim its effectiveness is competitive with existing state-of-the-art adversarial methods, without modifying the text of harmful requests, revealing a previously unknown vulnerability in subword models. The paper was published at ACL 2025.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Can changing only tokenization, without modifying the malicious text, bypass alignment and still produce meaningful replies?

    Can changing only tokenization, without modifying the text, bypass LLM safety alignment and still produce meaningful replies.

    • Scenario: The authors believe most pipelines treat the tokenizer as a technical detail, using only one canonical tokenization for training and inference, ignoring the exponential number of other valid tokenizations. If these tokenizations still carry semantics, post-training alignment may only shift probability mass near the canonical tokenization.
    • Existing methods: The authors state that existing work on non-canonical tokenization mainly focuses on marginalization rather than generation; retokenization and token splitting are treated as defenses, not as attacks on tokenization itself; searching prefix/suffix tokens changes the text. The authors state that, to their knowledge, treating adversarial tokenization as an attack has not been explored before.
    • Observation: In Figure 4, question-answering accuracy decreases with normalized distance from canonical tokenization; endpoint values are unreadable in the text conversion. The authors state the trend is smooth, with little noise nearby, and hypothesize that non-canonical tokenizations may still access unaligned conditional distributions.
    • This paper's approach: Propose a greedy search, AdvTok, that does not change the malicious string, only the token boundaries, and can be attached to existing attacks. Case studies are jailbreaks, safety model evasion, and prompt injection.
    • Threat model:
      • Goal: For jailbreaks, the model must faithfully answer the malicious request; for safety model evasion, a dedicated classifier must judge the request as safe; for prompt injection, a harmless request, when appended with a payload, must produce a toxic reply.
      • Knowledge: The search uses the target model's conditional probabilities (Equation 2), requiring logits. The paper does not use white-box, black-box, or no-box to name this setting.
      • Capability: Does not change the underlying string. In prompt injection, the attacker cannot modify the user request, only append a payload; the user is assumed honest, and their request is canonically tokenized.
      • Victim systems: Subword LLMs, and safety classifiers that can be stacked on the conversation pipeline. Success is determined by StrongREJECT, bypass rate, and substring plus refusal rules, respectively.
  2. What related research exists?

    Safety alignment, tokenization marginalization, and jailbreak methods have not treated non-canonical tokenization as an attack axis.

    Section 2 of the paper places related work into three categories: safety training, tokenization research, and token-based attacks and defenses, and then compares with jailbreak baselines in experiments.

    Safety and Alignment

    • Supervised fine-tuning: Agarwal et al. (2024), Gu et al. (2024), Sanh et al. (2022), Wei et al. (2022) use supervised fine-tuning for adaptation or distillation.
    • Preference alignment: Rafailov et al. (2024), Schulman et al. (2017), Azar et al. (2023), Yuan et al. (2023) learn policies or rankings from human preferences.
    • Red teaming: Samvelyan et al. (2024), Pan et al. (2024), Perez et al. (2022) generate or organize adversarial prompts. The authors state that these safety and red-teaming processes do not account for non-canonical tokenization.

    Tokenization Itself

    • Tokenization issues in subword models: Giulianelli et al. (2024), Petrov et al. (2023), Ovalle et al. (2024), Singh and Strouse (2024) discuss how strings are split. The paper only cites them here.
    • Marginalization: Geh et al. (2024), Cao and Rimell (2021), Chirkova et al. (2023), Vieira et al. (2024) study non-canonical tokenization. The authors state their focus is marginalization, not the impact on generation.

    Token-Related Attacks and Defenses

    • Retokenization defenses: The authors list Jiang et al. (2024) and Ding et al. (2025) as retokenization or token splitting, and state they are not designed against adversarial tokenization attacks.
    • Adversarial tokens: Zou et al. (2023), Wang et al. (2024) search for specific prefix/suffix tokens. The authors state the two are adjacent but fundamentally different: that search modifies the text, while adversarial tokenization only changes the token-space representation (Figure 1).

    Baseline Methods and Datasets

    • Jailbreak baselines: canonical tokenization; GCG (Zou et al., 2023) with gradient-optimized suffixes; AutoDAN (Liu et al., 2024b) uses genetic algorithms to assemble prefixes and suffixes; FFA (Zhou et al., 2024) uses fixed templates to place requests in fictional or hypothetical scenarios. Section 7 also mentions template rewrites from Liu et al. (2024a), Xiao et al. (2024), Jiang et al. (2024).
    • Data and evaluation: AdvBench 520, Malicious 100, Masterkey 45 (Table 3 writes MasterKey). StrongREJECT comes from Souly et al. (2024); the rubrics for ASR and AHS come from Qi et al. (2023) and Jiang et al. (2024). Safety classifiers are LlamaGuard (Inan et al., 2023) and ShieldGemma (Zeng et al., 2024). Prompt injection uses a request-payload-response template similar to Perez and Ribeiro (2022).

    The authors position this paper as an overlooked attack axis: without changing the text, it can compete with existing adversarial methods and can be attached to existing attacks. The authors state that, to their knowledge, this attack has not been explored before.

  3. How does the paper address this problem?

    AdvTok greedily searches the tokenization neighborhood, maximizing the conditional probability of the target reply prefix.

    First, edit distance organizes the valid tokenizations of a string into a samplable structure, then AdvTok improves the conditional probability of the target response over a local neighborhood. Uniform sampling by distance is used in Sections 4–5; the jailbreak search is a separate greedy process and does not sample from that graph.

    Distance and MRMDD

    • BPE canonical tokenization: The vocabulary starts from characters and repeatedly merges the highest-frequency token pair until a predetermined size. The canonical tokenizer applies the training merge order to a fixed point. Only BPE vocabularies are considered below.
    • Distance: Levenshtein is used, with insertion cost 1 and deletion cost 0, so substitution becomes delete-then-insert. The maximum distance between any two tokenizations is the string length. Appendix A also writes it as the size of the difference of the two tokenizations' split position sets. The authors state that with positive and uniform costs, polynomial-time uniform sampling by distance remains open, and suspect it is NP-hard, so they set the deletion cost to 0.
    • Graph representation: Paths in an MDD are complete tokenizations. Algorithm 1 compiles a multi-root MDD (MRMDD): the i-th root corresponds to tokenizations at distance exactly i from the reference; edges deviating from the reference consume budget, and paths that cannot reach the end are pruned.
    • Scale: The edge bound is O(|x|^2·|V|), since distance does not exceed |x|. The authors claim that in practice valid tokens are few, so edges are closer to |x|^2. Appendix B uses the Llama3 tokenizer, AdvBench sentence starts, and k=20: at length 20, edges remain below 1600, with a quadratic fit of y=2.5541x^2. Uniform sampling from distance i is linear in the number of edges.

    How semantic preservation is estimated

    • Fixing the question, four options, and distance k, check whether the highest-probability answer under the canonical tokenization is the standard answer under tokenizations at that distance. This is a lower bound: marginalizing over all tokenizations of the answer is NP-hard for autoregressive models (Geh et al., 2024).
    • Sample 128 tokenizations per distance. For comparison, divide the distance by the string's maximum distance. The QA set has 15 questions with 4 options each, 5 each of easy, medium, and hard (Appendix C).

    AdvTok

    • Neighborhood: Ne(v) is the set of tokenizations at distance exactly 2 from v. Proposition 2: when token length is bounded, the neighborhood size is O(|v|^2). Proposition 3: any two BPE tokenizations are mutually reachable via neighborhood steps, so local search suffices to reach any tokenization.
    • Optimization: The goal is to find the tokenization maximizing the probability of the target response r given prefix q, i.e., argmaxv ∈ TV(x) pLLM(r ∣ q, v). Its decision form (Problem 4) is NP-complete (Theorem 5). Algorithm 2 therefore iterates only over the neighborhood, taking the neighbor with the highest probability at each step.
    • Experimental approximation: Appendix E.1 does not traverse the entire neighborhood but samples 128 without replacement; the authors call this a lower bound on the full optimization. The initial tokenization for the main results is a uniform random sample, not the canonical tokenization; the authors claim that starting from the canonical tokenization lands in a lower local maximum. The iteration cap is rarely reached because the search stops at a local optimum; the paper does not give the cap's value.
    • Target response: r is a question-related affirmative prefix. AdvBench reuses the prefix from Zou et al. (2023), and the other two datasets use handcrafted prefixes. The authors' rationale is that a tokenization eliciting one affirmative prefix may also elicit semantically similar but lexically different prefixes. The prefix text is not reproduced here.

    Usage in the three case studies

    • Jailbreak: The attack input is a tokenization of the malicious request, with the text unchanged. The same tokenization can be inserted into GCG, AutoDAN, and FFA templates or prefixes/suffixes. Generation settings are temperature=1, top_k=0, top_p=1, at most 256 new tokens, with 32 responses per attack.
    • Safety models: pSafety(not safe|g, q)>0.5 is judged unsafe, otherwise safe. The bypass rate is the proportion of malicious requests judged safe. It reuses the tokenizations from the Llama3 and Gemma2 jailbreaks rather than optimizing separately for misclassification. The authors claim this better matches the setting where the chat model must give an affirmative response while passing the classifier. LlamaGuard shares a tokenizer with Llama3, and ShieldGemma with Gemma2.
    • Prompt injection: The paper calls it man-in-the-middle. The attacker cannot modify the harmless, canonically tokenized user request and can only append a payload. Success requires both: the target string is a case-insensitive substring of the response, and the response does not contain the refusal strings from Table 7. There are 11 requests, 8 payloads, and 5 target responses, totaling 440 combinations, with 64 responses each. Appendix E.2 gives the original sentences, not reproduced here.

    Defenses discussed by the authors

    • Full retokenization: The authors claim that if the (de)tokenizer is bijective, this fully solves the problem. Gemma2's token IDs 330 and 235317 map to the same string; conflicting token pairs are 8381 for Gemma2, 121995 for OLMo2, and 309862 for Llama3.
    • API accepting only strings: This blocks the exploit, but users lose the access needed for token-level fine-tuning or embeddings, and it does not address open-source models.
    • Training pipeline: The authors argue that pretraining leaks semantics across many tokenizations (Kaplan et al., 2024), while safety training is usually post-training with relatively little data and may not cover these tokenizations. The authors propose that fully addressing the issue may require incorporating safety into the pretraining of subword models. The paper does not report experiments for these defenses.
  4. What experiments did the paper conduct?

    In Table 1, AdvTok has the highest SRScore across all three Llama3 columns.

    Experimental Setup

    • Models: Main semantic and jailbreak experiments use Llama3 (1B), Gemma2 (2B), OLMo2 (7B). The size experiments in Appendix F.1 specify Llama3.2-1B, Llama3.2-3B, Llama3.1-8B, and the 1B column matches the Llama3 numbers in Table 1. Safety models are LlamaGuard, ShieldGemma. The reviewer for AHS/ASR is GPT-4o-mini-2024-07-18.
    • Data: The QA set in Appendix C has 15 questions. Jailbreaks use AdvBench 520, Malicious 100, Masterkey 45 (Table 3). Prompt injection has 440 combinations. Appendix H uses 100 harmful questions from Malicious and 100 harmless questions from TruthfulQA.
    • Baselines: canonical tokenization; GCG with batch 512, top-k 256, 100 steps; AutoDAN with 100 steps, using the original authors' success detection; FFA optimizes three scene-purpose pairs (Table 4), templates not reproduced. AdvTok can be combined with all three.
    • Metrics: SRScore is in [0, 1], higher means not refusing and relevant to the request. AHS is 1–5. ASR is the proportion with harm score equal to 5. Safety models report Bypass Rate. Prompt injection reports success rate.
    • Generation and evaluation: For jailbreaks, each attack generates 32 replies, reporting mean and standard error. GPT-4o-mini uses temperature=0, top_p=0. StrongREJECT uses its high-level API; the paper does not specify the model behind that reviewer. Figure 5 samples 16 tokenizations per distance for one request, each generating 32 replies of length 256. Prompt injection generates 64 per combination.
    • Search budget: AdvTok samples 128 neighbors per step, not the full neighborhood. Jailbreak cases use about 4680 NVIDIA L40S GPU hours. The paper does not report the iteration limit used in experiments, nor the number of search queries.

    Main Results

    The table below lists only the SRScore means from Table 1; standard errors are in the original table. It exceeds 8 rows, so Gemma2 / Masterkey is not included.

    Swipe horizontally to read the table

    Model and DatasetCanonicalAdvTokHighest in that column of Table 1
    Llama3 / AdvBench.023.275AdvTok .275
    Llama3 / Malicious.176.517AdvTok .517
    Llama3 / Masterkey.272.451AdvTok .451
    Gemma2 / AdvBench.020.150AutoDAN .429
    Gemma2 / Malicious.042.104AdvTok+AutoDAN .406
    OLMo2 / AdvBench.015.214AdvTok+AutoDAN .670
    OLMo2 / Malicious.036.238AdvTok+AutoDAN .697
    OLMo2 / Masterkey.231.370AdvTok+AutoDAN .612
    • The authors state that AdvTok performs best as a standalone attack on Llama3, and when combined with other methods it remains below standalone AdvTok. One possible explanation the authors give is that Llama3 may have intentionally or unintentionally seen known jailbreak techniques during safety post-training.
    • The authors state that on Gemma2 and OLMo2, standalone AdvTok is competitive, especially when combined with AutoDAN. In Table 1, standalone AdvTok for OLMo2 across the three columns is below FFA (.447, .513, .438). On Gemma2's AdvBench, AdvTok+AutoDAN (.390) is below standalone AutoDAN (.429).
    • Not included Gemma2 / Masterkey: Canonical .219, AdvTok .290, the highest in that column is AdvTok+AutoDAN .352. Another combination did not increase: on Gemma2's Malicious, AdvTok+GCG is .374, while standalone GCG is .385.

    Safety Model Bypass

    • Tests the request rather than the 32 replies: whether the same set of jailbreak tokenizations is judged safe by LlamaGuard and ShieldGemma, threshold 0.5.
    • Table 2: On LlamaGuard, AdvTok achieves AdvBench 16.15%, Malicious 16.00%, Masterkey 55.56%; the highest for that model on AdvBench is AdvTok+AutoDAN at 24.81%. Canonical tokenization is 3.27%, 9.00%, 33.33%. On ShieldGemma, AdvTok achieves 63.27%, 86.00%, 86.67%; the highest on AdvBench is AdvTok+GCG at 69.94%. Its canonical tokenization is already 53.27%, 79.00%, 80.00%.
    • The authors state that LlamaGuard defends well on AdvBench and Malicious, but struggles with adversarial tokenization, especially Masterkey, and state that a safety model bypass rate above 20% is already high. Appendix H, Table 10: ShieldGemma's canonical tokenization has TP 0.21 on harmful questions and FP 0.00 on harmless ones; the authors state the high bypass rate comes from high false negatives, over-judging questions as safe. LlamaGuard's canonical tokenization has TP 0.91, FP 0.02; GCG, AutoDAN, FFA have FP 0.57, 0.38, 0.95 on harmless questions, while AdvTok has FP 0.03, TP 0.84. The authors state that LlamaGuard may have been trained on common text-modifying jailbreaks, but AdvTok still evades detection.

    Prompt Injection

    • 440 combinations, 64 each. Success requires both hitting the target substring and not containing the refusal strings from Table 7. The authors state this does not cover all correct/incorrect classifications, because replies often censor or misspell offensive words (Table 13).
    • Figure 6 labels three group means and standard deviations: AdvTok is 76.98%±30.48%, 74.63%±27.12%, 47.82%±34.22%; canonical baseline is 5.80%±17.36%, 36.62%±37.89%, 23.96%±33.62%. The text does not specify which model each panel corresponds to. The authors state that success rates consistently increase after adversarial tokenization. The y-axis scale is 0 to 100.
    • Table 13 shows sampled replies from Llama3 for the same request and same payload: the canonical tokenization side mostly refuses; the AdvTok side includes both the target string and spelling variants and rewrites. The original sentences are not reproduced.

    Semantics vs. Distance

    • Figure 4: Llama3, Gemma2, OLMo2 on easy, medium, and hard levels show accuracy decreasing with normalized distance. The authors state the trend is smooth, with little noise for non-canonical tokenizations near canonical. The text conversion does not read the curve endpoints.
    • Figure 5: On one malicious request, the canonical tokenization at distance 0 tends to have the lowest score. The authors state Llama3 is nearly concave, possibly corresponding to semantic decay; OLMo2 appears to rise, which the authors think may be because semantic signals are preserved more stably on that model. This is the authors' interpretation of the figure.

    Other Ablations and Analyses

    • Size (Table 8, SRScore): Llama3.2-1B's AdvTok is .275, .517, .451; 3B is .115, .284, .418; 8B is .043, .092, .280. The highest in the Masterkey column for 8B is AdvTok+AutoDAN .345. The authors state that AutoDAN becomes more effective with size, while other methods tend to decrease; AdvTok is most effective at 1B and 3B.
    • ASR (Table 6): Llama3's AdvTok is 23.65%, 39.41%, 27.22%; OLMo2's AdvTok+AutoDAN is 55.07%, 63.78%, 48.54%. On Gemma2's AdvBench, AutoDAN is 49.30%, AdvTok is 6.14%.
    • AHS (Table 5, 1–5): Llama3's AdvTok is 2.855, 3.523, 3.442; OLMo2's AdvTok+AutoDAN is 4.022, 4.223, 4.090.
    • Length (Table 9, Overall): AdvTok has Pearson r=0.4833 (p=0.0000); AdvTok+GCG is 0.5139; AdvTok+AutoDAN is 0.1329 (p=0.1943). The authors state that longer texts have larger tokenization spaces, which may help jailbreaks. In Figure 9, aggregated prompts mostly fall in [50, 100].
    • Hyperparameters (Figure 11, Llama 3.2 1B, Malicious): The caption states that sampling more neighbors increases AdvTok, and even 2 samples exceed other methods; the initial tokenization seed has little influence. Section 7 states that hyperparameter choices do not significantly change results.
    • Vocabulary length (Appendix D): Llama3 and OLMo2 have maximum token length 128, Gemma2 maximum 31, most below 10.
  5. What are some points that can be further explored?

    The authors note that closed-source scenarios require logits, and raw token input blocks the attack.

    Limitations and future directions noted by the authors

    • Adversarial tokenization has limited applicability to closed-source LLMs (Section 12 Limitations).
    • The method relies on logits to compute Equation (2), and many proprietary models restrict this access (Section 12).
    • Closed-source models that do not allow users to input raw token sequences inherently block this attack (Section 12).

    Section 10 proposes retokenization, restricting API inputs, and incorporating safety into pretraining, but does not present them as planned experiments. The ethics section acknowledges that public code may be misused and hopes to advance safety research; this is not a stated research limitation.

    Experimental coverage

    • The generation models for the main results are Llama3 (1B), Gemma2 (2B), OLMo2 (7B); Appendix F.1 and Table 8 additionally include Llama3.2-3B and Llama3.1-8B. The 1B column matches the Llama3 numbers in Table 1.
    • Jailbreak data are AdvBench 520, Malicious 100, Masterkey 45, with 32 responses per attack. The QA set has 15 questions, with 128 tokenizations per distance.
    • Safety models are LlamaGuard and ShieldGemma, with a threshold of 0.5, reusing tokenizations from the jailbreak search rather than optimizing for misclassification. Appendix H additionally reports FP and TP for Malicious 100 and TruthfulQA 100.
    • Prompt injection has 440 combinations, with 64 responses each. Figure 6 gives mean success rates for three groups; the main text does not label the model for each panel. The AHS/ASR evaluation is by GPT-4o-mini-2024-07-18; the paper does not specify the model behind StrongREJECT.
    • Section 10 discusses input retokenization, APIs accepting only strings, and incorporating safety into pretraining; the paper does not report experimental results for these defenses. AdvTok samples 128 neighbors per step. Jailbreak cases total about 4680 L40S GPU hours. The paper does not report the iteration cap or the number of search queries.
  6. Summarize the main content of the paper

    The authors state that non-canonical tokenization can evade alignment and still produce replies to the original request.

    The authors attack aligned subword LLMs with non-canonical tokenization: the characters of the malicious string remain unchanged, only the token boundaries are altered.

    • Problem: Deployed systems typically use only the single canonical tokenization given by BPE. The authors ask whether another valid tokenization can evade safety restrictions while the response still addresses the original request.
    • Method: With insertion cost 1 and deletion cost 0, tokenizations within a given budget of the reference tokenization are compiled into an MRMDD, used for sampling by distance. AdvTok instead starts from a random tokenization and greedily improves the conditional probability of an affirmative response prefix in the neighborhood at distance exactly 2; the decision form of this optimization is NP-complete. The same tokenization can be inserted into GCG, AutoDAN, and FFA. Experiments sample only 128 neighbors per step.
    • Semantics: In Figure 4, QA accuracy for Llama3, Gemma2, and OLMo2 decreases with normalized distance. The authors claim nearby tokenizations retain semantics, with a smooth decline.
    • Jailbreak: In Table 1, Llama3's AdvTok SRScore is .275 on AdvBench, .517 on Malicious, and .451 on Masterkey, higher than the canonical tokenization's .023, .176, and .272, and the highest in those three columns. On OLMo2, AdvTok+AutoDAN is .670, .697, and .612. On Gemma2's AdvBench, standalone AutoDAN's .429 is higher than AdvTok's .150.
    • Classifiers and injection: LlamaGuard's bypass rate for AdvTok on Masterkey is 55.56% (Table 2). ShieldGemma's canonical tokenization bypass rates are already 53.27%, 79.00%, and 80.00%. Among the three prompt injection mean groups in Figure 6, AdvTok is 76.98%, 74.63%, and 47.82%, while the canonical baseline is 5.80%, 36.62%, and 23.96%; the model for each panel is not labeled in the main text.
    • Authors' conclusions: Non-canonical tokenizations can still generate meaningful responses while moving outside the probability mass shifted by alignment. The authors argue that safety post-training is smaller relative to pretraining and may not cover these tokenizations; addressing the issue may require incorporating safety into pretraining. The authors also note that closed-source models without logits, or that do not allow inputting raw token sequences, will block this attack.

Related papers

Show 3 more papers
Read originalACL 2025