arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.17915cs.CRcs.AI
收藏

函数调用的黑暗面:越狱大型语言模型的途径

The Dark Side of Function Calling: Pathways to Jailbreaking Large Language Models

School of Computer Science and Technology, Xidian University(西安电子科技大学计算机科学与技术学院)

Zihui Wu, Haichang Gao, Jianping He, Ping Wang

AI总结:

本文揭示了LLMs函数调用功能的安全漏洞,提出“越狱函数”攻击方法,在六个主流模型上平均成功率达90%以上,并提出防御性提示等防御策略。

摘要:

大型语言模型(LLMs)展现出了卓越的能力,但其强大的力量也伴随着重大的安全考量。尽管已对LLMs在聊天模式下的安全性进行了广泛研究,但其函数调用功能的安全影响却在很大程度上被忽视。本文揭示了LLMs函数调用过程中的一个关键漏洞,提出了一种新颖的“越狱函数”攻击方法,该方法利用了对齐差异、用户胁迫以及缺乏严格安全过滤器的问题。我们在包括GPT-4o、Claude-3.5-Sonnet和Gemini-1.5-pro在内的六个最先进的LLMs上进行了实证研究,结果显示该攻击的平均成功率令人震惊,超过90%。我们全面分析了函数调用为何容易受到此类攻击,并提出了包括使用防御性提示在内的防御策略。我们的发现突显了在LLMs的函数调用能力中加强安全措施的迫切需求,通过识别以前未探索的风险、设计有效的攻击方法并提出实用的防御措施,为AI安全领域做出了贡献。

英文摘要:

Large language models (LLMs) have demonstrated remarkable capabilities, but their power comes with significant security considerations. While extensive research has been conducted on the safety of LLMs in chat mode, the security implications of their function calling feature have been largely overlooked. This paper uncovers a critical vulnerability in the function calling process of LLMs, introducing a novel "jailbreak function" attack method that exploits alignment discrepancies, user coercion, and the absence of rigorous safety filters. Our empirical study, conducted on six state-of-the-art LLMs including GPT-4o, Claude-3.5-Sonnet, and Gemini-1.5-pro, reveals an alarming average success rate of over 90\% for this attack. We provide a comprehensive analysis of why function calls are susceptible to such attacks and propose defensive strategies, including the use of defensive prompts. Our findings highlight the urgent need for enhanced security measures in the function calling capabilities of LLMs, contributing to the field of AI safety by identifying a previously unexplored risk, designing an effective attack method, and suggesting practical defensive measures. Our code is available at https://github.com/wooozihui/jailbreakfunction.

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

↑