2025-02-19 · 进阶 · 自然语言处理 · 机器学习

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

SafeRoute通过自适应模型选择,在保持准确性的同时提高了大型语言模型安全防护的效率。

更新于 2025-02-19。作者:Seanie Lee、Dong Bok Lee、Dominik Wagner、Minki Kang、Haebin Seong、Tobias Bocklet、Juho Lee、Sung Ju Hwang。

中文摘要

在实际应用中部署大型语言模型(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.

解读

一句话总结

SafeRoute通过自适应模型选择,在保持准确性的同时提高了大型语言模型安全防护的效率。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt