Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game
作者: Sam Toyer, Olivia Watkins, Ethan Adrian Mendes, Justin Svegliato, Luke Bailey, Tiffany Wang, Isaac Ong, Karim Elmaaroufi, Pieter Abbeel, Trevor Darrell, Alan Ritter, Stuart Russell
分类: cs.LG, cs.CR
发布日期: 2023-11-02
💡 一句话要点
提出Tensor Trust数据集以研究提示注入攻击问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 提示注入攻击 大型语言模型 对抗性示例 数据集构建 模型鲁棒性 安全性评估
📋 核心要点
- 现有大型语言模型在实际应用中面临提示注入攻击的脆弱性,影响系统的安全性和可靠性。
- 本文提出了Tensor Trust数据集,包含大量人类生成的提示注入攻击和防御示例,以便研究和评估这些攻击。
- 实验结果表明,许多现有模型对提示注入攻击存在显著脆弱性,并且某些攻击策略可以推广到实际应用中。
📝 摘要(中文)
随着大型语言模型(LLMs)在实际应用中的广泛使用,它们仍然容易受到提示注入攻击的影响,即恶意第三方提示会颠覆系统设计者的意图。为帮助研究人员研究这一问题,本文提出了一个包含超过126,000个提示注入攻击和46,000个针对提示注入的“防御”示例的数据集,这些数据均由在线游戏Tensor Trust的玩家创建。该数据集是目前最大的人类生成对抗示例数据集,揭示了LLMs的弱点。我们还利用该数据集创建了针对两种类型提示注入的基准,分别称为提示提取和提示劫持。基准结果显示,许多模型对Tensor Trust数据集中的攻击策略存在脆弱性。更重要的是,数据集中某些攻击策略能够推广到已部署的基于LLM的应用程序,尽管它们面临着与游戏截然不同的约束条件。所有数据和源代码已在https://tensortrust.ai/paper发布。
🔬 方法详解
问题定义:本文旨在解决大型语言模型(LLMs)在面对提示注入攻击时的脆弱性,现有方法未能有效识别和防御这些攻击。
核心思路:通过创建一个包含大量人类生成的提示注入攻击和防御示例的数据集,帮助研究人员理解和分析这些攻击的结构和影响。
技术框架:整体架构包括数据集的构建、攻击策略的分类(如提示提取和提示劫持)以及基准测试的设计,以评估模型的抗攻击能力。
关键创新:本研究的创新点在于提供了一个规模庞大且结构清晰的数据集,揭示了LLMs的弱点,并为后续研究提供了基准测试框架。
关键设计:数据集中包含126,000个攻击示例和46,000个防御示例,采用了易于解释的结构,便于研究人员进行分析和实验。
🖼️ 关键图片
📊 实验亮点
实验结果显示,许多模型对Tensor Trust数据集中的攻击策略存在脆弱性,尤其是在提示提取和提示劫持方面。基准测试表明,某些攻击策略能够在不同约束条件下有效推广,显示出模型的普遍脆弱性。
🎯 应用场景
该研究的潜在应用领域包括安全性评估、模型鲁棒性提升以及对抗性训练等。通过深入理解提示注入攻击,研究人员可以设计出更安全的LLM应用,提升其在实际场景中的可靠性和安全性。
📄 摘要(原文)
While Large Language Models (LLMs) are increasingly being used in real-world applications, they remain vulnerable to prompt injection attacks: malicious third party prompts that subvert the intent of the system designer. To help researchers study this problem, we present a dataset of over 126,000 prompt injection attacks and 46,000 prompt-based "defenses" against prompt injection, all created by players of an online game called Tensor Trust. To the best of our knowledge, this is currently the largest dataset of human-generated adversarial examples for instruction-following LLMs. The attacks in our dataset have a lot of easily interpretable stucture, and shed light on the weaknesses of LLMs. We also use the dataset to create a benchmark for resistance to two types of prompt injection, which we refer to as prompt extraction and prompt hijacking. Our benchmark results show that many models are vulnerable to the attack strategies in the Tensor Trust dataset. Furthermore, we show that some attack strategies from the dataset generalize to deployed LLM-based applications, even though they have a very different set of constraints to the game. We release all data and source code at https://tensortrust.ai/paper