arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.08660cs.CRcs.AI
收藏

RePD:通过基于检索的提示分解过程防御越狱攻击

RePD: Defending Jailbreak Attack through a Retrieval-based Prompt Decomposition Process

Tsinghua University(清华大学);University of Wisconsin–Madison(威斯康星大学麦迪逊分校)

Peiran Wang, Xiaogeng Liu, Chaowei Xiao

AI总结:

针对大型语言模型易受越狱攻击的问题,提出基于检索提示分解的RePD框架,通过单样本学习利用越狱模板库分解恶意组件,提升LLMs抗攻击能力且不影响常规响应性能。

摘要:

本研究提出RePD,一种创新的基于检索的提示分解(Retrieval-based Prompt Decomposition)框架,旨在降低大型语言模型(LLMs)遭受越狱攻击的风险。尽管LLMs经过严格的预训练和微调以实现伦理对齐,但仍易受越狱漏洞利用。RePD采用单样本学习(one-shot learning)模式,通过访问预先收集的越狱提示模板数据库,识别并分解用户提示中嵌入的有害查询。该过程将越狱提示分解与用户原始查询整合为单样本学习示例,有效引导LLMs识别并分离恶意组件。因此,LLMs能够先中和潜在有害元素,再按照伦理准则响应用户提示。RePD具有通用性,可兼容多种开源LLMs智能体。通过对有害和良性提示的全面实验,我们证明RePD能提升LLMs抗越狱攻击能力,且不影响其对常规用户请求的响应性能。

英文摘要:

In this study, we introduce RePD, an innovative attack Retrieval-based Prompt Decomposition framework designed to mitigate the risk of jailbreak attacks on large language models (LLMs). Despite rigorous pretraining and finetuning focused on ethical alignment, LLMs are still susceptible to jailbreak exploits. RePD operates on a one-shot learning model, wherein it accesses a database of pre-collected jailbreak prompt templates to identify and decompose harmful inquiries embedded within user prompts. This process involves integrating the decomposition of the jailbreak prompt into the user's original query into a one-shot learning example to effectively teach the LLM to discern and separate malicious components. Consequently, the LLM is equipped to first neutralize any potentially harmful elements before addressing the user's prompt in a manner that aligns with its ethical guidelines. RePD is versatile and compatible with a variety of open-source LLMs acting as agents. Through comprehensive experimentation with both harmful and benign prompts, we have demonstrated the efficacy of our proposed RePD in enhancing the resilience of LLMs against jailbreak attacks, without compromising their performance in responding to typical user requests.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑