PromptGraph: Graph-Guided Prompt Sanitization for Balancing Privacy and Utility in LLM Inference

📅 2026-07-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge that privacy leakage in large language model inference stems not only from explicit identifiers but also from contextual correlations among seemingly innocuous text fragments, a problem inadequately handled by existing methods that struggle to balance privacy preservation with semantic utility. The authors propose the first approach that models input prompts as attributed graphs, where nodes represent text fragments annotated with privacy scores and edges explicitly encode contextual dependencies essential for maintaining task utility. A combinatorial optimization strategy is employed to select a subset of fragments for protection, maximizing privacy gain while minimizing dependency loss, followed by a local consistency check to reconstruct placeholders. Experimental results demonstrate that this method significantly outperforms current baselines in achieving an optimal trade-off between privacy protection and task performance.
📝 Abstract
Large Language Model (LLM) services introduce a fundamental privacy challenge. Sensitive information may be inferred not only from explicit identifiers, such as names or phone numbers, but also from contextual associations among otherwise innocuous spans. Existing sanitizers typically assign privacy or utility signals to individual spans without explicitly modeling pairwise relationships among them. In this paper, we propose PromptGraph, a graph-guided prompt-sanitization approach for privacy-preserving LLM inference. PromptGraph estimates privacy leakage at the span level and utility-relevant contextual dependencies between pairs of spans. It represents each prompt as an attributed graph, in which nodes carry span-level privacy scores and edges encode contextual dependencies needed to preserve utility. The sanitization objective selects a protected span set that maximizes privacy gain while penalizing the loss of contextual dependencies. This formulation explicitly balances privacy and utility when contextual evidence is hidden. Protected spans are sanitized locally, and returned placeholders are restored only after passing local consistency checks. We conduct extensive experiments showing that PromptGraph achieves a more favorable balance between privacy and utility than prompt-privacy baselines.
Problem

Research questions and friction points this paper is trying to address.

privacy
utility
prompt sanitization
contextual dependencies
LLM inference
Innovation

Methods, ideas, or system contributions that make the work stand out.

graph-guided sanitization
privacy-utility tradeoff
contextual dependency
prompt sanitization
LLM inference
Chen Gu
Chen Gu
Massachusetts Institute of Technology
H
Hui Wan
School of Computer Science and Information Engineering, Hefei University of Technology, Hefei, China
D
Donghui Hu
School of Computer Science and Information Engineering, Hefei University of Technology, Hefei, China
H
Hui Wang
School of Computer Science and Information Engineering, Hefei University of Technology, Hefei, China
Z
Zhuoer Gu
International College Beijing, China Agricultural University, China