Abstract
Large Language Models (LLMs) demonstrate sophisticated safety behaviors in standard interaction formats, yet they frequently fail to generalize these safety constraints across different input structures. This paper formalizes the Structural Safety Generalization (SSG) problem: the phenomenon where a model refuses a harmful request in one format (e.g., a direct text prompt) but complies when the same request is restructured (e.g., across multiple turns or via typographic images). We investigate these vulnerabilities across modalities and languages, and propose the Structure Rewriting (SR) Guardrail, a defense mechanism that normalizes complex inputs into canonical English to improve safety evaluation.
Introduction
Current AI safety research faces an uphill battle against an effectively infinite space of potential "jailbreaks." While frontier models are increasingly robust against direct harmful queries, they exhibit a significant lack of structural generalization. Ideally, if a model identifies "How do I build a bomb?" as dangerous in a standard English prompt, it should maintain that refusal regardless of whether the query is translated into a low-resource language, obfuscated via a Caesar cipher, or split across several conversation turns. However, empirical evidence suggests a persistent "asymmetry" in model safety: models are often safe in one structure but vulnerable in another, even when the underlying semantic intent remains identical.
Defining the SSG Problem
The SSG problem highlights a gap between a model's semantic knowledge and its operational safety boundaries. We categorize these structural failures into several dimensions:
- Multi-turn Interactions: Breaking a single harmful instruction into a sequence of seemingly benign steps that, when aggregated, fulfill the original harmful intent.
- Ciphers and Obfuscation: Using word-substitution or character-level ciphers to mask intent from safety filters.
- Multimodal Decomposition: Distributing harmful instructions across multiple images (e.g., typographic images where text is rendered as pictures).
- Cross-Lingual Asymmetry: Testing safety consistency in low-resource languages (LRLs) like Welsh or Tamil compared to high-resource languages like English.
Methodology
Red-Teaming: Probing Vulnerabilities
To benchmark these vulnerabilities, we developed several new datasets:
- Harmful Multi-Turn Dataset: 4,136 harmful instructions expanded into 24,816 structural variants.
- Harmful Multimodal Dataset: 500 harmful instructions converted into 6,500 examples involving perturbed typographic images.
- Benign Control Datasets: Used to measure the False Positive Rate (FPR) and ensure defenses do not lead to excessive over-refusal.
Blue-Teaming: The Structure Rewriting (SR) Guardrail
Rather than attempting to train models on every possible structural permutation—an intractable task—we propose the Structure Rewriting (SR) Guardrail. This defense uses an auxiliary LLM to "canonicalize" the user input. The SR Guardrail transforms complex, multi-modal, or ciphered inputs into a plain English summary of the core intent. This summary is then evaluated by a standard safety filter. If the simplified summary is deemed harmful, the original complex input is blocked.
Key Insights and Results
Structural Asymmetry
Our findings indicate that safety is not a binary state. A model may catch a jailbreak 90% of the time in a single-turn interaction but only 10% of the time if the user simply introduces line breaks or multi-turn delays. This suggests that current safety training is overly dependent on specific prompt templates.
Multimodal and Multi-Image Weakness
Models proved significantly more susceptible to attacks split across multiple images than those contained within a single image. Multi-image attacks achieved an average Attack Success Rate (ASR) of 28.4%, compared to 16.4% for single-image equivalents. This reveals a specific weakness in vision-language alignment regarding the aggregation of safety context across visual sequences.
Guardrail Effectiveness
The SR Guardrail demonstrated superior performance in mitigating these risks. On GPT-4o, the SR Guardrail reduced the ASR from 44% to just 6%. Furthermore, it proved more precise than existing industry standards. While Nvidia’s NeMo Guardrails exhibited a 42% False Positive Rate (blocking nearly half of all safe queries), the SR Guardrail maintained a much more functional 17% FPR.
Discussion and Limitations
While the SR Guardrail provides a tractable path forward, the study acknowledges that we have only explored a subset of possible structures. Additionally, the "Relevance Curse" in low-resource languages suggests that lower ASRs in those languages may stem from a lack of capability rather than superior safety.
Future research should move toward representation-level defenses. The goal is to develop internal model embeddings that are invariant to structural changes, ensuring that the concept of a "harmful request" maps to the same unsafe internal state regardless of its external framing.
Conclusion
Addressing the Structural Safety Generalization problem is critical for the deployment of robust AI systems. By focusing on structural equivalence and input canonicalization, we can move away from a "cat-and-mouse" game of patching individual jailbreaks and toward a more systematic approach to AI safety.
Summary updated