无副作用引导:改进语言模型的部署后控制
Steering Without Side Effects: Improving Post-Deployment Control of Language Models
AI总结:
针对语言模型部署后引导方法易产生副作用的问题,提出KL-then-steer技术,通过先在良性输入上最小化引导前后模型的KL散度再引导,在保留越狱防御等引导效果的同时降低性能损耗。
摘要:
语言模型(LM)在部署后会表现出意外行为。例如,尽管开发者开展了大量红队测试和对抗训练,新的越狱攻击仍不断出现,导致模型被滥用。鉴于大多数模型查询是无问题的,且频繁重训练会导致不稳定的用户体验,缓解最坏情况行为的方法应当具备针对性。其中一种方法是将输入分类为潜在有问题的,然后对这些有问题的输入选择性应用引导向量,即向模型隐藏状态添加特定向量。然而,引导向量也可能对模型性能产生负面影响,这在分类器判断错误的情况下会成为问题。我们提出KL-then-steer(KTS,先KL散度优化再引导)技术,通过首先训练模型,使其在良性输入上最小化被引导模型与未被引导模型之间的Kullback-Leibler(KL)散度,再对经过该训练的模型进行引导,从而在保留引导优势的同时减少其副作用。我们的最优方法相比原始Llama-2-chat-7B模型,可抵御44%的越狱攻击,同时在良性请求上的有用性(由MT-Bench衡量)几乎与原始LM持平。为了证明我们的方法在越狱场景之外的通用性和可迁移性,我们展示了KTS模型可被引导,以减少其在TruthfulQA上对用户建议答案的偏见。代码可在以下链接获取:https://github.com/AsaCooperStickland/kl-then-steer。
英文摘要:
Language models (LMs) have been shown to behave unexpectedly post-deployment. For example, new jailbreaks continually arise, allowing model misuse, despite extensive red-teaming and adversarial training from developers. Given most model queries are unproblematic and frequent retraining results in unstable user experience, methods for mitigation of worst-case behavior should be targeted. One such method is classifying inputs as potentially problematic, then selectively applying steering vectors on these problematic inputs, i.e. adding particular vectors to model hidden states. However, steering vectors can also negatively affect model performance, which will be an issue on cases where the classifier was incorrect. We present KL-then-steer (KTS), a technique that decreases the side effects of steering while retaining its benefits, by first training a model to minimize Kullback-Leibler (KL) divergence between a steered and unsteered model on benign inputs, then steering the model that has undergone this training. Our best method prevents 44% of jailbreak attacks compared to the original Llama-2-chat-7B model while maintaining helpfulness (as measured by MT-Bench) on benign requests almost on par with the original LM. To demonstrate the generality and transferability of our method beyond jailbreaks, we show that our KTS model can be steered to reduce bias towards user-suggested answers on TruthfulQA. Code is available: https://github.com/AsaCooperStickland/kl-then-steer.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。