Skip to main content
QUICK REVIEW

[Paper Review] Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game

Sam Toyer, Olivia Watkins|arXiv (Cornell University)|Nov 2, 2023
Adversarial Robustness in Machine LearningComputer Science5 citations
TL;DR

This paper introduces Tensor Trust, an online game that generates over 126,000 human-created prompt injection attacks and 46,000 defenses against instruction-following LLMs. Using GPT-3.5 Turbo as the backend, the game reveals interpretable attack patterns and benchmarks LLM robustness to prompt hijacking and extraction, showing that many models remain vulnerable even to strategies generalized from the game setting.

ABSTRACT

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

Motivation & Objective

  • To study real-world prompt injection vulnerabilities in instruction-tuned LLMs through human-generated adversarial examples.
  • To create a scalable, interpretable dataset of attacks and defenses that reflect actual human strategies.
  • To evaluate LLM robustness to two key attack types: prompt extraction and prompt hijacking.
  • To demonstrate that attack strategies from the game generalize to real-world LLM applications.
  • To provide a reproducible benchmark and open-source dataset for future research on LLM security.

Proposed method

  • The Tensor Trust web game simulates a secure access system where players create defenses that trigger 'access granted' only when a secret code is entered.
  • Attackers must craft prompts that cause the LLM to output 'access granted' without knowing the code or defense, simulating real-world prompt injection.
  • All attacks and defenses are collected from live gameplay, resulting in a dataset of 126,808 attacks and 46,457 defenses with player IDs and timestamps.
  • The authors design two benchmarks: one for prompt extraction (reconstructing the defense prompt) and one for prompt hijacking (obtaining access without the code).
  • Experiments evaluate GPT-3.5 Turbo’s robustness across five message role schemes, showing minimal variation in performance.
  • Attack strategies from the dataset are applied to real LLM-based applications, demonstrating cross-setting generalization.
Figure 1: In Tensor Trust, each player creates a defense (blue) that causes an LLM (yellow) to say “access granted” when a secret access code (green) is entered. Attackers are not shown the defense or access code and must instead gain access with prompt injection attacks (red) .
Figure 1: In Tensor Trust, each player creates a defense (blue) that causes an LLM (yellow) to say “access granted” when a secret access code (green) is entered. Attackers are not shown the defense or access code and must instead gain access with prompt injection attacks (red) .

Experimental results

Research questions

  • RQ1What kinds of interpretable, human-generated prompt injection strategies emerge in a real-world game setting?
  • RQ2How robust are instruction-tuned LLMs to prompt injection when subjected to diverse, human-crafted attacks?
  • RQ3To what extent do attack strategies from the game generalize to real-world LLM applications with different constraints?
  • RQ4How does the role assignment (system/user) affect LLM susceptibility to prompt injection?
  • RQ5Can a game-based data collection approach yield a large-scale, high-quality benchmark for LLM security evaluation?

Key findings

  • The Tensor Trust dataset contains 126,808 unique prompt injection attacks and 46,457 defenses, making it the largest known human-generated dataset of its kind for instruction-following LLMs.
  • GPT-3.5 Turbo showed a prompt hijacking robustness rate (HRR) between 19% and 31% across all message role schemes, indicating consistent vulnerability.
  • Prompt extraction robustness rate (ERR) ranged from 27% to 35%, showing that many models fail to protect their internal prompt logic.
  • The game revealed that LLMs often allow 'user' instructions to override 'system' instructions, exposing a critical design flaw.
  • Several attack strategies from the game successfully bypassed real-world LLM-based applications, even under different constraints.
  • The dataset enables interpretable analysis of LLM failure modes, such as bizarre behavior with rare tokens and role confusion.
Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.