mlsanityData to 7 Oct 2026

Prompt Obfuscation for Large Language Models

arXiv 2409.11026 ↗First posted 17 Sep 2024cs.CR cs.LGcited by 10

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 40 of its 64 references that are in the map. First posted on arXiv 17 Sep 2024.

Builds on

40 of 64 references.

References · 40

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023GPT-4 Technical Reportcited by 18,132
  4. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  5. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  6. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  7. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  8. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
  9. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
  10. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
  11. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
  12. 2023Code Llama: Open Foundation Models for Codecited by 2,105
28 more
  1. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
  2. 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 809
  3. 2023Large Language Modelscited by 774
  4. 2023Extracting Training Data from Diffusion Modelscited by 723
  5. 2023OpenAssistant Conversations -- Democratizing Large Language Model Alignmentcited by 712
  6. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
  7. 2023Prompt Injection attack against LLM-integrated Applicationscited by 568
  8. 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 530
  9. 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Studycited by 478
  10. 2023Detecting Language Model Attacks with Perplexitycited by 411
  11. 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
  12. 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 329
  13. 2024Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?cited by 227
  14. 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
  15. 2023EvoPrompt: Connecting LLMs with Evolutionary Algorithms Yields Powerful Prompt Optimizerscited by 189
  16. 2022GrIPS: Gradient-free, Edit-based Instruction Search for Prompting Large Language Modelscited by 127
  17. 2023ProPILE: Probing Privacy Leakage in Large Language Modelscited by 127
  18. 2023Abusing Images and Sounds for Indirect Instruction Injection in Multi-Modal LLMscited by 117
  19. 2023Effective Prompt Extraction from Language Modelscited by 83
  20. 2022Machine Generated Text: A Comprehensive Survey of Threat Models and Detection Methodscited by 75
  21. 2021Prompt Waywardness: The Curious Case of Discretized Interpretation of Continuous Promptscited by 64
  22. 2023Can Language Models be Instructed to Protect Personal Information?cited by 46
  23. 2023Prompt Optimization via Adversarial In-Context Learningcited by 33
  24. 2023AutoHint: Automatic Prompt Optimization with Hint Generationcited by 29
  25. 2024Generative AI in EU Law: Liability, Privacy, Intellectual Property, and Cybersecuritycited by 21
  26. 2024Dataset and Lessons Learned from the 2024 SaTML LLM Capture-the-Flag Competitioncited by 20
  27. 2024Raccoon: Prompt Extraction Benchmark of LLM-Integrated Applicationscited by 16
  28. 2023Dialogue for Prompting: a Policy-Gradient-Based Discrete Prompt Generation for Few-shot Learningcited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 4; 2026: 6.

10 papers.