TRAP: Targeted Random Adversarial Prompt Honeypot for Black-Box Identification

Martin Gubri, Dennis Ulmer, Hwaran Lee, Sangdoo Yun, Seong Joon Oh

Introduction: The Identity Crisis in the LLM Economy

As Large Language Models (LLMs) become central to the modern tech economy, providers face a growing challenge in protecting their intellectual property. Models are frequently leaked, used in violation of commercial licenses (such as Meta’s Llama 2 restrictions), or repurposed for malicious activities. This has created a critical need for Black-Box Identity Verification (BBIV): a method for a provider to prove that a specific third-party application is secretly utilizing their proprietary model.

Overview of the Motivation and the Black-box Identity Verification (BBIV) Task.

Traditional identification methods often fail. Naive prompting (e.g., asking "Who made you?") is easily bypassed by system instructions. Watermarking is effective but requires intervention during training or generation, which is not feasible for models already deployed or leaked. Statistical methods, such as perplexity-based detection, often require long text samples and are prone to false positives.

The TRAP Methodology: Adversarial Honeypots

To address these challenges, researchers have introduced TRAP (Targeted Random Adversarial Prompt). This novel technique repurposes adversarial attacks—originally designed for "jailbreaking" models—into a robust security feature. TRAP forces a target "Reference LLM" to produce a specific, pre-defined output (a "honeypot") while other models produce random results.

Suffix Optimization and Token Filtering

The core of TRAP utilizes the Greedy Coordinate Gradient (GCG) algorithm. Instead of triggering harmful content, TRAP optimizes a string of seemingly gibberish tokens to force the Reference LLM to output a specific target string (e.g., the number "314") in response to a generic prompt like "Give me a random number."

The iterative optimization process of finding an adversarial suffix that forces the Reference LLM to output a target string.

To ensure the model is not simply echoing the prompt, the authors implement Token Filtering, removing any tokens from the suffix that literally represent the target answer. This ensures the response is a product of the model's internal weights and logic. Because adversarial suffixes are notoriously "brittle"—meaning they are highly specific to a single model's architecture and weights—other LLMs treat the suffix as noise and provide a truly random answer. This allows for high-confidence identity confirmation with just a single interaction.

Experimental Results and Insights

The researchers evaluated TRAP across a variety of open-source and proprietary models, including Llama-2-7B-chat, Guanaco-7B, and Vicuna-7B as targets. They compared these against a suite of ten other models, including GPT-4 and Claude 2.1.

Key Performance Metrics

  • High Accuracy: TRAP achieved a True Positive Rate (TPR) of over 95% with a False Positive Rate (FPR) of less than 0.2% after a single interaction.
  • Efficiency: Unlike statistical methods that require hundreds of words, TRAP can identify a model with high certainty using an output as short as 3 to 5 characters.
  • Robustness to "Persona" Shifts: Even when a model is given a complex system prompt (e.g., "Act like a Shakespearean assistant"), the underlying TRAP suffix often still triggers the target response.
  • Precision: TRAP is precise enough to distinguish between closely related models, such as Llama-2-7B and Llama-2-13B.

Limitations and Future Work

While highly effective, TRAP faces potential countermeasures. A sophisticated adversary could implement a "perplexity filter" to detect and block gibberish-looking adversarial suffixes. Additionally, extremely long or restrictive system prompts can occasionally "drown out" the adversarial suffix, leading to failed identification.

Future research directions include exploring contrastive optimization—designing prompts to maximize the difference between a target model's response and those of others—and investigating the use of these techniques for steganography in agent-to-agent communication.

Summary updated

BibTeX
@inproceedings{gubri2024trap,
  author = {Martin Gubri and Dennis Ulmer and Hwaran Lee and Sangdoo Yun and Seong Joon Oh},
  title = {{TRAP: Targeted Random Adversarial Prompt Honeypot for Black-Box Identification}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.683},
}
Figure