Breaking Bad Tokens: Detoxification of LLMs Using Sparse Autoencoders

要約

大規模な言語モデル(LLM)は、ユーザー向けアプリケーションで遍在していますが、冒とく、下品、軽rog的な発言など、望ましくない有毒な出力を生成します。
多数の解毒方法が存在しますが、ほとんどが広範な表面レベルの修正を適用するため、脱獄攻撃によって簡単に回避できます。
このホワイトペーパーでは、スパース自動エンコーダー(SAE)を活用して、モデルの残留ストリームの毒性関連方向を特定し、対応するデコーダーベクトルを使用して標的アクティブ化ステアリングを実行します。
3層のステアリング攻撃性を導入し、GPT-2 SmallおよびGemma-2-2Bでそれらを評価し、毒性の低下と言語流ency性とのトレードオフを明らかにします。
より強い操縦強度では、これらの因果的介入は、攻撃性に応じてGPT-2の小規模で顕著に低下する可能性がありますが、毒性を最大20%減らす際の競合ベースラインを上回ります。
重要なことに、ステアリング時の標準のNLPベンチマークスコアは安定したままであり、モデルの知識と一般的な能力が保存されていることを示しています。
さらに、より広いSAESの機能分割が安全性の介入を妨げ、デンタングされた機能学習の重要性を強調していることを示しています。
私たちの調査結果は、LLM解毒のためのSAEベースの因果介入の約束と現在の制限の両方を強調しており、より安全な言語モデルの展開に関する実用的なガイドラインをさらに示唆しています。

要約(オリジナル)

Large language models (LLMs) are now ubiquitous in user-facing applications, yet they still generate undesirable toxic outputs, including profanity, vulgarity, and derogatory remarks. Although numerous detoxification methods exist, most apply broad, surface-level fixes and can therefore easily be circumvented by jailbreak attacks. In this paper we leverage sparse autoencoders (SAEs) to identify toxicity-related directions in the residual stream of models and perform targeted activation steering using the corresponding decoder vectors. We introduce three tiers of steering aggressiveness and evaluate them on GPT-2 Small and Gemma-2-2B, revealing trade-offs between toxicity reduction and language fluency. At stronger steering strengths, these causal interventions surpass competitive baselines in reducing toxicity by up to 20%, though fluency can degrade noticeably on GPT-2 Small depending on the aggressiveness. Crucially, standard NLP benchmark scores upon steering remain stable, indicating that the model’s knowledge and general abilities are preserved. We further show that feature-splitting in wider SAEs hampers safety interventions, underscoring the importance of disentangled feature learning. Our findings highlight both the promise and the current limitations of SAE-based causal interventions for LLM detoxification, further suggesting practical guidelines for safer language-model deployment.

arxiv情報

著者 Agam Goyal,Vedant Rathi,William Yeh,Yian Wang,Yuen Chen,Hari Sundaram
発行日 2025-05-20 15:55:31+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク