arXiv:2409.11026cs.CRcs.LG2024-09被引 14

用混淆技术保护大模型系统提示,防窃取且不影响功能。

Prompt Obfuscation for Large Language Models

  • 将系统提示转化为不可逆的混淆形式,保持功能一致。
  • 八项指标测试显示混淆后输出与原提示基本一致。
  • 三种攻击下均难以还原原始提示,适合需保密的场景。

系统提示通过详细指令可将基础大模型变为实用工具,其价值类似软件代码,属于重要知识产权。然而当前系统提示极易被提取,缺乏有效防护手段。本文提出提示混淆机制,以在极低开销下防止提示信息泄露。核心思想是找到与原提示功能等效但无法推断其内容的表示形式。通过八种度量标准(词汇、字符级、语义相似性)对比混淆前后输出,结果表明二者表现相当。进一步在黑盒与白盒条件下设计三种解混淆攻击,验证在现实攻击场景中攻击者无法获取有意义信息。实验表明,提示混淆能有效保护系统提示的知识产权,同时维持原提示全部功能。

原文摘要 · Abstract (English)

System prompts that include detailed instructions to describe the task performed by the underlying LLM can easily transform foundation models into tools and services with minimal overhead. They are often considered intellectual property, similar to the code of a software product, because of their crucial impact on the utility. However, extracting system prompts is easily possible. As of today, there is no effective countermeasure to prevent the stealing of system prompts, and all safeguarding efforts could be evaded. In this work, we propose an alternative to conventional system prompts. We introduce prompt obfuscation to prevent the extraction of the system prompt with little overhead. The core idea is to find a representation of the original system prompt that leads to the same functionality, while the obfuscated system prompt does not contain any information that allows conclusions to be drawn about the original system prompt. We evaluate our approach by comparing our obfuscated prompt output with the output of the original prompt, using eight distinct metrics to measure the lexical, character-level, and semantic similarity. We show that the obfuscated version is constantly on par with the original one. We further perform three different deobfuscation attacks with varying attacker knowledge--covering both black-box and white-box conditions--and show that in realistic attack scenarios an attacker is unable to extract meaningful information. Overall, we demonstrate that prompt obfuscation is an effective mechanism to safeguard the intellectual property of a system prompt while maintaining the same utility as the original prompt.

提示工程安全防护大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。