Organizations: University of Houston · The Chinese University of Hong Kong, Shenzhen · Waseda University · Stevens Institute of Technology · National Taiwan University
With the widespread applications of large language models (LLMs), privacy-preserving inference has become increasingly essential for sensitive queries. To balance privacy and utility, a series of lightweight obfuscation approaches has recently been proposed, where users locally transform plaintext embeddings into the fixed ciphertext ones. While such Embedding-to-Embedding Obfuscation (E2EO) schemes demonstrate considerable resilience against traditional token frequency and embedding inversion attacks, the core mechanism behind remains to be the large-scale one-to-one substitution, which provides no cryptographic guarantees. In this paper, we propose Proxy Manifold Alignment (PMA), a novel attack against E2EO in privacy-preserving LLMs. Our key observation is that E2EO schemes keep the original semantic structure, so that the obfuscated vector stream can be regarded as an unknown tokenizer-language whose symbols are the vectors themselves. Therefore, the proposed ciphertext to plaintext reconstruction attack can be formulated as a translation task from the unknown tokenizer-language to plaintext. Specifically, by only accessing the obfuscated vector stream, the target tokenizer and a public corpus, the PMA attack first employs Word2Vec to model the co-occurrence patterns within the obfuscated stream and the public corpus independently, and constructs two proxy vector embeddings. Then, the attack aligns the underlying manifolds of these two embeddings based on structural similarity. Finally, it maps the obfuscated vectors back to plaintext. Experimental results demonstrate that PMA consistently achieves higher plaintext recovery than other state-of-the-art attack methods.
Figures & tables
Figure 1: A typical Embedding-to-Embedding Obfuscation –based privacy-preserving inference scenario. The server only processes the obfuscated embedding stream during inference.
Method
Model Weights
Parallel Data
Strict In-Dist. Aux. Data
Recovery Dependency
KNN
✓
×
×
Emb. Similarity
InvBert
✓
✓
✓
Token-Emb. Map
TFA
×
×
✓
Token Frequency
KNN+SDA
✓
×
×
Emb. Similarity
ERA
✓
×
×
Model Decoder
PMA (Ours)
×
×
×
Semantic Manifold
Table 1: Comparison of attack dependencies and required auxiliary information for existing attacks.
Figure 2: Semantic manifolds induced by obfuscated and plaintext tokenizer-languages. Despite being constructed from different corpora, they exhibit highly similar structures.
Figure 3: Overview of the Proxy Manifold Alignment (PMA) attack. PMA reframes the attack as a translation task. It operates in three phases: (1) constructing proxy semantic spaces, (2) establishing initial anchor alignment, and (3) refining the global mapping. This process ultimately recovers private text from public corpora.
Dataset
Target Model
Vocab Size
Recovery Performance against Different Methods (Metrics: ROUGE-L Top-1/Top-3)
Avg. Time (min)
ObfusLM
SentinelLMs
AlienLM
CodeCipher
STIP
Random
SST-2
BERT (Base)
30k
98.8 89.6/93.4
98.8 89.7/93.5
98.7 89.7/93.5
98.9 89.8/93.4
98.7 89.8/93.5
98.8 89.7/93.5
3.38
Llama-2 (7B)
32k
99.5 94.7/96.2
99.6 94.7/96.3
99.6 94.7/96.3
99.6 94.6/96.3
99.5 94.7/96.3
99.5 94.7/96.3
3.43
T5 (Base)
32k
99.3 93.1/95.3
99.4 93.0/95.4
99.5 93.2/95.4
99.4 93.2/95.5
99.4 93.1/95.3
99.4 93.1/95.4
3.44
RoBERTa (Base)
50k
97.2 80.0/85.7
97.3 80.2/85.4
97.4 80.1/85.5
97.5 80.2/85.3
97.4 80.1/85.5
97.5 80.0/85.3
3.38
Llama-3 (8B)
128k
97.0 78.0/83.5
97.1 77.8/83.5
97.1 77.9/83.6
96.8 77.9/83.4
96.9 77.8/83.4
97.1 77.8/83.6
3.42
Table 2: PMA reveals semantic recoverability under Embedding-to-Embedding obfuscation across different datasets, model architectures, and vocabulary scales.
Figure 4: Emergence of semantic recoverability as the number of observed obfuscated tokens increases.
Dataset
Attack Method
Metrics
ROUGE-L
Top-1
Top-3
SST-2
KNN
24.69
19.98
42.01
TFA
26.30
0.49
1.1
InvBert
35.59
28.14
35.91
KNN+SDA
41.47
–
–
Ours (PMA)
98.80
89.57
93.43
Table 3: Comparison of semantic recovery performance among attacks against a state-of-the-art E2EO method (ObfusLM).
Figure 5: Sensitivity of semantic recoverability to anchor size and refinement rounds in PMA.
Cross General Domain (Metric: ROUGE-L)
(Pub./Priv.)
C4
LMS
RPj
OWT
C4
-
84.8
92.7
98.0
LMS
87.7
-
89.9
84.8
RPj
95.9
83.6
-
97.7
OWT
96.0
80.6
95.1
-
Table 4: Attack performance in the general natural language domain. LMS, RPj and OWT denote LMSYS-Chat-1M, RedPajama and OpenWebText, respectively.
Priv.
Pub.
ROUGE-L
Top-1
Top-3
(i) Cross News Domain
CNN News
C4
93.0
68.1
73.4
(ii) Cross Finance Domain
Hacker News
C4
86.9
36.2
45.2
Hacker News
C4 (Fin.)
94.1
54.1
59.7
(iii) Cross Code Domain
Table 5: Attack performance across specialized domains. C4 (Fin.) denotes the finance subset of C4, and CodeP. denotes CodeParrot.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Private Tokenizer
Attacker Tokenizer
Vocab Size
ROUGE-L
BERT (Base)
T5 (Base)
32k
10.09
RoBERTa (Base)
50k
31.24
Llama-3 (8B)
128k
52.12
BERT (Base)
30k
98.80
Appendix
Table 6: Performance of using different attacker tokenizers to match the private tokenizer.
Metric
Skip-gram
CBOW
GloVe
ROUGE-L
55.03
86.90
83.63
Appendix
Table 7: Recovery performance using different word embedding models for proxy space construction.
Method
ROUGE-L
Time (min)
MUSE
0.03
7.33
VecMap
86.70
64.12
GW
86.90
4.94
Appendix
Table 8: Performance of different alignment strategies in E2EO scenario. (C4 to Hacker News)
Running large language models locally is often impractical, pushing inference on sensitive text to third-party providers. Split inference partially mitigates this by keeping tokens on the client and sending only hidden representations, but these representations can still be recovered via nearest-neighbor search against the public embedding table. We propose an orthogonal obfuscation procedure in which the client multiplies embeddings by a secret orthogonal matrix before transmission. To enable correct inference under arbitrary rotations, we introduce ConjFormer, a transformer variant that is exactly O(d)-equivariant via a lightweight normalization change (scalar RMSNorm) together with blockwise orthogonal conjugation of all linear weights. As a result, the server performs the full forward pass entirely in the rotated basis and never observes unrotated hidden states. Experiments on GPT-2 and Llama 3.2 1B models fine-tuned on PubMed show that orthogonal obfuscation eliminates direct cosine nearest-neighbor inversion and reduces token recovery from over 35% top-10 to at most 1.3%, while increasing perplexity by only 0.4% after fine-tuning. These results indicate that enforcing symmetry at the architectural level can provide a practical defense for privacy-preserving LLM inference without noise injection or heavy cryptographic machinery.
Alexander Yukhimchuk, Andrey Shulga, Mladen Kolar +1
Cloud-based language model services routinely process prompts containing sensitive information. Obfuscation-based defenses---including ObfusLM, SentinelLMs, TextObfuscator, and DPNR---mitigate this risk by transforming prompt representations before transmission, offering a lightweight alternative to cryptographic solutions. We show these defenses provide far less protection than previously believed. We present DeepInvert, a semi-supervised embedding inversion attack that recovers original tokens from obfuscated representations with higher accuracy than prior methods. The key insight is that unlabeled obfuscated embeddings retain exploitable semantic structure despite perturbation. DeepInvert combines supervised training on labeled shadow data with a novel unsupervised consistency objective over unlabeled target embeddings, alternating between the two via a mixed training pipeline. Defense-aware adaptations further extend the attack to diverse obfuscation mechanisms across encoder-based and autoregressive architectures. Experiments on nine defenses, five tasks, and four model architectures show that DeepInvert outperforms prior attacks on most defenses. Against ObfusLM, DeepInvert achieves 73.5% top-1 token recovery versus 26.2% for the previous best. Our results reveal a task-dependent tension: obfuscation schemes preserving enough signal for utility also retain sufficient structure for inversion, while schemes resisting inversion collapse utility. On simpler classification tasks, some DP-based defenses can maintain both. We call for a re-evaluation of this defense class.
The rapid development of large language models (LLMs) has driven the widespread adoption of cloud-based LLM inference services, while also bringing prominent privacy risks associated with the transmission and processing of private data in remote inference. For privacy-preserving LLM inference technologies to be practically applied in industrial scenarios, three core requirements must be satisfied simultaneously: (1) Accuracy and efficiency losses should be minimized to mitigate degradation in service experience. (2) The inference process can be run on large-scale clusters consist of heterogeneous legacy xPUs. (3) Compatibility with existing LLM infrastructures should be ensured to reuse their engineering optimizations. To the best of our knowledge, none of the existing privacy-preserving LLM inference methods satisfy all the above constraints while delivering meaningful privacy guarantees. In this paper, we propose AloePri, the first privacy-preserving LLM inference method for industrial applications. AloePri protects both the input and output data by covariant obfuscation, which jointly transforms data and model parameters to achieve better accuracy and privacy. We carefully design the transformation for each model component to ensure inference accuracy and data privacy while keeping full compatibility with existing infrastructures of Language Model as a Service. AloePri has been integrated into an industrial system for the evaluation of mainstream LLMs. The evaluation on Deepseek-V3.1-Terminus model (671B parameters) demonstrates that AloePri causes accuracy loss of 0.0%~3.5% and exhibits efficiency equivalent to that of plaintext inference. Meanwhile, AloePri successfully resists state-of-the-art attacks, with less than 5% of tokens recovered. To the best of our knowledge, AloePri is the first method to exhibit practical applicability to large-scale models in real-world systems.