Has My System Prompt Been Used? Large Language Model Prompt Membership Inference

Roman Levin, Valeriia Cherepanova, Abhimanyu Hans, Avi Schwarzschild, Tom Goldstein
2/14/2025
cs.AIcs.CR

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Prompt engineering has emerged as a powerful technique for optimizing large language models (LLMs) for specific applications, enabling faster prototyping and improved performance, and giving rise to the interest of the community in protecting proprietary system prompts. In this work, we explore a novel perspective on prompt privacy through the lens of membership inference. We develop Prompt Detective, a statistical method to reliably determine whether a given system prompt was used by a third-party language model. Our approach relies on a statistical test comparing the distributions of two groups of model outputs corresponding to different system prompts. Through extensive experiments with a variety of language models, we demonstrate the effectiveness of Prompt Detective for prompt membership inference. Our work reveals that even minor changes in system prompts manifest in distinct response distributions, enabling us to verify prompt usage with statistical significance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{levin2025system,
  title  = {Has My System Prompt Been Used? Large Language Model Prompt Membership Inference},
  author = {Roman Levin and Valeriia Cherepanova and Abhimanyu Hans and Avi Schwarzschild and Tom Goldstein},
  year   = {2025},
  eprint = {2502.09974},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.09974v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.09974.svg)](https://codeofpaper.com/paper/2502.09974)

Discussion