When interacting with powerful, cloud-based Large Language Models (LLMs) or translation services, users often face a "privacy-utility trade-off." Sharing sensitive data—like names, addresses, or proprietary business information—improves the relevance of the AI's response but risks data leakage.
A growing body of research proposes a "User-Side Realization" paradigm Ryoma Sato. Instead of trusting the service provider, users can employ a local, client-side workflow that sanitizes text before it leaves their device and restores it once the response returns.
The Substitution-Restoration Workflow
The core mechanism, often referred to as text sanitization or placeholder substitution, involves three distinct steps:
- Sanitization (Hide): A local, smaller model or a rule-based system identifies sensitive entities (NER) and replaces them with placeholders or fictitious substitutes.
- Remote Processing: The sanitized text is sent to a powerful remote model (e.g., GPT-4 or Gemini Ultra). Because the structure and logic of the sentence remain intact, the remote model can still perform complex reasoning or translation.
- Restoration (Recover): Once the remote model returns the processed text, a local module uses a stored mapping to swap the placeholders back for the original sensitive values.
This approach, exemplified by frameworks like PP-TS Zhigang Kan et al. and PRIV-QA Guangwei Li et al., ensures that the cloud provider never sees the actual private identifiers, while the user receives a fully personalized and contextually accurate output.
Preserving Utility through Structural Integrity
The intuition behind why this works lies in structural preservation. If you simply redact information (e.g., "I live in [REDACTED]"), the remote model loses the grammatical and logical context needed to provide a high-quality response.
To solve this, researchers use "syntactic-preserving" or "semantic-similar" substitutes:
- Syntactic Preservation: Ryoma Sato demonstrates that replacing sensitive words with dummy tokens of the same part-of-speech allows machine translation services to maintain high accuracy.
- Semantic Substitution: In PRIV-QA, sensitive entities are replaced with fictitious substitutes of the same category (e.g., replacing "London" with "Paris"). This allows the remote model to maintain a coherent reasoning chain, as the logical relationships between entities remain valid Guangwei Li et al..
Applications Across Domains
This research direction has been applied to several specialized fields to handle sensitive data:
- Machine Translation: The PRISM framework allows users to use services like Google Translate without exposing private terms by performing the substitution-restoration entirely on the user's device Ryoma Sato.
- Software Engineering: Models like TRRGen and RRGen use placeholders for user IDs and emails when generating responses to app reviews, preventing the model from "hallucinating" or memorizing private information during training Weizhe Zhang et al.; Cuiyun Gao et al..
- Database Queries: Ask Safely generates complex Cypher queries for knowledge graphs by sending only the schema and masked questions to an LLM, re-inserting sensitive values locally before execution Jordi Cabot and Mauro Dalle Lucca Tosi.
- Financial and Medical Data: Datasets like CO-Fun (financial outsourcing) and MedDialog-FR (women's health) use these substitution strategies to create high-utility research benchmarks while strictly protecting institutional and patient privacy Neda Foroutan et al.; Xingyu Liu et al..
By moving the "recovery" logic to the client side, tools like the Rescriber browser extension enable users to interact with chatbots with a "what-you-see-is-what-you-get" privacy layer, building trust through local control Jijie Zhou et al..