TL;DR
AloePri introduces a novel framework called "covariant obfuscation" to protect user privacy during cloud-based LLM inference by jointly transforming input prompts and model weights. It achieves near-zero accuracy degradation and maintains plaintext-level inference efficiency, making it the first practical privacy-preserving solution successfully scaled to massive production models like the 671-billion-parameter DeepSeek-V3.
What Problem Does This Paper Address?
As Language Model as a Service (LMaaS) becomes ubiquitous, clients frequently send highly sensitive data (e.g., medical records or financial transactions) to third-party cloud servers. Traditional privacy-preserving methods fall short in real-world industrial deployments due to three strict constraints:
- Accuracy and Efficiency: Cryptographic approaches like Fully Homomorphic Encryption (FHE) introduce massive computational overheads, sometimes taking minutes to generate a single token.
- Hardware Compatibility: Trusted Execution Environments (TEEs) require specialized hardware, making them incompatible with cloud providers' existing, heterogeneous clusters of legacy GPUs, NPUs, and FPGAs.
- Software Compatibility: Existing data-only obfuscation methods alter data structures, breaking critical engineering optimizations in modern inference engines (like vLLM's KV Cache or SGLang's P/D disaggregation).
Prior token- or embedding-level obfuscation techniques attempt to bridge this gap but suffer from a poor trade-off, often losing over 30% accuracy while remaining vulnerable to inversion attacks that leak more than 50% of user tokens.
Methods
The authors propose covariant obfuscation, a mechanism that applies matching mathematical transformations to both the input data and the model parameters. Because the data and weights are transformed in tandem, the underlying mathematical operations (like matrix multiplications in Attention and Feed-Forward Networks) still yield accurate results, but the cloud server only ever observes encrypted/obfuscated tokens and intermediate states.
AloePri splits this process into two distinct phases:
- Offline Model Obfuscation (Client-Side): The client takes an open-source model and locally applies a secret token-level permutation matrix ($\tau$), injects calibrated Gaussian noise, and applies invertible linear transformations across all model components (Embedding, Attention, FFN, and Model Head). The resulting obfuscated model is then deployed to the cloud server.
- Online Private Inference: During live inference, the client uses the secret permutation to map their prompt tokens to obfuscated token indices before transmission. The cloud server runs the inference using standard, unmodified engines (e.g., vLLM). The server returns an obfuscated response, which the client locally decodes back into plaintext.
To mathematically validate this approach, the authors introduce Rényi-metric Differential Privacy (RmDP), a new formal privacy framework tailored to analyze high-dimensional Gaussian noise without resorting to relaxed privacy definitions.
Datasets
The authors evaluated AloePri across a comprehensive suite of mainstream benchmarks:
- General & Reasoning Tasks: MMLU, C-Eval, and PIQA.
- Code Generation: HumanEval.
- Instruction Alignment: IFEval.
- Classification: SST2.
- Personally Identifiable Information (PII) Protection: The PUPA dataset.
- Token Frequency Leakage Evaluation: CCI3, Huatuo26M-Lite, and MedDialog.
Key Insights and Ideas
- Symmetric Obfuscation Bypasses the Trade-off: Data-only obfuscation inherently destroys semantic consistency. By shifting part of the obfuscation burden onto the model weights, AloePri hides the secret token mapping while preserving the exact structural relationships necessary for accurate text generation.
- Zero-Overhead Architecture Preservation: Because AloePri only alters the values of the weights and not the structure of the model, the obfuscated model remains 100% compatible with existing software frameworks. Cloud providers can reuse all their hard-engineered optimizations (like KV caching) without changing a single line of code in their inference engines.
- Breaking Invariant Attacks: Simple weight permutations can be reversed by attackers sorting and matching weight distributions. AloePri prevents this by mixing permutations with dynamic block-wise shuffling and multi-layer key matrix transformations, effectively neutralizing state-of-the-art internal state inversion attacks.
Key Results
AloePri was thoroughly tested on various models, culminating in an evaluation on the massive DeepSeek-V3.1-Terminus (671B parameters) model:
- Minimal Accuracy Loss: Across all benchmarks, AloePri incurred an accuracy drop of only 0.0% to 3.5% compared to standard plaintext inference.
- Plaintext-Level Efficiency: Online inference benchmarks (measuring Time to First Token and Time Per Output Token) showed that AloePri introduces virtually zero latency overhead, performing identically to plaintext models.
- Robust Security: Against aggressive state-of-the-art inversion and vocabulary-matching attacks, AloePri successfully restricted token recovery to less than 5%, vastly outperforming baseline methods like SGT and DP-Forward.
Limitations and Future Work
Currently, AloePri is designed primarily for text-generative Transformers. While the authors note that its core composition theorems mathematically generalize to other architectures (like CNNs or multi-modal models), these implementations have not yet been empirically validated.
Additionally, the offline phase assumes the client has direct access to the open-source model weights to perform the initial obfuscation. For proprietary, closed-source models, the authors suggest future work could integrate lightweight FHE or TEE setups on the server side to allow the client to obfuscate the weights blindly.
Summary updated