X-Boundary: Establishing Exact Safety Boundary to Shield LLMs from Multi-Turn Jailbreaks without Compromising Usability

Xiaoya Lu, Dongrui Liu, Yi Yu, Luxin Xu, Jing Shao · OpenReview

Abstract

Despite the rapid development of safety alignment techniques for LLMs, defending against multi-turn jailbreaks is still a challenging task. In this paper, we conduct a comprehensive comparison, revealing that some existing defense methods can improve the robustness of LLMs against multi-turn jailbreaks but compromise usability, i.e., reducing general capabilities or causing the over-refusal problem. From the perspective of mechanism interpretability of LLMs, we discover that these methods fail to establish a boundary that exactly distinguishes safe and harmful feature representations. Therefore, boundary-safe representations close to harmful representations are inevitably disrupted, leading to a decline in usability. To address this issue, we propose X-Boundary to push harmful representations away from boundary-safe representations and obtain an exact distinction boundary. In this way, harmful representations can be precisely erased without disrupting safe ones. Experimental results show that X-Boundary achieves state-of-the-art defense performance against multi-turn jailbreaks, while reducing the over-refusal rate by about 20% and maintaining nearly complete general capability. Furthermore, we theoretically prove and empirically verify that X-Boundary can accelerate the convergence process during training.

Introduction

As Large Language Models (LLMs) are integrated into real-world applications, "jailbreaking"—using adversarial prompts to bypass safety filters—remains a critical vulnerability. Multi-turn jailbreaks are particularly challenging because they often exploit the model's context to gradually lead it toward harmful outputs. Current defense methods like Supervised Fine-Tuning (SFT) or Gradient Ascent (GA) often act as a "blunt instrument." While they improve safety, they frequently trigger over-refusal: the model begins rejecting harmless queries (e.g., "What are the harmful effects of meth on the body?") simply because they contain sensitive keywords.

Conceptual comparison: Vanilla models are vulnerable to jailbreaks; existing defenses often cause over-refusal by disrupting safe representations; X-Boundary establishes a precise boundary to maintain usability.

Through the lens of mechanism interpretability, researchers discovered that the root cause is an imprecise boundary in the model's internal feature space. Because harmful and "boundary-safe" (harmless but sensitive) representations overlap, standard defenses accidentally erase "good" features along with the "bad," leading to a significant drop in usability and reasoning performance.

The X-Boundary Methodology

The core of X-Boundary is the explicit formulation of a distinction boundary in the representation space. Instead of relying on implicit learning, the framework enforces this boundary using a tripartite loss function:

  1. Erase Loss ($L_e$): Targets harmful representations, forcing them to become orthogonal to their original state, effectively "erasing" harmful knowledge.
  2. Separate Loss ($L_s$): This novel "push" mechanism maximizes the distance between harmful representations and boundary-safe representations, ensuring they do not overlap in the latent space.
  3. Retain Loss ($L_r$): Acts as a regularizer, ensuring that safe representations stay close to their original state to preserve the model’s general intelligence.

Beyond architecture, the paper provides theoretical proof using Optimal Transport theory, demonstrating that by clustering features more effectively, X-Boundary accelerates the convergence process during training by 18–26%.

Experimental Results

The researchers utilized a diverse suite of datasets, including HarmBench and SafeMTData for safety, and MMLU, GSM8K, and HumanEval for general capability. Usability was specifically measured using OR-Bench-80K and XSTest to monitor over-refusal rates.

Key Performance Metrics

  • Robustness: X-Boundary reduced the Attack Success Rate (ASR) of ten different jailbreak attacks by over 70% compared to vanilla models.
  • Usability: It lowered the Over-Refusal Rate (ORR) by approximately 20% compared to other state-of-the-art defense methods like Circuit Breaking (CB).
  • General Capability: While methods like SFT can cause a 20% drop in coding performance, X-Boundary maintained 99% of the model's original reasoning and coding abilities.
Quantitative results showing the trade-off between Attack Success Rate and Over-refusal/General Capability across various defense methods.

Conclusion

X-Boundary demonstrates that the "alignment tax" is not an inevitability. By establishing exact boundaries in the model's representation space, it is possible to shield LLMs from sophisticated multi-turn attacks while maintaining near-perfect usability and general intelligence. This approach is particularly effective for Large Reasoning Models (LRMs), protecting their complex "Chain of Thought" processes without compromising their logical integrity.

Summary updated

BibTeX
@misc{lu2025x,
  author = {Xiaoya Lu and Dongrui Liu and Yi Yu and Luxin Xu and Jing Shao},
  title = {{X-Boundary: Establishing Exact Safety Boundary to Shield LLMs from Multi-Turn Jailbreaks without Compromising Usability}},
  year = {2025},
  eprint = {2502.09990},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.09990},
}
Figure