journal article·2025-11-10Open access

PrivRewrite: Differentially Private Text Rewriting Under Black-Box Access with Refined Sensitivity Guarantees

Jongwook Kim

Applied Sciences· Volume 15· Issue 22

Abstract

Text data is indispensable for modern machine learning and natural language processing but often contains sensitive information that must be protected before sharing or release. Differential privacy (DP) provides rigorous guarantees for privacy preservation, yet applying DP to text rewriting poses unique challenges. Existing approaches frequently assume white-box access to large language models (LLMs), relying on internal signals such as logits or gradients. These assumptions limit practicality, since real-world users typically interact with LLMs only through black-box APIs. We introduce PrivRewrite, a framework for differentially private text rewriting that operates entirely under black-box access. PrivRewrite constructs a diverse pool of candidate rewrites through randomized prompting and pruning and then employs the exponential mechanism to select a single release with end-to-end ϵ-DP. A key contribution is our refined sensitivity analysis of the utility function, which yields tighter bounds than naive estimates and thereby strengthens the accuracy guarantees of the exponential mechanism. The framework requires no fine-tuning, internal model access, or local inference, making it lightweight and deployable in practical API-based settings. Experimental results on benchmark datasets demonstrate that PrivRewrite achieves strong privacy–utility trade-offs, producing fluent and semantically faithful outputs while upholding formal privacy guarantees. These results highlight the feasibility of black-box DP text rewriting and show how refined sensitivity analysis can further improve utility under strict privacy constraints.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Privacy-Preserving Technologies in Data · Cryptography and Data Security · Adversarial Robustness in Machine Learning

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Computer Science, Sangmyung University, Seoul 03016, Republic of Korea

Funding

National Research Foundation of Korea

References (43)

Show source-provided references
1. Song, S., and Kim, J. (2023). Adapting Geo-Indistinguishability for Privacy-Preserving Collection of Medical Microdata. Electronics, 12.10.3390/electronics12132793 ↗
2. From user-generated data to data-driven innovation: A research agenda to understand user privacy in digital markets
3. Collecting health lifelog data from smartwatch users in a privacy-preserving manner10.1109/TCE.2019.2924466 ↗
4. Big data in healthcare: Management, analysis and future prospects10.1186/s40537-019-0217-0 ↗
5. Li, M., Liu, J., and Yang, Y. (2024). Automated Identification of Sensitive Financial Data Based on the Topic Analysis. Future Internet, 16.10.3390/fi16020055 ↗
6. (2025, April 18). Health Insurance Portability and Accountability Act, Available online: https://www.hhs.gov/hipaa/index.html.
7. (2025, April 18). General Data Protection Regulation. Available online: https://gdpr-info.eu/.
8. Dwork, C. (2006, January 10–14). Differential privacy. Proceedings of the International Colloquium on Automata, Languages, and Programming, Venice, Italy.10.1007/11787006_1 ↗
9. Erlingsson, U., Pihur, V., and Korolova, A. (2014, January 3–7). RAPPOR: Randomized aggregatable privacy-preserving ordinal response. Proceedings of the ACM SIGSAC Conference on Computer and Communications Security, Scottsdale, AZ, USA.10.1145/2660267.2660348 ↗
10. Wang, T., Blocki, J., Li, N., and Jha, S. (2017, January 16–18). Locally differentially private protocols for frequency estimation. Proceedings of the USENIX Conference on Security Symposium, Berkeley, CA, USA.
11. Feyisetan, O., Balle, B., Drake, T., and Diethe, T. (2020, January 3–7). Privacy-and utility-preserving textual analysis via calibrated multivariate perturbations. Proceedings of the International Conference on Web Search and Data Mining, Houston, TX, USA.10.1145/3336191.3371856 ↗
12. Xu, Z., Aggarwal, A., Feyisetan, O., and Teissier, N. (2020, January 20). A differentially private text perturbation method using regularized Mahalanobis metric. Proceedings of the Second Workshop on Privacy in NLP, Online.10.18653/v1/2020.privatenlp-1.2 ↗
13. Carvalho, R.S., Vasiloudis, T., and Feyisetan, O. (2021). TEM: High utility metric differential privacy on text. arXiv.
14. Meehan, C., Mrini, K., and Chaudhuri, K. (2022, January 22–27). Sentence-level privacy for document embeddings. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, Dublin, Ireland.10.18653/v1/2022.acl-long.238 ↗
15. A survey on LLM-based multi-agent systems: Workflow, infrastructure, and challenges10.1007/s44336-024-00009-2 ↗
16. Large Language Model (LLM) for Telecommunications: A Comprehensive Survey on Principles, Key Techniques, and Opportunities10.1109/COMST.2024.3465447 ↗
17. Mattern, J., Weggenmann, B., and Kerschbaum, F. (2022). The Limits of Word Level Differential Privacy. Findings of the Association for Computational Linguistics: NAACL 2022, Association for Computational Linguistics.10.18653/v1/2022.findings-naacl.65 ↗
18. Utpala, S., Hooker, S., and Chen, P.-Y. (2023). Locally Differentially Private Document Generation Using Zero Shot Prompting. Findings of the Association for Computational Linguistics: EMNLP 2023, Association for Computational Linguistics.10.18653/v1/2023.findings-emnlp.566 ↗
19. Meisenbacher, S., Chevli, M., Vladika, J., and Matthes, F. (2024). DP-MLM: Differentially Private Text Rewriting Using Masked Language Models. Findings of the Association for Computational Linguistics: ACL 2024, Association for Computational Linguistics.10.18653/v1/2024.findings-acl.554 ↗
20. Tong, M., Chen, K., Zhang, J., Qi, Y., Zhang, W., Yu, N., Zhang, T., and Zhang, Z. (2023). InferDPT: Privacy-Preserving Inference for Black-box Large Language Model. arXiv.
21. Miglani, V., Yang, A., Markosyan, A., Garcia-Olano, D., and Kokhlikyan, N. (2023, January 6). Using Captum to Explain Generative Language Models. Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software, Singapore.10.18653/v1/2023.nlposs-1.19 ↗
22. Chang, Y., Cao, B., Wang, Y., Chen, J., and Lin, L. (2024). XPrompt: Explaining Large Language Model’s Generation via Joint Prompt Attribution. arXiv.
23. Zhou, X., Lu, Y., Ma, R., Gui, T., Wang, Y., Ding, Y., Zhang, Y., Zhang, Q., and Huang, X. (2023). TextObfuscator: Making Pre-trained Language Model a Privacy Protector via Obfuscating Word Representations. Findings of the Association for Computational Linguistics: ACL 2023, Association for Computational Linguistics.10.18653/v1/2023.findings-acl.337 ↗
24. Yue, X., Du, M., Wang, T., Li, Y., Sun, H., and Chow, S.S.M. (2021). Differential Privacy for Text Analytics via Natural Text Sanitization. Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, Association for Computational Linguistics.10.18653/v1/2021.findings-acl.337 ↗
25. Chen, H., Mo, F., Wang, Y., Chen, C., Nie, J.-Y., Wang, C., and Cui, J. (2023). A Customized Text Sanitization Mechanism with Differential Privacy. Findings of the Association for Computational Linguistics: ACL 2023, Association for Computational Linguistics.10.18653/v1/2023.findings-acl.355 ↗
26. A Metric Differential Privacy Mechanism for Sentence Embeddings10.1145/3708321 ↗
27. Li, M., Fan, H., Fu, S., Ding, J., and Feng, Y. (2025). DP-GTR: Differentially Private Prompt Protection via Group Text Rewriting. arXiv.10.18653/v1/2025.findings-emnlp.83 ↗
28. Lin, S., Hua, W., Wang, Z., Jin, M., Fan, L., and Zhang, Y. (2025). EmojiPrompt: Generative Prompt Obfuscation for Privacy-Preserving Communication with Cloud-based LLMs. arXiv.10.18653/v1/2025.naacl-long.614 ↗
29. Mai, P., Yan, R., Huang, Z., Yang, Y., and Pang, Y. (2024). Split-and-Denoise: Protect Large Language Model Inference with Local Differential Privacy. arXiv.
30. Wu, H., Dai, W., Wang, L., and Yan, Q. (2025). Cape: Context-Aware Prompt Perturbation Mechanism with Differential Privacy. arXiv.
31. Hong, J., Wang, J.T., Zhang, C., Li, Z., Li, B., and Wang, Z. (2024). DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer. arXiv.
32. A Survey on Backdoor Threats in Large Language Models (LLMs): Attacks, Defenses, and Evaluation Methods
33. A Contemporary Survey of Large Language Model Assisted Program Analysis
34. Jaffal, N.O., Alkhanafseh, M., and Mohaisen, D. (2025). Large Language Models in Cybersecurity: A Survey of Applications, Vulnerabilities, and Defense Techniques. AI, 6.10.3390/ai6090216 ↗
35. Choi, S., Alkinoon, A., Alghuried, A., Alghamdi, A., and Mohaisen, D. (2025, January 20–23). Attributing ChatGPT-Transformed Synthetic Code. Proceedings of the IEEE International Conference on Distributed Computing Systems, Glasgow, Scotland.10.1109/ICDCS63083.2025.00018 ↗
36. Lin, J., and Mohaisen, D. (2025, January 24–28). From Large to Mammoth: A Comparative Evaluation of Large Language Models in Vulnerability Detection. Proceedings of the Network and Distributed System Security Symposium, San Diego, CA, USA.10.14722/ndss.2025.241491 ↗
37. Alghamdi, A., and Mohaisen, D. (2024, January 21–27). Through the Looking Glass: LLM-Based Analysis of AR/VR Android Applications Privacy Policie. Proceedings of the International Conference on Machine Learning and Applications, Vienna, Austria.10.1109/ICMLA61862.2024.00078 ↗
38. Lin, J., and Mohaisen, D. (2024, January 21–27). Evaluating Large Language Models in Vulnerability Detection Under Variable Context Windows. Proceedings of the International Conference on Machine Learning and Applications, Vienna, Austria.10.1109/ICMLA61862.2024.00173 ↗
39. The algorithmic foundations of differential privacy10.1561/0400000042 ↗
40. Ben Abacha, A., and Demner-Fushman, D. (2019). A Question-Entailment Approach to Question Answering. Bmc Bioinform., 20.10.1186/s12859-019-3119-4 ↗
41. Maas, A.L., Daly, R.E., Pham, P.T., Huang, D., Ng, A.Y., and Potts, C. (2011, January 19–24). Learning Word Vectors for Sentiment Analysis. Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics, Portland, OR, USA.
42. Reimers, N., and Gurevych, I. (2019, January 3–7). Sentence-BERT: Sentence embeddings using Siamese BERT networks. Proceedings of the Conference on Empirical Methods in Natural Language Processing, Hong Kong, China.10.18653/v1/D19-1410 ↗
43. Zhang, T., Kishore, V., Wu, F., Weinberger, K.Q., and Artzi, Y. (2020, January 26–30). BERTScore: Evaluating text generation with BERT. Proceedings of the International Conference on Learning Representations, Addis Ababa, Ethiopia.