Anti-adversarial Learning: Desensitizing Prompts for Large Language Models
Not on the map. Why?
Abstract (arXiv)
With the widespread use of LLMs, preserving privacy in user prompts has become crucial, as prompts risk exposing privacy and sensitive data to the cloud LLMs. Traditional techniques like homomorphic encryption, secure multi-party computation, and federated learning face challenges due to heavy computational costs and user participation requirements, limiting their applicability in LLM scenarios. In this paper, we propose PromptObfus, a novel method for desensitizing LLM prompts. The core idea of PromptObfus is "anti-adversarial" learning, which perturbs privacy words in the prompt to obscure sensitive information while retaining the stability of model predictions. Specifically, PromptObfus frames prompt desensitization as a masked language modeling task, replacing privacy-sensitive terms with a [MASK] token. A desensitization model is trained to generate candidate replacements for each masked position. These candidates are subsequently selected based on gradient feedback from a surrogate model, ensuring minimal disruption to the task output. We demonstrate the effectiveness of our approach on three NLP tasks. Results show that PromptObfus effectively prevents privacy inference from remote LLMs while preserving task performance.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 18 of its 28 references that are in the map. First posted on arXiv 25 Apr 2025.
Builds on
18 of 28 references.
References · 18
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2016Communication-Efficient Learning of Deep Networks from Decentralized Datacited by 7,669
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
- 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 864
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2018Generating Natural Language Adversarial Examplescited by 424
- 2023Can LLMs Keep a Secret? Testing Privacy Implications of Language Models via Contextual Integrity Theorycited by 230
- 2021Differential Privacy for Text Analytics via Natural Text Sanitizationcited by 77
- 2023Locally Differentially Private Document Generation Using Zero Shot Promptingcited by 63
- 2023DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineercited by 57
- 2021Natural Language Understanding with Privacy-Preserving BERTcited by 55
6 more
- 2023Hide and Seek (HaS): A Lightweight Framework for Prompt Privacy Protectioncited by 38
- 2022D4: a Chinese Dialogue Dataset for Depression-Diagnosis-Oriented Chatcited by 37
- 2021CAPE: Context-Aware Private Embeddings for Private Language Learningcited by 22
- 2024No Free Lunch Theorem for Privacy-Preserving LLM Inferencecited by 13
- 2024Data-adaptive Differentially Private Prompt Synthesis for In-Context Learningcited by 10
- 2024DePrompt: Desensitization and Evaluation of Personal Identifiable Information in Large Language Model Promptscited by 9
Built on by
Citing papers per year: 2026: 2.
2 papers.