Manuscript Offprint

arXiv:2610.22800

Veil-Then-Reveal: Protecting PII Privacy via Reversible Pseudo-Anonymization in Zero-Trust User--LLM Interaction

Mohamed Shaaban, Mohamed Elmahallawy, Thomas E. Carroll

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

Large language models (LLMs) increasingly process sensitive documents and personal information, yet sending prompts containing personally identifiable information (PII) to remote providers exposes data subjects and organizations to risks from logging, retention, model training, and unintended disclosure. Existing anonymization methods often mask or remove PII, while conventional encryption eliminates the lexical and structural cues needed for effective LLM processing. We present Veil-then-Reveal (VTR), a user-side PII pseudo-anonymization framework for privacy-preserving LLM interaction under a zero-trust threat model. VTR treats remote LLM providers as untrusted and sends only pseudo-anonymized prompts, keeping plaintext PII on the user. VTR first detects PII and replaces it with realistic, same-type, invocabulary surrogates before prompts leave the user's device, preserving their linguistic and structural properties. It combines format-preserving encryption (FPE) for structured PII, such as phone and credit-card numbers, with a keyed-hash dictionary and secure vault for semantic PII, such as names, locations, and organizations. Session-specific mappings provide cross-session unlinkability, while user-side restoration reversibly replaces surrogates with their original values in LLM responses. We further introduce a rank-class FPE strategy for dates that preserves format and ambiguity while reducing cipher evaluations. Evaluation on three datasets containing 11,322 annotated PII instances achieves 97.9% detection recall, 95.2% protection of detected values, and 99.9% round trip; 100% of echoed surrogates end-to-end round-trip restoration.

1 Introduction

Large language models (LLMs) increasingly process sensitive documents containing personally identifiable information (PII). Sending raw PII to remote LLM providers creates substantial privacy risks: prompts may be logged, retained, exposed through model outputs, or exploited to recover sensitive information (Das et al., 2025; Cheng et al., 2026). Recent incidents further demonstrate that even widely deployed LLM services can expose user data (OpenAI, 2023). These risks motivate a fundamental question: how can users leverage remote LLMs without revealing their raw PII?

Existing defenses largely rely on redaction or anonymization, but removing PII can destroy context-critical information needed for accurate inference (Asthana et al., 2025). Simple pseudonymization can also leave indirect identifiers that enable re-identification (Boutet et al., 2025), while masking alone does not prevent sensitive information from resurfacing through retrieval or memory mechanisms (Ma et al., 2026). Recent approaches such as PrivacyRestore (Zeng et al., 2025) and SecureGate (Shaaban and Elmahallawy, 2026) explore reversible or selective protection, but introduce additional model-side mechanisms, training, or communication overhead.

We present Veil-then-Reveal (VTR), a user-side PII pseudo-anonymization framework that enables user-LLM interaction under a zero-trust threat model. Instead of deleting sensitive values, VTR first detects PII and then replaces each instance locally with realistic, same-type surrogates, allowing the remote LLM to operate on structurally and semantically meaningful text while never receiving the original PII. VTR integrates Format-Preserving Encryption (FPE) for structured identifiers with keyed semantic substitution for contextual entities. Original PII values and mappings remain exclusively on the user, enabling exact restoration after inference and session-specific unlinkability.

A key novelty is our rank-class FPE for dates. Unlike digit-wise encryption, which can produce invalid dates or destroy inherent date ambiguity, rank-class FPE encrypts a date within the set of legal interpretations admitted by its rendering. This preserves both syntactic validity and ambiguity while reducing the encryption overhead by 410–730×. In summary, our key contributions are:

• We propose VTR, a reversible, user-side pseudo-anonymization framework that keeps raw PII outside the boundary of a remote LLM while preserving useful prompt context and model utility.

• We develop a hybrid protection design combining FPE with keyed semantic token substitution, using user-only mappings and session-specific surrogates to provide cross-session unlinkability.

• We propose rank-class FPE for dates, retaining valid formatting and temporal ambiguity while markedly reducing encryption cost and improving valid-date generation from 0.3% to 88.4%.

• We evaluate VTR on three datasets containing four corpora, including 10,000 ai4privacy documents with 11,322 annotated PII instances across 8 PII types, achieving 97.9% detection recall, 95.2% protection of detected values, and 99.9% exact round-trip restoration. The results show that residual exposure is governed by detection recall rather than transformation failures.

References (13)