arXiv:2504.15241cs.CL2025-04EMNLP被引 9

多语言大模型安全防护新方案,能识别跨语言恶意指令并解释原因。

MrGuard: A Multilingual Reasoning Guardrail for Universal LLM Safety

  • 通过生成文化语言多样性的合成数据,提升多语言安全检测能力。
  • 在多种语言上比现有方法高出15%以上准确率,且对混杂语言有效。
  • 可生成推理解释,帮助理解不同语言中的风险差异,适合内容审核场景。

大语言模型易受越狱攻击,诱发有害行为,这一问题在多语言环境下尤为突出,因多语言安全对齐数据有限。为此,本文提出多语言推理型安全防护机制MrGuard,包含三部分:(1) 融合文化与语言细微差异的合成多语言数据生成;(2) 监督微调;(3) 基于课程学习的组相对策略优化(GRPO)框架。实验表明,MrGuard在域内与域外语言上均显著优于近期基线,性能提升超15%。此外,其在代码切换、低资源语言干扰等复杂情境下仍保持安全判断一致性。该防护机制具备多语言推理能力,可生成解释,有助于识别语言特异性风险与模糊性,在多语言内容审核中具有实用价值。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are susceptible to adversarial attacks such as jailbreaking, which can elicit harmful or unsafe behaviors. This vulnerability is exacerbated in multilingual settings, where multilingual safety-aligned data is often limited. Thus, developing a guardrail capable of detecting and filtering unsafe content across diverse languages is critical for deploying LLMs in real-world applications. In this work, we introduce a multilingual guardrail with reasoning for prompt classification. Our method consists of: (1) synthetic multilingual data generation incorporating culturally and linguistically nuanced variants, (2) supervised fine-tuning, and (3) a curriculum-based Group Relative Policy Optimization (GRPO) framework that further improves performance. Experimental results demonstrate that our multilingual guardrail, MrGuard, consistently outperforms recent baselines across both in-domain and out-of-domain languages by more than 15%. We also evaluate MrGuard's robustness to multilingual variations, such as code-switching and low-resource language distractors in the prompt, and demonstrate that it preserves safety judgments under these challenging conditions. The multilingual reasoning capability of our guardrail enables it to generate explanations, which are particularly useful for understanding language-specific risks and ambiguities in multilingual content moderation.

大模型安全多语言内容审核推理解释

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。