Jailbreaking LLMs with language style as a hidden attack surface
Jailbreak LLMs with Linguistic Style as a Hidden Attack Surface
The authors propose that language style is an LLM jailbreak attack surface: 20 styles rewrite the same harmful goal, and ASR on HarmBench rises from 1–75% to a maximum of 99.5%, with mechanistic analysis and a style-aware DPO defense.
The attacker rewrites the harmful goal g into x̃g,s under style conditioning and then queries the target model Mt; the goal is unchanged and only style such as tone/formality is changed; the attack is conducted under zero-shot, single-turn, query budget k=5, with the attacker model being Gemini-2.5 or the fine-tuned Style-LLaMA-3.1-8B; the victim systems are 8 instruction-tuned LLMs and two guardrails, Llama Guard and Qwen Guard.
- The authors argue that language style (tone, formality, register) is an overlooked jailbreak attack surface: expressing the same harmful goal in a different style can change ASR by an order of magnitude, whereas prior work mostly treated style effects as an evaluation artifact.
- Build a taxonomy of 20 styles, use Gemini-2.5 to generate stylized rewrites and distill a Style-LLaMA-3.1-8B attacker, and use a Top-k or BERT style selector for single-turn attacks within a k=5 budget; additionally perform mechanistic analysis on LLaMA-3.1-8B and propose style-aware DPO defense.
- On HarmBench, ASR for the 8 models generally rises from single digits to 43–99.5%; Technical, Formal, and Humorous styles are the strongest; guardrail failure rate rises to 80.5–98.5%; mechanistically, the refusal direction is partially suppressed but harmful intent can still be recovered by the probe; style-aware DPO reduces LLaMA-3.1-8B's ASR from 86% to 19.5%.
- The authors acknowledge that the 20-style taxonomy is incomplete, GPT-4o judging may have style bias, and the mechanistic analysis relies on linear representation and final-token assumptions; the mechanistic experiments cover only LLaMA-3.1-8B and Gemma-2-9b-it, with a paired set of about 130 items and 9 harmful goals.
- Evaluated models
- Llama-3.1-8BGemma-2-2BGemma-2-9BMistral-7BGPT-4oGPT-4.1-miniGemini-2.5Grok-4Llama GuardQwen Guard
- Benchmarks
- HarmBenchAdvBenchCatQADangerousQAWildTeamingUltraChatMT-BenchMT-Bench-101
- Metrics
- ASRHarmfulness score (1-5)guardrail failure rateMT-Bench score
The paper shows that language style is a previously overlooked systematic attack surface for LLM safety: for the same harmful goal, stylistic rewriting alone can produce attack success rates (ASR) that differ by an order of magnitude. Across multiple SOTA models, some styles reach up to 80% ASR, while others are below 6%. The authors propose a lightweight single-pass attack framework combining a style-conditioned generator with a BERT-based style selector, whose effectiveness is comparable to much more costly multi-round optimization methods. Mechanistic analysis of LLaMA-3.1-8B finds that stylistic rewriting disrupts refusal representations while preserving recoverable harmful intent, suggesting a distributed failure mode rather than a single refusal mechanism. Based on this finding, the authors propose a style-aware Direct Preference Optimization (DPO) defense that reduces ASR from 86% to 19.5% while largely preserving utility.
Paper analysis
What problem does this paper attempt to solve?
The authors argue that language style is an overlooked systematic jailbreak attack surface, and that expressing the same harmful goal in a different style can make ASR differ by an order of magnitude.
Core question: whether language style (tone, formality, register, framing) constitutes a systematic attack surface for LLM safety alignment—whether changing only the expressive style of the same harmful goal substantially changes jailbreak success rate, what the mechanism is, and whether it can be defended against.
- Problem setting and importance: LLM safety alignment (RLHF, DPO) is usually trained against the harmful intent itself; the authors state that stylized rewriting of the same harmful goal can produce order-of-magnitude differences in ASR, with some styles reaching 80% while others are below 6%, indicating that robustness depends not only on intent but also on expressive style.
- Shortcomings of existing methods: the authors state that GCG-style gradient optimization, PAIR/TAP-style iterative rewriting, and AutoDAN-Turbo/Jailbreak-R1/MTSA/DialTree-RPO-style search and reinforcement learning methods are computationally expensive and do not characterize safety behavior under different linguistic expressions; prior work such as Xiao et al. (2026) mostly interpreted style effects as an evaluation artifact.
- Core observation: the authors report that styles conveying authority, legitimacy, confidence, and urgency consistently increase jailbreak success rate, whereas styles expressing uncertainty, negation, or sarcasm are markedly weaker, and this ordering is consistent across models and datasets.
- What the paper proposes: a taxonomy of 20 styles; a single-turn, budget k=5 stylized red-teaming framework (style-conditioned generator + BERT style selector); a mechanistic analysis of LLaMA-3.1-8B; and a style-aware DPO defense.
- Threat model:
- Goal: rewrite a harmful goal g into a style-conditioned prompt x̃g,s to maximize the probability that the target model outputs a harmful response.
- Knowledge: the attack framework runs in a zero-shot setting; the attacker uses Gemini-2.5 or the fine-tuned Style-LLaMA-3.1-8B to generate rewrites; the paper does not explicitly classify its attack as black-box or white-box (the mechanistic analysis section uses white-box activations).
- Capability: single-turn rewriting of user prompts, query budget k=5, temperature 0.
- Victim systems: 8 instruction-tuned models (GPT-4o, GPT-4.1-mini, Gemini-2.5 Flash, Grok-4, LLaMA-3.1-8B, Mistral-7B, Gemma-2-2B/9B) and two external safety classifiers, Llama Guard and Qwen Guard.
What related research exists?
Related work falls into three groups: jailbreak and red-teaming methods, alignment and defenses, and mechanistic interpretability of jailbreaking; the authors state that this paper repositions style from an evaluation artifact to a systematic safety factor.
Jailbreak, red teaming, and safety alignment
- GCG (Zou et al., 2023): white-box gradient optimization that appends an adversarial suffix after the prompt.
- PAIR (Chao et al., 2024), TAP (Mehrotra et al., 2024): black-box iterative optimization and LLM-assisted rewriting.
- AutoDAN-Turbo (Liu et al., 2025), Jailbreak-R1 (Guo et al., 2025b), MTSA (Guo et al., 2025a), DialTree-RPO (Guo et al., 2026): model jailbreaking as a search or reinforcement learning problem, using lifelong strategy libraries or multi-turn attack trajectory tree search. The authors state that these methods are computationally expensive and do not characterize safety behavior along the style dimension.
Alignment failure and defenses
- Wei et al. (2023): safety training fails when prompts fall outside the pretraining distribution.
- RESTA (Bhardwaj et al., 2024), Constitutional Classifiers (Sharma et al., 2025): defenses against out-of-distribution prompts.
- Xiao et al. (2026): the authors relay their view that surface-level style/format patterns in jailbreak benchmarks systematically inflate measured ASR, i.e., treating style effects as an evaluation artifact.
Mechanistic interpretability of jailbreaking
- Arditi et al. (2024): refusal in language models is mediated by a single direction (the basis for the refusal vector construction in this paper).
- Ben-Tov et al. (2025): GCG-style adversarial suffixes succeed by hijacking attention and diverting contextualization away from safety-relevant information.
- Shaikh et al. (2023): forcing a CoT reasoning structure can bypass safety mechanisms in a zero-shot setting, suggesting cognitive load interferes with safety compliance; Shen et al. (2025) and Sorokoletova et al. (2026) analyze harmfulness directions and attention encoding of style and format.
Baselines and benchmarks
- Comparison baselines: GCG, PAIR, TAP, Jailbreak-R1, AutoDAN-Turbo (single-turn) and MTSA, DialTree-RPO (multi-turn), compared under the DialTree-RPO evaluation protocol with a k=5 budget (Table 5).
- Benchmarks: HarmBench is the main evaluation benchmark; AdvBench, CatQA, and DangerousQA are used for cross-dataset generalization and style selection; training data is drawn from a WildTeaming subset.
The authors' positioning: prior work mostly interpreted style effects as an evaluation artifact, whereas this paper states that language style is a systematic factor affecting safety behavior and provides mechanistic evidence different from suffix attacks—stylized bypass is not attention redirection but distributed perturbation of the refusal representation.
How does the paper address this problem?
Characterize the attack surface with a 20-style taxonomy, use a style-conditioned rewriter plus a style selector for single-turn attacks within a k=5 budget, then perform mechanistic analysis and propose style-aware DPO defense.
Overall approach: jailbreaking is formalized as style-conditioned rewriting—fix a harmful goal g, change only the style s, and use an attacker Ma to generate x̃g,s queries to the target model Mt; then a style selector picks the most effective style subset within budget; finally, interpretability analysis localizes the mechanism, and defenses are designed accordingly.
Problem setup and style taxonomy
- Formalization: given a target model Mt, the attack goal is to generate style-conditioned prompts x̃g,s = Ma(g, s) that maximize the probability that Mt's response y is a harmful response; the attacker first generates an internal plan rationale rg,s and then outputs the rewritten prompt.
- Separation of goal and instantiation: the abstract harmful goal g is fixed; only the stylized instance x̃g,s varies.
- 20 styles, four dimensions (Section 3.1): Emotional-Affective (anxious, urgent, compassionate, angry, etc.), Power & Social-Pragmatic (polite, assertive, flattering, etc.), Epistemic (tentative, confident, skeptical, etc.), Register (colloquial, formal, technical, humorous, sarcastic); the dimensions are drawn from politeness theory and register research.
Attacker and style selection
- Attacker: Gemini-2.5 serves as a zero-shot attacker and provides rewriting examples; these examples are then used to fine-tune LLaMA-3.1-8B with next-token prediction to obtain Style-LLaMA-3.1-8B, with the training objective of preserving the original intent and matching the target style.
- Top-k heuristic: rank styles by their aggregated ASR on AdvBench, CatQA, and DangerousQA, and take the globally strongest k styles.
- BERT selector: train a BERT classifier to predict style rankings from the input query, and at inference take the top-k to generate attacks, approximating a query-specific style subset.
Evaluation protocol
- Review: GPT-4o serves as the automatic reviewer, scoring responses for harmfulness on a 1–5 scale; an attack is judged successful only when the score is 5 (full compliance).
- Guardrail evaluation: measured by guardrail failure rate, i.e., the proportion of harmful stylized prompts misjudged as safe.
- Inference settings: zero-shot, native chat template, temperature 0, maximum output 512 tokens (1024 for the reviewer model); open-source models use vLLM, closed-source models go through APIs.
Mechanistic analysis methods
- Paired dataset: four conditions—Vanilla Harmful (VH), Stylized Attack (Succ), Vanilla Safe (VS), Stylized Safe (SS); only samples judged by the reviewer as successfully bypassing are retained; the held-out set n=75 is used to construct vectors and select heads, and the experimental set is n=56.
- Style-orthogonal refusal vector: vpure_ref = vref − (vref · vstyle)/(|vstyle|2) vstyle, i.e., Gram-Schmidt projection removes the style direction (SS−VS mean difference) component from the refusal direction (VH−VS mean difference), extracted at Layer 15.
- Four experiments: (A) cosine similarity tests the alignment of stylized attacks with vpure_ref; (B) a linear probe trained only on vanilla prompts performs OOD harmful intent detection; (C) causal ablation selects the top-5 safety heads and measures length-controlled payload attention; (D) patching vpure_ref at Layers 10–20 to see whether refusal can be restored, including a positive control of zeroing the vector.
style-aware DPO defense
- Data: harmful instructions are taken from AdvBench, CatQA, DangerousQA and their style variants; high-severity attack responses (score ≥3, length ≥80) serve as rejected and safe refusals as chosen; benign instructions are taken from the first 1000 entries of UltraChat, with normal answers as chosen and refusals as rejected, forcing intent and style to be separated.
- Training configuration: LoRA on LLaMA-3.1-8B (r=64, α=64, applied to all linear projection layers), DPO loss β=0.1, cosine learning rate with base learning rate 1×10⁻⁵, trained for 4 epochs with batch size 16, and LoRA merged before inference.
What experiments did the paper conduct?
On HarmBench, after style rewriting, ASR for 8 models generally rises from single digits to 43–99.5%; the mechanistic experiments rule out attention redirection and linear steering; style-aware DPO reduces LLaMA-3.1-8B's ASR from 86% to 19.5%.
Experimental Setup
- Models tested: GPT-4o, GPT-4.1-mini, Gemini-2.5 Flash, Grok-4 (closed-source); LLaMA-3.1-8B, Mistral-7B, Gemma-2-2B, Gemma-2-9B (open-source); guardrails are Llama Guard and Qwen Guard.
- Datasets: HarmBench is the main evaluation benchmark; AdvBench, CatQA and DangerousQA are used for cross-dataset generalization and style selection ranking; attacker training data is a subset of WildTeaming; benign defense data is the first 1000 entries of UltraChat. The paper does not report the number of samples for each benchmark.
- Attackers: Gemini-2.5 (zero-shot), LLaMA-3.1-8B (non-fine-tuned control), Style-LLaMA-3.1-8B (after fine-tuning).
- Metrics and judging: GPT-4o judging scores 1–5, and only a score of 5 is judged as a successful attack (ASR); for guardrails, failure rate is used (the proportion of harmful stylized prompts misjudged as safe).
- Inference settings: zero-shot, temperature 0, maximum output 512 tokens; budget attack k=5, following the DialTree-RPO evaluation protocol.
- Mechanistic experiments: mainly LLaMA-3.1-8B, reproduced on Gemma-2-9b-it; held-out n=75, experimental set n=56, Exp D validation bypass subset n=25.
Main Results
Table 1 (HarmBench ASR %, stylized rewrites generated by three attackers) and Table 5 (comparison with baseline methods under a k=5 budget, ASR %):
Swipe horizontally to read the table
Target model Original Gemini 2.5 Style-LLaMA-3.1-8B Top-5 Style BERT Selector Strongest baseline (method) Llama-3.1-8B 8 88 86 72.5 77.5 81.5 (DialTree-RPO) Gemma-2-2B 1 75.5 69 54 58 88.5 (DialTree-RPO) Gemma-2-9B 1.5 56.5 43 36.5 39 83 (DialTree-RPO) Mistral-7B 75 99.5 99 98 98 85 (DialTree-RPO) GPT-4o 5.5 84.5 78 65 64.5 86 (DialTree-RPO) GPT-4.1-mini 5 85.5 81.5 71 73.5 90 (DialTree-RPO) Gemini-2.5 18.5 86.96 82 67.5 70.5 87.5 (DialTree-RPO) Grok-4 6.5 43 40.5 33.5 35.5 76 (Jailbreak-R1) (According to Table 1 and Table 5; in Table 5, the Gemini-2.5 column uses the Gemini-2.0 Flash baseline numbers reported by DialTree-RPO, while the method in this paper uses Gemini-2.5 Flash, see Appendix A.1)
- The authors state that stylized rewrites increase ASR on almost all models, and that the open-source attacker Style-LLaMA-3.1-8B achieves attack effectiveness comparable to Gemini-2.5.
- The authors state that the method in this paper achieves the highest or second-highest ASR on 5 of 8 targets, with less computation than search-based methods; the BERT selector outperforms the Top-k heuristic on most targets.
- Exceptions visible in the table: in columns such as Gemma-2-2B and Grok-4, the method in this paper is lower than DialTree-RPO or Jailbreak-R1; in the Grok-4 column, both methods in this paper are lower than all three baselines.
Style Dimensions and Generalization
- Single-style ASR (Table 2): Technical, Formal and Humorous are highest on most models (e.g., on Gemma-2-2B, Humorous 33%, Technical 29.5%; on Mistral-7B, Technical 80%); Tentative, Reflective and Sarcastic are generally ineffective (multiple rows below 6%). The authors state that the style ranking is largely consistent across models, with strong styles conveying legitimacy, professionalism, confidence or cooperation, and weak styles introducing uncertainty, hesitation or sarcasm.
- Cross-dataset (Table 3, target LLaMA-3.1-8B, attacker Style-LLaMA-3.1-8B): AdvBench 9→66.5%, CatQA 5.5→46.2%, DangerousQA 3→34.5%. The authors state that the effect is not tied to a specific dataset.
- Guardrails (Table 4): Qwen Guard failure rate 2.0→80.5%, Llama Guard 7.5→98.5%. The authors state that stylized prompts retain the harmful goal but greatly increase missed detections by safety classifiers.
Mechanistic Analysis (Figure 1, Appendix D)
- Refusal direction is partially suppressed: At Layer 15, the median cosine similarity of stylized attacks to vpure_ref is 0.143, lower than 0.245 for vanilla harmful prompts (Mann-Whitney p=3.6×10⁻⁹, r=−0.65); however, a probe trained only on vanilla still detects the harmful intent of stylized attacks at 51.8%, with an FPR of 0.0% on stylized benign controls. The authors state that this rules out strict semantic camouflage.
- Not attention redirection: Safety-head payload attention 0.0049→0.0013 (down 73.0%), non-safety control heads 0.0012→0.0003 (down 73.7%), with consistent declines; the authors state that this is length dilution rather than safety-specific shifting.
- Resistance to linear intervention: Continuous patching of vpure_ref at Layers 10–20 restores only 8% refusal, with a maximum of 4% for a single layer and 0% for the positive control; injecting the style direction vstyle does not change the refusal rate (Appendix D.6). The authors state that the bypass occurs outside the main linear refusal subspace and is a distributed perturbation.
- Cross-architecture reproduction (Table 11): On Gemma-2-9b-it, the four results are qualitatively consistent (suppression p=2.6×10⁻¹⁰, r=−0.69; OOD detection 37.5%; attention decline in the two head types 84.6% vs. 85.0%; patching restores 4.5%).
Defense and Other Ablations
- style-aware DPO (Table 6): LLaMA-3.1-8B's HarmBench ASR drops from 86.0% to 19.5%, and MT-Bench from 8.09 to 7.85; the authors state that general capabilities are largely maintained while reducing ASR.
- Style diversity ablation (Table 8): Training on all 20 styles gives ASR 19.5%, while the Balanced/Weak/Strong subsets give 25.0%, 31.0% and 26.5%, respectively.
- Unseen-style generalization (Table 9): Under the Balanced split, seen 15.5% vs. unseen 18.5%; the authors state that there is partial transfer but not complete.
- Cross-model defense (Table 10): Gemma-2-2B 69.0→27.5%, Gemma-2-9B 43.0→24.5%; the authors state that the defense is effective across architectures, but caution is needed when comparing across models.
- Qualitative example (Appendix E, Table 12): A single deepfake goal is rewritten in 20 styles; the target model LLaMA-3.1-8B refuses the original prompt, while 7 styles (Urgent, Assertive, Passive-Aggressive, Confident, Skeptical, Formal, Humorous) receive a score of 5 for full compliance.
What are some points that can be further explored?
The authors list three limitations: the style taxonomy is incomplete, review bias, and mechanistic hypotheses; the mechanistic experiments cover only two models and about 130 paired samples.
Limitations and future directions noted by the authors
- Incomplete style taxonomy (Section 9): the 20 styles have broad coverage but are not exhaustive; multi-turn interaction and regional dialects may exhibit different attack behavior.
- Review reliability (Section 9): relies on GPT-4o as the automatic reviewer, which may introduce style bias and may be more lenient toward formal or technical outputs.
- Mechanistic hypotheses (Section 9): refusal vector extraction assumes safety concepts are linearly represented and strictly orthogonal to task features; causal tracing patches the entire residual stream at the final token, assuming the model has already aggregated safety concepts; safety dynamics in the middle of sequences with nonlinear representations or multiple tokens may not be captured.
- Mechanistic data scale (Appendix D.8): the paired set has about 130 entries and only 9 harmful targets; the effect-size intervals for small subsets are wide; extending to more targets in AdvBench/HarmBench is listed as future work.
- Mechanistic architecture coverage (Appendix D.8): validated only on LLaMA-3.1-8B and Gemma-2-9b-it; other families such as GPT and Mistral were not mechanistically evaluated.
- Negative localization (Appendix D.8): only ruled out mechanisms such as attention redirection, linear steering, and linear patching; did not positively localize the distributed computation that causes bypass; targeted interventions at the attention or MLP level are left as future work.
Experimental coverage
- A total of 8 target models were tested (4 closed-source, 4 open-source), with 2 guardrails (Llama Guard, Qwen Guard); the main evaluation benchmark is HarmBench, and the generalization evaluations are AdvBench, CatQA, and DangerousQA (Table 1, 3, 4).
- Attacks are single-turn, zero-shot, temperature 0; the budget attack fixes k=5 and is compared with 7 baselines under the DialTree-RPO protocol (Table 5).
- Attack success is judged by a GPT-4o reviewer (only a score of 5 counts as success); the paper does not report agreement between the reviewer and human annotation, nor the number of samples and number of repetitions for each benchmark.
- The causal patching in the mechanistic experiments validates only the bypass subset n=25 (the portion of the 56 that passed diagnostic filtering); the defense experiments cover three models: LLaMA-3.1-8B, Gemma-2-2B, and Gemma-2-9B (Table 10).
- Defense evaluation uses HarmBench stylized rewrites and MT-Bench/MT-Bench-101; the paper does not report evaluation against adaptive attacks (specifically optimized against this defense).
Summarize the main content of the paper
The authors state that language style is a systematic jailbreak attack surface: stylized rewriting in a single turn can raise ASR by an order of magnitude, the mechanism is distributed refusal perturbation, and style-aware DPO can partially mitigate it.
A paper on LLM jailbreak attacks, whose core claim is that language style itself constitutes an overlooked security attack surface.
- Question: For the same harmful goal, if only stylistic expressions such as tone, formality and register are changed, does the jailbreak success rate change systematically? The authors state that prior work mostly treated style effects as evaluation artifacts.
- Method: Build a taxonomy of 20 styles across four dimensions; use Gemini-2.5 to generate stylized rewrites and distill an open-source attacker Style-LLaMA-3.1-8B; use a Top-k heuristic or BERT selector for single-turn attacks within a k=5 query budget; perform mechanistic analysis on LLaMA-3.1-8B; propose style-aware DPO defense.
- Attack effectiveness: On HarmBench, ASR for 8 models rises from the original 1–75% to a maximum of 99.5% (Mistral-7B, Gemini 2.5 rewrites, Table 1); Technical, Formal and Humorous styles are strongest, while Tentative, Reflective and Sarcastic are generally below 6% (Table 2); cross-dataset generalization holds (AdvBench 9→66.5%, Table 3); Llama Guard guardrail failure rate rises from 7.5% to 98.5% (Table 4).
- Comparison with baselines: Under a k=5 budget, the method in this paper achieves the highest or second-highest ASR on 5 of 8 targets, but on targets such as Gemma-2-2B and Grok-4 it is lower than multi-turn DialTree-RPO (Table 5).
- Mechanism: Stylized attacks reduce alignment with the refusal direction (median 0.245→0.143), but harmful intent can still be recovered by a probe at 51.8%; the decline in payload attention is consistent in safety heads and control heads (length dilution); linear patching restores only 8% refusal. The authors therefore state that the bypass is a distributed, nonlinear perturbation of refusal rather than semantic camouflage or attention hijacking, and it is reproduced on Gemma-2-9b-it.
- Defense: style-aware DPO reduces LLaMA-3.1-8B's HarmBench ASR from 86.0% to 19.5%, and MT-Bench from 8.09 to 7.85; training on all styles outperforms subsets, partially transfers to unseen styles, and transfers to Gemma-2-2B/9B.
- Authors' conclusion: Effective alignment needs to go beyond intent detection and explicitly handle the attention and structural pathways through which language influences generation; stylized attacks can be combined with existing jailbreak methods, and incorporating them into preference training can improve robustness. The authors acknowledge that the style taxonomy is incomplete, GPT-4o judging may be biased, and the mechanistic analysis relies on linear representation assumptions.
Related papers
Show 3 more papers
- Adversarial Self-DistillationDefensesarXiv
- What Do Safety-Aligned LLMs Learn From Mixed Compliance Demonstrations?Analysis / interpretabilityarXiv