OSNIP: Balancing the Privacy-Utility-Efficiency Trilemma in LLM Inference via Obfuscated Semantic Null Space
Abstract
We propose Obfuscated Semantic Null Space Injection for Privacy (OSNIP), a lightweight client-side encryption framework for privacy-preserving LLM inference. Generalizing the geometric intuition of linear kernels to the high-dimensional latent space of LLMs, we formally define the ``Obfuscated Semantic Null Space'', a high-dimensional regime that preserves semantic fidelity while enforcing near-orthogonality to the original embedding. By injecting perturbations that project the original embedding into this space, OSNIP ensures privacy without any post-processing. Furthermore, OSNIP employs a key-dependent stochastic mapping that generates distinct perturbations under fresh keys. Evaluations on generative and classification benchmarks show that OSNIP achieves state-of-the-art performance, sharply reducing attack success rates while maintaining strong model utility under strict security constraints.
Lay Summary
Modern AI assistants are often run as cloud services, which means users may need to send sensitive text to an outside provider. This creates a privacy problem: how can people use powerful language models without exposing personal or confidential information? Existing protections often slow the system down, reduce answer quality, or require extra recovery steps after the model runs. Our paper introduces a lightweight way to protect user prompts before they are sent to the model. The idea is to transform the prompt on the user’s device so that it becomes hard for an attacker to recover the original text, while still allowing the model to understand it and respond correctly. The same prompt can also be transformed in different ways using different keys, making recovery even harder. Across a wide range of tests, our method greatly reduces privacy attacks while keeping response quality and speed close to the original model. This could help make cloud-based AI safer for applications involving personal, medical, financial, or legal information.