mlsanityData to 7 Oct 2026

Sanitize Your Responses: Mitigating Privacy Leakage in Large Language Models

arXiv 2509.24488 ↗First posted 29 Sep 2025cs.CL cs.CR cs.LGcited by 0

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

As Large Language Models (LLMs) achieve remarkable success across a wide range of applications, such as chatbots and code copilots, concerns surrounding the generation of harmful content have come increasingly into focus. Despite significant advances in aligning LLMs with safety and ethical standards, adversarial prompts can still be crafted to elicit undesirable responses. Existing mitigation strategies are predominantly based on post-hoc filtering, which introduces substantial latency or computational overhead, and is incompatible with token-level streaming generation. In this work, we introduce Self-Sanitize, a novel LLM-driven mitigation framework inspired by cognitive psychology, which emulates human self-monitor and self-repair behaviors during conversations. Self-Sanitize comprises a lightweight Self-Monitor module that continuously inspects high-level intentions within the LLM at the token level via representation engineering, and a Self-Repair module that performs in-place correction of harmful content without initiating separate review dialogues. This design allows for real-time streaming monitoring and seamless repair, with negligible impact on latency and resource utilization. Given that privacy-invasive content has often been insufficiently focused in previous studies, we perform extensive experiments on four LLMs across three privacy leakage scenarios. The results demonstrate that Self-Sanitize achieves superior mitigation performance with minimal overhead and without degrading the utility of LLMs, offering a practical and robust solution for safer LLM deployments. Our code is available at the following link: https://github.com/wjfu99/LLM_Self_Sanitize

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 35 of its 52 references that are in the map. First posted on arXiv 29 Sep 2025.

Builds on

35 of 52 references.

Closest ancestors · 2

Same direction, newest first

  1. 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Tricked14 Aug
  2. 2023Prompt Injection attack against LLM-integrated Applications8 Jun

Other references · 33

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  3. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  4. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  5. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
  6. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
  7. 2021Ethical and social risks of harm from Language Modelscited by 957
  8. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 828
  9. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
  10. 2022Large Language Models Can Self-Improvecited by 656
  11. 2023Safe RLHF: Safe Reinforcement Learning from Human Feedbackcited by 630
  12. 2023DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Modelscited by 505
21 more
  1. 2023Detecting Language Model Attacks with Perplexitycited by 411
  2. 2023Toxicity in ChatGPT: Analyzing Persona-assigned Language Modelscited by 356
  3. 2023Large Language Models for Information Retrieval: A Surveycited by 331
  4. 2024Improving Alignment and Robustness with Circuit Breakerscited by 302
  5. 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decodingcited by 233
  6. 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 189
  7. 2022A New Generation of Perspective API: Efficient Multilingual Character-level Transformerscited by 181
  8. 2024COLD-Attack: Jailbreaking LLMs with Stealthiness and Controllabilitycited by 162
  9. 2023The Programmer's Assistant: Conversational Interaction with a Large Language Model for Software Developmentcited by 95
  10. 2023Privacy-Preserving In-Context Learning with Differentially Private Few-Shot Generationcited by 94
  11. 2023The Art of Defending: A Systematic Evaluation and Analysis of LLM Defense Strategies on Safety and Over-Defensivenesscited by 63
  12. 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Mannercited by 57
  13. 2023On Early Detection of Hallucinations in Factual Question Answeringcited by 54
  14. 2023Privacy-Preserving In-Context Learning for Large Language Modelscited by 50
  15. 2024A Synthetic Dataset for Personal Attribute Inferencecited by 35
  16. 2025From Judgment to Interference: Early Stopping LLM Harmful Outputs via Streaming Content Monitoringcited by 20
  17. 2023Privacy-Aware Document Visual Question Answeringcited by 17
  18. 2024No Free Lunch Theorem for Privacy-Preserving LLM Inferencecited by 13
  19. 2024Self-Evaluation as a Defense Against Adversarial Attacks on LLMscited by 13
  20. 2024On the Implications of Verbose LLM Outputs: A Case Study in Translation Evaluationcited by 13
  21. 2020Deep Hierarchical Classification for Category Prediction in E-commerce Systemcited by 8

Built on by

Not cited yet.