arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.12464cs.CL
收藏

SafeRoute:用于大型语言模型中高效且准确的安全护栏的自适应模型选择

SafeRoute: Adaptive Model Selection for Efficient and Accurate Safety Guardrails in Large Language Models

KAIST(韩国科学技术院);Technische Hochschule Nürnberg Georg Simon Ohm(图林根工业大学诺伊堡分校)

Seanie Lee, Dong Bok Lee, Dominik Wagner, Minki Kang, Haebin Seong, Tobias Bocklet, Juho Lee, Sung Ju Hwang

AI总结:

SafeRoute提出一种二元路由器,区分困难与简单示例,仅对困难示例调用大型安全护栏模型,在保持准确性的同时降低计算成本,显著优化了安全性能与效率的权衡。

摘要:

在真实世界应用中部署大型语言模型(LLMs)需要稳健的安全护栏模型来检测并阻止有害的用户提示。虽然大型安全护栏模型性能强劲,但其计算成本相当高。为缓解这一问题,人们使用较小的蒸馏模型,但这些模型在“困难”示例上往往表现不佳,而大型模型在这些示例上能提供准确预测。我们观察到,许多输入可以由较小模型可靠处理,只有一小部分需要大型模型的能力。受此启发,我们提出SafeRoute,一个区分困难示例与简单示例的二元路由器。我们的方法选择性地将较大的安全护栏模型应用于路由器认为困难的示例,与仅使用大型安全护栏模型相比,在保持准确性的同时提高了效率。在多个基准数据集上的实验结果表明,我们的自适应模型选择显著改善了计算成本与安全性能之间的权衡,优于相关基线方法。

英文摘要:

Deploying large language models (LLMs) in real-world applications requires robust safety guard models to detect and block harmful user prompts. While large safety guard models achieve strong performance, their computational cost is substantial. To mitigate this, smaller distilled models are used, but they often underperform on "hard" examples where the larger model provides accurate predictions. We observe that many inputs can be reliably handled by the smaller model, while only a small fraction require the larger model's capacity. Motivated by this, we propose SafeRoute, a binary router that distinguishes hard examples from easy ones. Our method selectively applies the larger safety guard model to the data that the router considers hard, improving efficiency while maintaining accuracy compared to solely using the larger safety guard model. Experimental results on multiple benchmark datasets demonstrate that our adaptive model selection significantly enhances the trade-off between computational cost and safety performance, outperforming relevant baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑