MoGU:一种在保持开源大语言模型可用性的同时增强其安全性的框架
MoGU: A Framework for Enhancing Safety of Open-Sourced LLMs While Preserving Their Usability
AI总结:
针对现有防御策略使大语言模型过度拒绝而损害可用性的问题,提出MoGU框架,通过将模型分为可用与安全两个变体并动态路由权重,在保证安全的同时维持良性指令的响应质量,并在多个开源模型上验证了优越性。
摘要:
大语言模型(LLMs)正越来越多地部署在各种应用中。随着其使用量的增长,人们对其安全性的担忧也在上升,尤其是在面对恶意指令时保持无害响应方面。许多防御策略已被开发出来以增强LLMs的安全性。然而,我们的研究发现,现有的防御策略导致LLMs主要采取拒绝导向的立场,从而削弱了它们对良性指令响应的可用性。为解决这一问题,我们引入了MoGU框架,旨在增强LLMs的安全性同时保持其可用性。我们的MoGU框架将基础LLM转化为两个变体:可用LLM和安全LLM,并进一步采用动态路由来平衡它们的贡献。当遇到恶意指令时,路由器将为安全LLM分配更高的权重以确保响应无害。相反,对于良性指令,路由器优先考虑可用LLM,从而促进可用且有用的响应。在各种开源LLMs上,我们比较了多种防御策略以验证我们MoGU框架的优越性。此外,我们的分析提供了关于MoGU有效性的关键见解,并验证了我们设计的路由机制能够通过分配权重有效平衡每个变体的贡献。我们的工作发布了更安全的Llama2、Vicuna、Falcon、Dolphin和Baichuan2。
英文摘要:
Large Language Models (LLMs) are increasingly deployed in various applications. As their usage grows, concerns regarding their safety are rising, especially in maintaining harmless responses when faced with malicious instructions. Many defense strategies have been developed to enhance the safety of LLMs. However, our research finds that existing defense strategies lead LLMs to predominantly adopt a rejection-oriented stance, thereby diminishing the usability of their responses to benign instructions. To solve this problem, we introduce the MoGU framework, designed to enhance LLMs' safety while preserving their usability. Our MoGU framework transforms the base LLM into two variants: the usable LLM and the safe LLM, and further employs dynamic routing to balance their contribution. When encountering malicious instructions, the router will assign a higher weight to the safe LLM to ensure that responses are harmless. Conversely, for benign instructions, the router prioritizes the usable LLM, facilitating usable and helpful responses. On various open-sourced LLMs, we compare multiple defense strategies to verify the superiority of our MoGU framework. Besides, our analysis provides key insights into the effectiveness of MoGU and verifies that our designed routing mechanism can effectively balance the contribution of each variant by assigning weights. Our work released the safer Llama2, Vicuna, Falcon, Dolphin, and Baichuan2.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。