Recent advancements in LLMs have led to significant breakthroughs in various AI applications. However, their sophisticated capabilities also introduce severe safety concerns, particularly the generation of harmful content through jailbreak attacks. Current safety testing for LLMs often relies on static datasets and lacks systematic criteria to evaluate the quality and adequacy of these tests. While coverage criteria have been effective for smaller neural networks, they are not directly applicable to LLMs due to scalability issues and differing objectives. To address these challenges, this paper introduces RACA, a novel set of coverage criteria specifically designed for LLM safety testing. RACA leverages representation engineering to focus on safety-critical concepts within LLMs, thereby reducing dimensionality and filtering out irrelevant information. The framework operates in three stages: first, it identifies safety-critical representations using a small, expert-curated calibration set of jailbreak prompts. Second, it calculates conceptual activation scores for a given test suite based on these representations. Finally, it computes coverage results using six sub-criteria that assess both individual and compositional safety concepts. We conduct comprehensive experiments to validate RACA's effectiveness, applicability, and generalization, where the results demonstrate that RACA successfully identifies high-quality jailbreak prompts and is superior to traditional neuron-level criteria. We also showcase its practical application in real-world scenarios, such as test set prioritization and attack prompt sampling. Furthermore, our findings confirm RACA's generalization to various scenarios and its robustness across various configurations. Overall, RACA provides a new framework for evaluating the safety of LLMs, contributing a valuable technique to the field of testing for AI.


翻译:近年来,大语言模型(LLMs)的进展已在各类人工智能应用中取得重大突破。然而,其复杂的能力也引发了严重的安全担忧,尤其是通过越狱攻击生成有害内容的问题。当前针对LLMs的安全测试通常依赖于静态数据集,且缺乏系统性的准则来评估这些测试的质量与充分性。尽管覆盖准则在较小的神经网络上已被证明有效,但由于可扩展性问题及目标差异,它们无法直接适用于LLMs。为应对这些挑战,本文提出了RACA,一套专为LLM安全测试设计的新型覆盖准则。RACA利用表征工程技术,聚焦于LLMs内部与安全关键相关的概念,从而降低维度并过滤无关信息。该框架包含三个阶段:首先,它使用一个由专家精心构建的小规模越狱提示校准集,识别出安全关键的表征;其次,基于这些表征为给定的测试套件计算概念激活分数;最后,通过六个子准则计算覆盖结果,这些子准则分别评估个体安全概念及组合安全概念。我们进行了全面的实验以验证RACA的有效性、适用性与泛化能力,结果表明RACA能成功识别高质量的越狱提示,且优于传统的神经元级准则。我们还展示了其在真实场景中的实际应用,例如测试集优先级排序与攻击提示采样。此外,我们的研究结果证实了RACA在不同场景下的泛化能力及其在各种配置下的鲁棒性。总体而言,RACA为评估LLMs的安全性提供了一个新框架,为人工智能测试领域贡献了一项有价值的技术。

0
下载
关闭预览

相关内容

综述:面向移动端大语言模型的隐私与安全
专知会员服务
19+阅读 · 2025年9月7日
158页!天大等最新《大型语言模型安全:全面综述》
专知会员服务
49+阅读 · 2024年12月24日
【新书】大规模语言模型的隐私与安全,
专知会员服务
29+阅读 · 2024年12月4日
大语言模型安全开发者手册:构建安全的 AI 应用程序
专知会员服务
34+阅读 · 2024年9月29日
生成式人工智能大型语言模型的安全性:概述
专知会员服务
35+阅读 · 2024年7月30日
大型语言模型网络安全综述
专知会员服务
67+阅读 · 2024年5月12日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
用Rasa NLU构建自己的中文NLU系统
待字闺中
18+阅读 · 2017年9月18日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员