[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-86010-en":3,"doc-seo-86010-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":11,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},86010,1099514067415,"Rowan","https://ap-avatar.wpscdn.com/avatar/100002539d78ffe74a7?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779092875211072502",8,"Research & Report","PromptGraph Graph-Guided Prompt Sanitization for Balancing Privacy and Utility in LLM Inference","Large Language Model (LLM) inference via remote prompt–response exposes private data not only through explicit identifiers but also through contextual associations among otherwise harmless spans. Existing sanitizers typically score privacy or utility at the span level without modeling pairwise contextual relationships. PromptGraph introduces graph-guided prompt sanitization that estimates span-level privacy leakage and edge-level contextual dependencies, selecting protected spans to maximize privacy gain while penalizing utility loss. Sanitized spans are locally processed and placeholders restored after local consistency checks, yielding improved privacy–utility trade-offs.","PromptGraph: Graph-Guided Prompt Sanitization for Balancing Privacy and Utility in LLM Inference  \nChen Gu, Hui Wan, Donghui Hu, Hui Wang, and Zhuoer Gu  \narXiv :2607 . 10709v 1 [ cs .CR] 12 Jul 2026  \nAbstract—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 spanlevel 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.  \nIndex Terms—Prompt sanitization, privacy-preserving inference, large language models, graph-guided selection.  \nI. INTRODUCTION  \nCloud Large Language Models (LLMs) are widely deployed through a prompt–response workflow, in which users submit prompts to remote servers and receive generated outputs [1] . Although this paradigm makes foundation models broadly accessible, it requires prompt content to be disclosed during each remote inference request [2] . Such prompts may contain sensitive information, including personal attributes and account credentials. Consequently, prompts transmitted to remote LLM servers may expose users’ private information.  \nPrior work has explored several strategies for reducing privacy leakage in prompts. Differentially private text sanitization [3], [4] perturbs tokens or representations to limit disclosure. However, these classical perturbation methods are not primarily designed for prompt workflows that require local restoration after generation. Prompt sanitization methods instead protect the input before cloud inference. HaS [5] hides private entities locally and restores anonymized responses after generation. InferDPT [6] studies privacy-preserving inference for black-box LLMs through perturbation and extraction. DPOPT [7] investigates a related but distinct prompt optimization  \nChen Gu, Hui Wan, Donghui Hu, and Hui Wang are with the School of Computer Science and Information Engineering, Hefei University of Technology, Hefei, China (e-mail: [guchen@hfut.edu.cn](guchen@hfut.edu.cn); [wanhui@mail.hfut.edu.cn](wanhui@mail.hfut.edu.cn);  \n[hudh@hfut.edu.cn](hudh@hfut.edu.cn); [wanghui@hfut.edu.cn](wanghui@hfut.edu.cn)).  \nZhuoer Gu is with International College Beijing, China Agricultural University, China (e-mail: [guzhuoer@cau.edu.cn](guzhuoer@cau.edu.cn)).  \n\n|  | Masking\u003Cbr> |  |\n| --- | --- | --- |\n|  |  |  |\n\nFig. 1: Context-coupled privacy risks of independent spansanitization. Under-sanitization may mask an explicit value while leaving contextual cues that support sensitive-attribute inference, whereas over-sanitization may remove task-relevant relations and leave the prompt underspecified for downstream LLM inference.  \nsetting under differential privacy. Closer to our setting, ProSan [8] balances privacy leakage risk with word importance, while ALSA [9] considers privacy leakage risk, contextual information importance, and task relevance when assigning anonymization actions. These stu","cbCaimPECoRGyS2z","https://ap.wps.com/l/cbCaimPECoRGyS2z","pdf",729960,5,1,"English","en",105,"# Abstract\n# Introduction","[{\"question\":\"What privacy risk does PromptGraph address in LLM prompting?\",\"answer\":\"It targets privacy leakage that can be inferred from contextual associations among spans, even when explicit identifiers are absent.\"},{\"question\":\"How does PromptGraph represent prompts to balance privacy and utility?\",\"answer\":\"It represents each prompt as an attributed graph where nodes carry span-level privacy scores and edges encode contextual dependencies required to preserve utility.\"},{\"question\":\"What is the sanitization objective in PromptGraph?\",\"answer\":\"It selects a protected span set that maximizes privacy gain while penalizing the loss of contextual dependencies, so hidden evidence does not excessively break downstream inference.\"}]",1784207767,20,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"promptgraph-graph-guided-prompt-sanitization-for-balancing-privacy-and-utility-in-llm-inference","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/promptgraph-graph-guided-prompt-sanitization-for-balancing-privacy-and-utility-in-llm-inference/86010/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-26","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What privacy risk does PromptGraph address in LLM prompting?","Question",{"text":75,"@type":76},"It targets privacy leakage that can be inferred from contextual associations among spans, even when explicit identifiers are absent.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does PromptGraph represent prompts to balance privacy and utility?",{"text":80,"@type":76},"It represents each prompt as an attributed graph where nodes carry span-level privacy scores and edges encode contextual dependencies required to preserve utility.",{"name":82,"@type":73,"acceptedAnswer":83},"What is the sanitization objective in PromptGraph?",{"text":84,"@type":76},"It selects a protected span set that maximizes privacy gain while penalizing the loss of contextual dependencies, so hidden evidence does not excessively break downstream inference.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,109,114,119,122,126,129,133],{"id":21,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":20,"doc_module":4,"doc_module_name":45,"category_name":106,"show_sort_weight":107,"slug":108},"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":45,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":45,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":120,"slug":121},30,"research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":28,"slug":125},9,"Religion & Spirituality","religion-spirituality",{"id":28,"doc_module":4,"doc_module_name":45,"category_name":127,"show_sort_weight":28,"slug":128},"World Cup","world-cup",{"id":130,"doc_module":4,"doc_module_name":45,"category_name":131,"show_sort_weight":130,"slug":132},10,"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":45,"category_name":135,"show_sort_weight":20,"slug":136},19,"General","general"]