Skip to main content
QUICK REVIEW

[论文解读] ExpGuard: LLM Content Moderation in Specialized Domains

Minseok Choi, Dong-Jin Kim|arXiv (Cornell University)|Mar 3, 2026
Adversarial Robustness in Machine LearningComputer Science被引用 0
一句话总结

ExpGuard 引入领域感知的护栏与 ExpGuardMix 数据集,覆盖金融、医疗和法律领域;实现了领域安全的领先水平且开源。

ABSTRACT

With the growing deployment of large language models (LLMs) in real-world applications, establishing robust safety guardrails to moderate their inputs and outputs has become essential to ensure adherence to safety policies. Current guardrail models predominantly address general human-LLM interactions, rendering LLMs vulnerable to harmful and adversarial content within domain-specific contexts, particularly those rich in technical jargon and specialized concepts. To address this limitation, we introduce ExpGuard, a robust and specialized guardrail model designed to protect against harmful prompts and responses across financial, medical, and legal domains. In addition, we present ExpGuardMix, a meticulously curated dataset comprising 58,928 labeled prompts paired with corresponding refusal and compliant responses, from these specific sectors. This dataset is divided into two subsets: ExpGuardTrain, for model training, and ExpGuardTest, a high-quality test set annotated by domain experts to evaluate model robustness against technical and domain-specific content. Comprehensive evaluations conducted on ExpGuardTest and eight established public benchmarks reveal that ExpGuard delivers competitive performance across the board while demonstrating exceptional resilience to domain-specific adversarial attacks, surpassing state-of-the-art models such as WildGuard by up to 8.9% in prompt classification and 15.3% in response classification. To encourage further research and development, we open-source our code, data, and model, enabling adaptation to additional domains and supporting the creation of increasingly robust guardrail models.

研究动机与目标

  • 解决高风险领域中通用护栏在专业术语与概念上的安全性差距(金融、医疗、法律)。
  • 创建一个大型、面向领域的安全数据集(ExpGuardMix)及专家标注的基准测试(ExpGuardTest),用于评估护栏。
  • 训练一个专门化的护栏模型(ExpGuard),在领域内容上表现出色并对领域特定的对抗性攻击具备抗性。
  • 在通用安全基准上展示 ExpGuard 的竞争性能,同时在领域特定场景中表现突出。

提出的方法

  • 使用 58,928 条标注提示词(提示-回答对)构建 ExpGuardMix,覆盖金融、医疗和法律领域的领域特定风险。
  • 从维基百科挖掘领域术语,通过 Wikidata 与 GPT-4o 过滤并由三名标注者(多数投票)验证。
  • 利用带有维基百科摘要上下文的 GPT-4o 生成有害与无害的领域特定提示词;结合领域感知的安全检查创建相应的拒绝回答。
  • 用三模型集成(Claude 3.7 Sonnet、Gemini 2.0 Flash、Qwen2.5-Max)对数据进行标注,采用逐步的 Chain-of-Thought 推理并要求对具体有害类别达成共识。
  • 使用句子嵌入模型进行去重以确保多样性;对标注不一致的样本(约 4.8%)予以丢弃。
  • 在多任务设置下训练 ExpGuard,以预测提示词及提示-回答对的安全/非安全。
Figure 1: (a) Illustration of a domain-specific adversarial attack , where ExpGuard successfully identifies and refuses a harmful domain-specific prompt that bypasses existing guardrails. (b) Overview of the ExpGuardMix composition , detailing the distribution of prompt/response types and their allo
Figure 1: (a) Illustration of a domain-specific adversarial attack , where ExpGuard successfully identifies and refuses a harmful domain-specific prompt that bypasses existing guardrails. (b) Overview of the ExpGuardMix composition , detailing the distribution of prompt/response types and their allo

实验结果

研究问题

  • RQ1一个在金融、医疗、法律领域进行训练的领域聚焦护栏能否在领域特定内容与对抗提示上超过通用护栏?
  • RQ2ExpGuard 在通用安全基准上是否保持强劲表现,同时在领域鲁棒性方面具备优势?
  • RQ3领域特定数据(与野外数据或人工撰写数据相比)如何影响领域特定与通用安全性能?
  • RQ4ExpGuard 是否对领域特定的越狱与对抗攻击具鲁棒性,领域对抗性增强(ExpGuard+)是否进一步提升鲁棒性?

主要发现

  • ExpGuard 在 ExpGuardTest 的提示分类 F1 达到 93.3%,在回答分类 F1 达到 92.7%,比 WildGuard 性能最高提升约 8.9% 与 15.3%,分别。
  • 在 ExpGuardTest 中,ExpGuard 的提示 F1:金融 94.1%、医疗 91.2%、法律 94.6%;回答 F1:金融 96.7%、医疗 86.2%、法律 92.4%。
  • ExpGuard 在八个公开安全基准上达到或超过最先进水平,平均提示 F1 为 85.7%(比此前 SOTA 高出 5.3 个点),具备稳健的泛化能力。
  • 消融研究显示领域特定数据至关重要(移除时提示 F1 下降 8.0 点),而野外数据与人工撰写数据对泛化有贡献。
  • ExpGuard+(领域特定对抗增强版本)显著提升在基线上的领域特定越狱提示的鲁棒性。
  • ExpGuard 开源,包含代码、数据与模型,便于扩展到更多领域。
Figure 2: Overview of the ExpGuardMix construction pipeline. The process consists of three main stages: (1) Domain-Specific Terminology Mining, involving term extraction from Wikipedia, followed by filtering using Wikidata, GPT-4o, and human verification; (2) Prompt and Response Construction, where
Figure 2: Overview of the ExpGuardMix construction pipeline. The process consists of three main stages: (1) Domain-Specific Terminology Mining, involving term extraction from Wikipedia, followed by filtering using Wikidata, GPT-4o, and human verification; (2) Prompt and Response Construction, where

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。