Defensive M2S: Training Guardrail Models on Compressed Multi-turn Conversations
Hyunjun Kim · 2026
Read Defensive M2S: Training Guardrail Models on Compressed Multi-turn Conversations by Hyunjun Kim (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-00454.txt.
Introduction
Hyunjun Kim addresses the cost of safety checks for chatbots that hold long conversations. Guardrail models scan dialogues for attacks, but reading every turn of a long history is expensive. Kim proposes Defensive M2S, which trains guardrails on compressed versions of multi-turn conversations, squeezed into a single-turn format with simple templates.
A formal analysis shows training cost drops from quadratic to linear in the number of turns. In experiments, the compressed training data used ninety-three times fewer tokens than full histories. Three guardrail model families were tested on a multi-turn jailbreak benchmark. The best setup caught most attacks while using about ninety-five percent fewer tokens at inference, showing compression can keep safety checks cheap without giving up detection.
Catalog record
| CREATOR | Hyunjun Kim |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 32 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-00454
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Defensive M2S: Training Guardrail Models on Compressed Multi-turn Conversations Hyunjun Kim Abstract Guardrail models are essential for ensuring the safety of Large Language Model (LLM) deployments, but processing full multi-turn conversation histories incurs significant computational cost. We propose Defensive M2S , a training paradigm that fine-tunes guardrail models on Multi-turn to Single-turn (M2S) compressed conversations rather than complete dialogue histories. We provide a formal complexity analysis showing that M2S reduces training cost from O ( n 2 ) O(n^{2}) to O ( n ) O(n) for n n -turn conversations. Empirically, on our training dataset (779 samples, avg. 10.6 turns), M2S requires only 169K tokens compared to 15.7M tokens for the multi-turn baseline—a 93 × \times reduction. We evaluate Defensive M2S across three guardrail model families (LlamaGuard, Nemotron, Qwen3Guard) and three compression templates (hyphenize, numberize, pythonize) on SafeDialBench, a comprehensive multi-turn jailbreak benchmark. Our best configuration, Qwen3Guard with hyphenize compression, achieves 93.8% attack detection recall while reducing inference tokens by 94.6% (from 3,231 to 173 tokens per conversation). This represents a 38.9 percentage point improvement over the baseline while dramatically reducing both training and inference costs. Our findings demonstrate that M2S compression can serve as an effective efficiency technique for guardrail deployment, enabling scalable safety screening of long multi-turn conversations. 1 Introduction Large Language Models (LLMs) have demonstrated remarkable capabilities across diverse tasks, but their susceptibility to adversarial attacks remains a critical concern. Among these threats, multi-turn jailbreak attacks represent a particularly insidious category, where adversaries gradually manipulate LLMs through a series of carefully crafted conversational turns to bypass safety guardrails and elicit harmful outputs. Guardrail models serve as a crucial defense mechanism, acting as classifiers that evaluate whether a given input-output pair is safe or unsafe. However, deploying these models for multi-turn conversations presents significant computational challenges: processing full conversation histories requires substantial token throughput, leading to increased latency and cost at inference time. As conversations grow longer, the computational burden scales linearly, making real-time safety screening increasingly expensive. Recent work on Multi-turn to Single-turn (M2S) compression ( 12 ) has shown that multi-turn jailbreak attacks can be distilled into compact single-turn prompts that preserve their adversarial effectiveness. This insight, while concerning from a security perspective, suggests an intriguing defensive application: if the essential semantics of multi-turn attacks can be captured in compressed form, perhaps guardrail models can be trained to recognize these compressed representations directly. In this paper, we propose Defensive M2S , a training paradigm that fine-tunes guardrail models on M2S-compressed conversation histories rather than full multi-turn dialogues. Our key hypothesis is that M2S compression maintains the semantic information necessary for accurate safety classification while dramatically reducing the computational cost of inference. We validate this hypothesis through extensive experiments on three guardrail model families (LlamaGuard, Nemotron, and Qwen3Guard) across multiple M2S compression templates (hyphenize, numberize, pythonize). Our evaluation on SafeDialBench ( 5 ) , a comprehensive multi-turn jailbreak benchmark comprising 2,037 samples across 6 attack categories and 7 attack methods, reveals several key findings: • Efficiency-Accuracy Trade-off : M2S-trained models achieve up to 94.6% token reduction while maintaining competitive detection accuracy. The best configuration (Qwen3Guard with hyphenize template) achieves 93.8% recall compared to 54.9% baseline recall, demonstrating that compression can actually improve detection performance for certain model-template combinations. • Model-Template Sensitivity : The effectiveness of M2S training varies significantly across model-template combinations, with Qwen3Guard favoring hyphenize (93.8% recall) while Nemotron performs best with numberize (87.8% recall). • Single-Template Superiority : Training on a single compression template outperforms mixed-template training, suggesting that template-specific representations provide stronger learning signals than diverse but inconsistent formats. Our contributions can be summarized as follows: 1. We introduce Defensive M2S, a novel training paradigm that leverages adversarial compression techniques for efficient guardrail deployment. 2. We provide formal complexity analysis showing M2S reduces training cost from O(n^{2}) to O(n) , empirically validated with 93 \times token reduction on our dataset. 3. We provide the first systematic evaluation of M2S-trained guardrails across multiple model families, compression templates, and evaluation benchmarks. 4. We release our trained adapters and evaluation code to facilitate reproducible research in efficient LLM safety. 2 Related Work 2.1 Multi-Turn Jailbreak Attacks Multi-turn jailbreak attacks exploit the conversational nature of LLMs to gradually elicit harmful outputs through sequences of seemingly benign prompts. 28 introduce Crescendo, a multi-turn attack that begins innocuously and progressively escalates by referencing model replies, achieving 56% attack success rate (ASR) on GPT-4 and 83% on Gemini-Pro. 26 propose ActorAttack, which models semantically linked entities as attack clues to generate diverse attack paths that conceal malicious intent across conversation turns. Automated red teaming methods have emerged to systematically discover vulnerabilities. GOAT ( 24 ) simulates adversarial user reasoning in multi-turn conversations, achieving 97% ASR on Llama 3.1. TAP ( 23 ) uses tree-of-thought reasoning with attacker-evaluator-target LLM pipelines, achieving 80%+ ASR while bypassing guardrails like LlamaGuard. WildTeaming ( 18 ) mines real user-chatbot interactions to discover 5.7K unique jailbreak tactic clusters. Single-turn attacks provide foundations for understanding adversarial robustness. GCG ( 36 ) pioneered token-level optimization of adversarial suffixes, achieving 88% ASR with cross-model transfer. AutoDAN ( 21 ) uses genetic algorithms to generate semantically meaningful jailbreaks, while PAIR ( 4 ) enables black-box attacks through iterative prompt refinement in under 20 queries. Most relevant to our work, M2S ( 12 ) introduces Multi-turn to Single-turn compression, consolidating multi-turn jailbreaks into structured single-turn prompts using hyphenize, numberize, and pythonize templates. Their work demonstrates that compressed prompts often outperform original multi-turn attacks by up to 17.5% ASR, exploiting “contextual blindness” in both native and external guardrails. We leverage this observation defensively: if M2S compression preserves adversarial semantics, guardrails trained on compressed representations should maintain detection accuracy. 2.2 Guardrail Models LLM-based guardrails have emerged as the dominant paradigm for safety classification. LlamaGuard ( 14 ) pioneered fine-tuning LLMs as input-output safeguards, introducing a six-category safety taxonomy with high adaptability to new policies. Subsequent versions (LlamaGuard 2/3) support the MLCommons taxonomy ( 29 ) . Nemotron Safety Guard ( 9 ) extends this approach with 13 critical risk categories and the “Needs Caution” label for nuanced moderation. Recent work has improved guardrail capabilities across multiple dimensions. WildGuard ( 13 ) achieves three goals simultaneously: identifying malicious prompts, detecting safety risks in responses, and measuring refusal rates, outperforming Llama-Guard2 by 25.3% on refusal detection. ShieldLM ( 34 ) introduces bilingual (Chinese/English) detection with customizable rules and explanations. ShieldGemma ( 32 ) demonstrates superior performance (+10.8% AU-PRC over LlamaGuard) using novel synthetic data generation. Parameter-efficient adaptation has enabled deployment in resource-constrained settings. LoRA-Guard ( 19 ) achieves 100-1000 \times lower parameter overhead through knowledge sharing between LLMs and guardrails. NeMo Guardrails ( 25 ) provides programmable rails for controllable LLM applications. Our work complements these efficiency approaches by reducing input token requirements through M2S compression. 2.3 Multi-Turn Dialogue Safety Evaluating safety in multi-turn contexts presents unique challenges. SafeDialBench ( 5 ) provides 4,053 dialogues across six safety dimensions with seven jailbreak strategies including reference attacks. CoSafe ( 31 ) studies coreference-based attacks, revealing ASR ranging from 14% to 56% across models. GuardBench ( 3 ) consolidates 40 evaluation datasets for systematic guardrail comparison. Several datasets support safety research. BeaverTails ( 15 ) provides