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

· Source: Artificial Intelligence · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cybersecurity & Data Privacy · Depth: Expert, quick

Summary

PromptGraph is a novel graph-guided prompt-sanitization approach designed to balance privacy and utility during Large Language Model (LLM) inference. Addressing the challenge where sensitive information can be inferred from both explicit identifiers and contextual associations, PromptGraph explicitly models pairwise relationships among prompt spans, a limitation of existing sanitizers. It represents each prompt as an attributed graph, where nodes carry span-level privacy scores and edges encode contextual dependencies crucial for utility. The system's sanitization objective selects a protected span set to maximize privacy gain while minimizing the loss of these contextual dependencies. Protected spans undergo local sanitization, with placeholders restored only after passing local consistency checks. Experiments demonstrate that PromptGraph achieves a more favorable balance between privacy and utility compared to current prompt-privacy baselines.

Key takeaway

For AI Security Engineers or ML Engineers developing privacy-preserving LLM applications, PromptGraph offers a critical shift in how you approach prompt sanitization. You should move beyond simple span-level privacy signals and explicitly model contextual dependencies between prompt elements. This graph-guided method allows you to achieve a superior balance between protecting sensitive user data and maintaining the utility of LLM responses, preventing unintended information leakage from associations. Consider integrating graph-based analysis into your sanitization pipeline.

Key insights

PromptGraph balances LLM inference privacy and utility by modeling contextual dependencies between prompt spans via graph representation.

Principles

Method

Represent prompts as attributed graphs with privacy scores on nodes and contextual dependencies on edges. Select a protected span set to maximize privacy gain while penalizing contextual dependency loss. Sanitize locally and restore placeholders after consistency checks.

In practice

Topics

Best for: Research Scientist, CTO, VP of Engineering/Data, AI Scientist, Machine Learning Engineer, AI Security Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.