PrimeGuard:チューニング不要なルーティングによる安全で有用な大規模言語モデル
PrimeGuard: Safe and Helpful LLMs through Tuning-Free Routing
July 23, 2024
著者: Blazej Manczak, Eliott Zemour, Eric Lin, Vaikkunth Mugunthan
cs.AI
要旨
言語モデル(LM)を展開する際には、出力が高品質であると同時に安全ガイドラインに準拠していることが必要です。推論時ガードレール(ITG)は、モデルの出力分布を準拠方向にシフトさせる解決策を提供しますが、現在の手法は安全性と有用性のバランスを取るのに苦労していることがわかりました。非準拠クエリを安全に対処するITG手法は有用性が低く、有用性を優先する手法は安全性を犠牲にしています。私たちはこのトレードオフを、アライメント税に類似した「ガードレール税」と呼びます。この問題に対処するため、構造化された制御フローを利用する新しいITG手法であるPrimeGuardを提案します。
PrimeGuardは、LMの自己インスタンス化を異なる指示でルーティングし、その内在的な指示追従能力と文脈内学習を活用します。私たちのチューニング不要なアプローチは、各クエリに対してシステム設計者のガイドラインを動的にコンパイルします。また、多様なレッドチーム安全ベンチマークであるsafe-evalを構築し公開しました。広範な評価により、PrimeGuardはチューニングなしで、(1) 反復的なジェイルブレイク攻撃に対する耐性を大幅に向上させ、(2) 安全ガードレールにおいて最先端の結果を達成し、(3) アライメントチューニングされたモデルの有用性スコアに匹敵することを示しています。広範な評価により、PrimeGuardはチューニングなしで、すべての競合ベースラインを上回り、安全な応答の割合を61%から97%に向上させ、最大モデルでの平均有用性スコアを4.17から4.29に増加させ、攻撃成功率を100%から8%に削減することで、ガードレール税を克服することが示されました。
PrimeGuardの実装はhttps://github.com/dynamofl/PrimeGuardで、safe-evalデータセットはhttps://huggingface.co/datasets/dynamoai/safe_evalで公開されています。
English
Deploying language models (LMs) necessitates outputs to be both high-quality
and compliant with safety guidelines. Although Inference-Time Guardrails (ITG)
offer solutions that shift model output distributions towards compliance, we
find that current methods struggle in balancing safety with helpfulness. ITG
Methods that safely address non-compliant queries exhibit lower helpfulness
while those that prioritize helpfulness compromise on safety. We refer to this
trade-off as the guardrail tax, analogous to the alignment tax. To address
this, we propose PrimeGuard, a novel ITG method that utilizes structured
control flow.
PrimeGuard routes requests to different self-instantiations of the LM with
varying instructions, leveraging its inherent instruction-following
capabilities and in-context learning. Our tuning-free approach dynamically
compiles system-designer guidelines for each query. We construct and release
safe-eval, a diverse red-team safety benchmark. Extensive evaluations
demonstrate that PrimeGuard, without fine-tuning, overcomes the guardrail tax
by (1) significantly increasing resistance to iterative jailbreak attacks and
(2) achieving state-of-the-art results in safety guardrailing while (3)
matching helpfulness scores of alignment-tuned models. Extensive evaluations
demonstrate that PrimeGuard, without fine-tuning, outperforms all competing
baselines and overcomes the guardrail tax by improving the fraction of safe
responses from 61% to 97% and increasing average helpfulness scores from 4.17
to 4.29 on the largest models, while reducing attack success rate from 100% to
8%.
PrimeGuard implementation is available at
https://github.com/dynamofl/PrimeGuard and safe-eval dataset is available at
https://huggingface.co/datasets/dynamoai/safe_eval.Summary
AI-Generated Summary