三思而后行:利用GuidelineLLM增强对有害内容的关注与警惕
Look Before You Leap: Enhancing Attention and Vigilance Regarding Harmful Content with GuidelineLLM
AI总结:
针对LLM易受越狱攻击的问题,提出GuidelineLLM防御范式,在LLM响应前识别有害查询风险并提供指南,无需微调LLM本身,显著降低攻击成功率(平均降34.17%)且保持良性查询处理能力。
摘要:
尽管大型语言模型(LLMs)配备了对齐机制,但它们在面对新兴越狱攻击时愈发脆弱,这些攻击可能破坏其对齐机制,给实际应用带来重大风险。现有工作在训练效率和泛化能力方面均面临挑战(如基于人类反馈的强化学习和红队测试)。开发有效策略让LLMs抵御持续演变的越狱尝试是一项重大挑战。为应对这一挑战,我们提出了一种名为GuidelineLLM的新型防御范式,协助LLMs识别可能包含有害内容的查询。在LLMs响应查询前,GuidelineLLM先识别查询的潜在风险,将这些风险总结为指南建议,再将指南提供给响应的LLMs。重要的是,该方法无需对LLMs本身进行额外的安全微调,仅需微调GuidelineLLM,这增强了其在不同LLMs上的通用性。实验结果表明,GuidelineLLM能显著降低LLM的攻击成功率(平均降低34.17%),同时保持LLM处理良性查询的有效性。代码可在https://github.com/sqzhang-lazy/GuidelineLLM获取。
英文摘要:
Despite being empowered with alignment mechanisms, large language models (LLMs) are increasingly vulnerable to emerging jailbreak attacks that can compromise their alignment mechanisms. This vulnerability poses significant risks to real-world applications. Existing work faces challenges in both training efficiency and generalization capabilities (i.e., Reinforcement Learning from Human Feedback and Red-Teaming). Developing effective strategies to enable LLMs to resist continuously evolving jailbreak attempts represents a significant challenge. To address this challenge, we propose a novel defensive paradigm called GuidelineLLM, which assists LLMs in recognizing queries that may have harmful content. Before LLMs respond to a query, GuidelineLLM first identifies potential risks associated with the query, summarizes these risks into guideline suggestions, and then feeds these guidelines to the responding LLMs. Importantly, our approach eliminates the necessity for additional safety fine-tuning of the LLMs themselves; only the GuidelineLLM requires fine-tuning. This characteristic enhances the general applicability of GuidelineLLM across various LLMs. Experimental results demonstrate that GuidelineLLM can significantly reduce the attack success rate (ASR) against LLM (an average reduction of 34.17\% ASR) while maintaining the usefulness of LLM in handling benign queries. The code is available at https://github.com/sqzhang-lazy/GuidelineLLM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。