arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2412.13426cs.CRcs.AI
收藏

PromptKeeper:保护大语言模型系统提示词的安全机制

PromptKeeper: Safeguarding System Prompts for LLMs

Zhifeng Jiang, Zhihua Jin, Guoliang He

AI总结:

本文提出PromptKeeper防御机制,通过假设检验检测系统提示词泄露并用虚拟提示词重新生成响应,在保持对话能力与效率的同时抵御提示词提取攻击。

摘要:

系统提示词被广泛用于引导大语言模型(LLMs)的输出。这些提示词通常包含业务逻辑和敏感信息,因此保护它们至关重要。然而,对抗性甚至普通用户查询都可能利用LLM的漏洞来暴露这些隐藏的提示词。为了解决这一问题,我们提出了PromptKeeper,这是一种防御机制,旨在通过应对两个核心挑战来保护系统提示词:可靠地检测泄露,以及在泄露发生时缓解侧信道漏洞。通过将检测构建为假设检验问题,PromptKeeper能够有效识别显式和隐式的泄露。一旦检测到泄露,它会使用虚拟提示词重新生成响应,确保在没有泄露时输出与典型交互无法区分。PromptKeeper能够针对对抗性或普通查询的提示词提取攻击提供稳健保护,同时在良性用户交互期间保持对话能力和运行时效率。

英文摘要:

System prompts are widely used to guide the outputs of large language models (LLMs). These prompts often contain business logic and sensitive information, making their protection essential. However, adversarial and even regular user queries can exploit LLM vulnerabilities to expose these hidden prompts. To address this issue, we propose PromptKeeper, a defense mechanism designed to safeguard system prompts by tackling two core challenges: reliably detecting leakage and mitigating side-channel vulnerabilities when leakage occurs. By framing detection as a hypothesis-testing problem, PromptKeeper effectively identifies both explicit and subtle leakage. Upon leakage detected, it regenerates responses using a dummy prompt, ensuring that outputs remain indistinguishable from typical interactions when no leakage is present. PromptKeeper ensures robust protection against prompt extraction attacks via either adversarial or regular queries, while preserving conversational capability and runtime efficiency during benign user interactions.

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

↑