arXiv:2509.14622cs.CRcs.AI2025-09

用对抗性训练和知识蒸馏提升大模型恶意意图检测的实时性能。

Adversarial Distilled Retrieval-Augmented Guarding Model for Online Malicious Intent Detection

  • 两阶段框架:教师模型学对抗鲁棒决策,学生模型轻量化推理。
  • 149M参数模型达野生防护基准98.5%性能,较GPT-4高3.3%。
  • 支持在线更新知识库,每秒处理300查询,延迟降低5.6倍。

随着大型语言模型在交互式应用中的部署,线上恶意意图检测日益重要。现有方法难以实时应对多样复杂的用户查询。为此,我们提出ADRAG(对抗性蒸馏检索增强防护模型),一种两阶段框架,实现高效且鲁棒的在线恶意意图检测。训练阶段,高容量教师模型在对抗扰动与检索增强输入上训练,学习覆盖复杂查询的鲁棒决策边界;推理阶段,通过蒸馏调度器将教师知识转移至紧凑学生模型,并结合持续更新的在线知识库。部署时,学生模型从在线更新的知识库中检索前K个相似安全样本,实现在线实时检测。在十个安全基准上的评估表明,仅149M参数的ADRAG达到WildGuard-7B的98.5%性能,相较GPT-4在分布外检测上提升3.3%,优于Llama-Guard-3-8B 9.5%,同时在实时应用中实现高达300 QPS的吞吐量,延迟降低5.6倍。

原文摘要 · Abstract (English)

With the deployment of Large Language Models (LLMs) in interactive applications, online malicious intent detection has become increasingly critical. However, existing approaches fall short of handling diverse and complex user queries in real time. To address these challenges, we introduce ADRAG (Adversarial Distilled Retrieval-Augmented Guard), a two-stage framework for robust and efficient online malicious intent detection. In the training stage, a high-capacity teacher model is trained on adversarially perturbed, retrieval-augmented inputs to learn robust decision boundaries over diverse and complex user queries. In the inference stage, a distillation scheduler transfers the teacher's knowledge into a compact student model, with a continually updated knowledge base collected online. At deployment, the compact student model leverages top-K similar safety exemplars retrieved from the online-updated knowledge base to enable both online and real-time malicious query detection. Evaluations across ten safety benchmarks demonstrate that ADRAG, with a 149M-parameter model, achieves 98.5% of WildGuard-7B's performance, surpasses GPT-4 by 3.3% and Llama-Guard-3-8B by 9.5% on out-of-distribution detection, while simultaneously delivering up to 5.6x lower latency at 300 queries per second (QPS) in real-time applications.

恶意检测知识蒸馏实时推理

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