arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2408.15207cs.SE
收藏

理解大型语言模型覆盖率准则的有效性:来自越狱攻击的特殊视角

Understanding the Effectiveness of Coverage Criteria for Large Language Models: A Special Angle from Jailbreak Attacks

Shide Zhou, Tianlin Li, Kailong Wang, Yihao Huang, Ling Shi, Yang Liu, Haoyu Wang

AI总结:

本文从越狱攻击视角评估传统覆盖率准则在LLM安全测试中的有效性,发现神经元覆盖率能区分正常与越狱查询,并据此提出实时检测、测试用例优先级排序及覆盖率引导的攻击样本生成三种应用,显著提升模型安全性。

摘要:

大型语言模型(LLMs)彻底改变了人工智能,但其在关键领域日益广泛的部署引发了对其在面临恶意攻击时出现异常行为的担忧。这种脆弱性警示了发布前测试普遍存在的不足。本文开展了一项全面的实证研究,以越狱攻击这一重大安全隐患为例,评估传统覆盖率准则在识别此类不足方面的有效性。研究首先对LLMs的隐藏状态进行聚类分析,发现嵌入特征能有效区分不同的查询类型。随后,我们从准则层级、层级和token级别三个关键维度系统评估了这些准则的性能。研究发现,当LLMs处理正常查询与越狱查询时,神经元覆盖率存在显著差异,这与聚类实验结果一致。基于这些发现,我们提出了覆盖率准则在LLM安全测试中的三种实际应用。具体而言,我们开发了一种实时越狱检测机制,在将查询分类为正常或越狱时实现了高准确率(平均93.61%)。此外,我们探索利用覆盖率水平来优先处理测试用例,通过聚焦高风险交互并移除冗余测试来提高测试效率。最后,我们引入了一种覆盖率引导的方法来生成越狱攻击样本,从而能够系统地优化提示以发现漏洞。本研究提升了我们对LLM安全测试的理解,增强了其安全性,并为开发更稳健的AI应用奠定了基础。

英文摘要:

Large language models (LLMs) have revolutionized artificial intelligence, but their increasing deployment across critical domains has raised concerns about their abnormal behaviors when faced with malicious attacks. Such vulnerability alerts the widespread inadequacy of pre-release testing. In this paper, we conduct a comprehensive empirical study to evaluate the effectiveness of traditional coverage criteria in identifying such inadequacies, exemplified by the significant security concern of jailbreak attacks. Our study begins with a clustering analysis of the hidden states of LLMs, revealing that the embedded characteristics effectively distinguish between different query types. We then systematically evaluate the performance of these criteria across three key dimensions: criterion level, layer level, and token level. Our research uncovers significant differences in neuron coverage when LLMs process normal versus jailbreak queries, aligning with our clustering experiments. Leveraging these findings, we propose three practical applications of coverage criteria in the context of LLM security testing. Specifically, we develop a real-time jailbreak detection mechanism that achieves high accuracy (93.61% on average) in classifying queries as normal or jailbreak. Furthermore, we explore the use of coverage levels to prioritize test cases, improving testing efficiency by focusing on high-risk interactions and removing redundant tests. Lastly, we introduce a coverage-guided approach for generating jailbreak attack examples, enabling systematic refinement of prompts to uncover vulnerabilities. This study improves our understanding of LLM security testing, enhances their safety, and provides a foundation for developing more robust AI applications.

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

↑