arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.00991cs.CR
收藏

评估大型语言模型对提示注入攻击抵御能力的新颖评估框架

A Novel Evaluation Framework for Assessing Resilience Against Prompt Injection Attacks in Large Language Models

Daniel Wankit Yip, Aysan Esmradi, Chun Fai Chan

AI总结:

本研究提出一个新颖的评估框架,通过115个精选攻击和基于LLM的可解释评分量化大型语言模型应用对提示注入攻击的抵御能力,实验证明较新模型Llama2比ChatGLM更具鲁棒性。

摘要:

提示注入攻击利用大型语言模型(LLMs)中的漏洞,操纵模型执行非预期操作或生成恶意内容。随着LLM集成应用程序的广泛应用,它们面临对此类攻击日益增长的易感性。本研究引入了一个新颖的评估框架,用于量化应用程序的抵御能力。该框架结合了旨在确保代表性、可解释性和鲁棒性的创新技术。为确保模拟攻击对应用程序的代表性,采用了精心挑选的过程,基于覆盖范围和相关性选出了115个精心挑选的攻击。为增强可解释性,利用第二个LLM评估这些模拟攻击生成的响应。与仅提供置信度分数的传统恶意内容分类器不同,基于LLM的评估产生分数并附带解释,从而增强可解释性。随后,通过为影响更大的攻击分配更高权重来计算抵御能力分数,从而提供对应用程序抵御能力的鲁棒测量。为评估框架的有效性,将其应用于两个LLM,即Llama2和ChatGLM。结果显示,较新的模型Llama2相比ChatGLM展现出更高的抵御能力。这一发现证实了框架的有效性,与较新模型往往具有更强抵御能力的普遍观点一致。此外,该框架展现出卓越的多功能性,仅需极小调整即可适应新兴攻击技术和分类,从而确立其作为有效且实用解决方案的地位。总体而言,该框架提供了宝贵见解,使组织能够做出明智决策,加强其应用程序以抵御提示注入的潜在威胁。

英文摘要:

Prompt injection attacks exploit vulnerabilities in large language models (LLMs) to manipulate the model into unintended actions or generate malicious content. As LLM integrated applications gain wider adoption, they face growing susceptibility to such attacks. This study introduces a novel evaluation framework for quantifying the resilience of applications. The framework incorporates innovative techniques designed to ensure representativeness, interpretability, and robustness. To ensure the representativeness of simulated attacks on the application, a meticulous selection process was employed, resulting in 115 carefully chosen attacks based on coverage and relevance. For enhanced interpretability, a second LLM was utilized to evaluate the responses generated from these simulated attacks. Unlike conventional malicious content classifiers that provide only a confidence score, the LLM-based evaluation produces a score accompanied by an explanation, thereby enhancing interpretability. Subsequently, a resilience score is computed by assigning higher weights to attacks with greater impact, thus providing a robust measurement of the application resilience. To assess the framework's efficacy, it was applied on two LLMs, namely Llama2 and ChatGLM. Results revealed that Llama2, the newer model exhibited higher resilience compared to ChatGLM. This finding substantiates the effectiveness of the framework, aligning with the prevailing notion that newer models tend to possess greater resilience. Moreover, the framework exhibited exceptional versatility, requiring only minimal adjustments to accommodate emerging attack techniques and classifications, thereby establishing itself as an effective and practical solution. Overall, the framework offers valuable insights that empower organizations to make well-informed decisions to fortify their applications against potential threats from prompt injection.

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

↑