← Back to Library

Contextualized Privacy Defense for LLM Agents

Authors: Yule Wen, Yanzhe Zhang, Jianxun Lian, Xiaoyuan Yi, Xing Xie, Diyi Yang

Published: 2026-03-03

arXiv ID: 2603.02983v1

Added to Library: 2026-03-04 03:00 UTC

Safety

📄 Abstract

LLM agents increasingly act on users' personal information, yet existing privacy defenses remain limited in both design and adaptability. Most prior approaches rely on static or passive defenses, such as prompting and guarding. These paradigms are insufficient for supporting contextual, proactive privacy decisions in multi-step agent execution. We propose Contextualized Defense Instructing (CDI), a new privacy defense paradigm in which an instructor model generates step-specific, context-aware privacy guidance during execution, proactively shaping actions rather than merely constraining or vetoing them. Crucially, CDI is paired with an experience-driven optimization framework that trains the instructor via reinforcement learning (RL), where we convert failure trajectories with privacy violations into learning environments. We formalize baseline defenses and CDI as distinct intervention points in a canonical agent loop, and compare their privacy-helpfulness trade-offs within a unified simulation framework. Results show that our CDI consistently achieves a better balance between privacy preservation (94.2%) and helpfulness (80.6%) than baselines, with superior robustness to adversarial conditions and generalization.

🔍 Key Points

  • Introduction of Contextualized Defense Instructing (CDI) to enhance privacy defense in LLM agents through dynamic, context-aware guidance.
  • Development of an experience-driven optimization framework using reinforcement learning to improve the CDI model's robustness against adversarial attacks.
  • CDI outperforms traditional defenses like prompting and guarding, achieving higher privacy preservation and helpfulness scores during evaluation.
  • The paper presents comprehensive experiments demonstrating CDI's superior generalization across unseen scenarios compared to baseline defenses.
  • The study highlights the importance of contextual understanding in privacy decisions, showing that static approaches fail against adaptive, strategic attacks.

💡 Why This Paper Matters

This paper is crucial as it offers a novel approach to privacy defense in large language model agents, which is increasingly important as these systems handle sensitive user information. The insights from the CDI paradigm underscore the need for dynamic and context-sensitive interventions, which can greatly mitigate privacy risks.

🎯 Why It's Interesting for AI Security Researchers

AI security researchers will find this paper significant because it addresses the critical area of privacy risks in AI systems, particularly those relying on user data. With LLMs becoming more embedded in daily applications, developing robust privacy-preserving techniques is essential to ensure users' safety and trust. This research contributes foundational knowledge and frameworks that can guide future enhancements in secure AI agent designs.

📚 Read the Full Paper