BiShield-TEE: On the (In-)Security of Unilateral Weight Obfuscation in On-Device TEE-Shielded LLM Partition
Organizations: Department of Computer Science and Technology, Beijing National Research Center for Information Science and Technology, Tsinghua University, Beijing, China · Zhongguancun Laboratory, Beijing, China · University of Illinois Urbana-Champaign, IL, USA
Abstract
On-device deployment of large language models (LLMs) is increasingly adopted due to latency and privacy requirements, but exposes proprietary models to reverse engineering and intellectual property theft. Trusted Execution Environments (TEEs) provide hardware-enforced isolation for on-device inference, yet most TEE-based parameter obfuscation relies on unilateral matrix transformations that obfuscate only the output side. We identify a vulnerability in this design, termed the Solution Determinacy Property (SDP): the obfuscation secret is uniquely determined, exposing the structure of the true key and enabling attackers to break the protection. Under our attacks, representative methods GroupCover and ArrowCloak are reduced to negligible protection, with attack accuracy reaching over 2.4 times the full-shielding black-box baseline and recovering near-complete model functionality. To address this vulnerability, we propose BiShield-TEE, a bilateral framework that induces Ambiguous Solutions through joint obfuscation of input and output dimensions, hiding the true key among many equally valid candidates. Experiments across diverse models and datasets show that BiShield-TEE confines attack accuracy to the full-shielding black-box baseline, while achieving higher inference efficiency than prior methods on real hardware. Our code is available at https://github.com/laduiw/BiShield-TEE.
Figures & tables
| Paradigm | Method | Venue | Mechanism | SDP-free |
| Unilateral Per-vector | SOTER Shen et al. (2022) | ATC’22 | Per-vector scaling | ✗ |
| ShadowNet Sun et al. (2023) | S&P’23 | Per-vector scaling + permutation | ✗ | |
| TLG Li et al. (2024) | MM’24 | Per-vector permutation | ✗ | |
| TSQP Sun et al. (2025b) | S&P’25 | Quantized per-vector scaling | ✗ | |
| Unilateral mul. | GroupCover Zhang et al. (2024a) | ICML’24 | Group columns, mix within group | ✗ |
| Unilateral add. | ArrowCloak Wang et al. (2025) | USENIX Sec’25 | Add shared mask to all columns | ✗ |
| Model | Dataset | TLG | GroupCover | ArrowCloak | White-box | Black-box | ||||
| Our Attack | Rel. Black | Our Attack | Rel. Black | Our Attack | Rel. Black | Acc. | Rel. Black | |||
| ViT-Base | CIFAR-10 | 98.4% | 98.4% | 98.5% | 98.1% | 63.4% | ||||
| CIFAR-100 | 90.5% | 90.6% | 90.0% | 90.9% | 59.7% | |||||
| FOOD-101 | 87.9% | 85.6% | 84.9% | 83.4% | 59.2% | |||||
| ViT-Large | CIFAR-100 | 91.8% | 91.8% | 91.1% | 91.6% | 68.8% | ||||
| FOOD-101 | 88.9% | 86.9% | 85.9% | 85.5% | 65.3% | |||||
| Setting | ViT-Base | ViT-Large | GPT2-Base | Llama3.2-1B | Llama3.2-3B | ||||||||
| C10 | C100 | F101 | C100 | F101 | SST2 | QQP | QNLI | MNLI | GSM8K | IFEVAL | GSM8K | IFEVAL | |
| Original | 98.1% | 90.9% | 83.4% | 91.6% | 85.5% | 92.4% | 88.1% | 86.7% | 80.8% | 35.5% | 54.6% | 64.4% | 73.5% |
| Obfuscated | 98.1% | 90.9% | 83.4% | 91.6% | 85.5% | 92.4% | 88.1% | 86.7% | 80.8% | 35.5% | 54.6% | 64.4% | 73.5% |
| Scheme | ViT-Base | ViT-Large | GPT2-Base | Llama3.2-1B | Llama3.2-3B | Mean Ratio |
| GroupCover | ||||||
| ArrowCloak | ||||||
| BiShield-TEE |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Modality | Dataset | Victim Train | Surrogate Train | Ratio |
| Vision | CIFAR-10 | 50,000 | 20 | 0.04% |
| CIFAR-100 | 50,000 | 200 | 0.40% | |
| Food-101 | 75,750 | 379 | 0.50% | |
| Language | SST-2 | 67,349 | 134 | 0.20% |
| QQP | 363,846 | 181 | 0.05% | |
| QNLI | 104,743 | 273 | 0.26% |
| Stage | Model | Learning Rate | Batch Size | Epochs |
| Victim | ViT-Base | 128 | 5 | |
| ViT-Large | 128 | 3 | ||
| GPT2-Base | 128 | 3 | ||
| Surrogate | ViT | 32 | 10 | |
| GPT2-Base | 16 | 10 |
| Model | Batch Size | Sequence Length |
| ViT-Base | 1 | 197 |
| ViT-Large | 1 | 197 |
| GPT2-Base | 2 | 64 |
| Llama3.2-1B | 2 | 64 |
| Llama3.2-3B | 2 | 64 |
| Scheme | ViT-Base | ViT-Large | GPT2-Base | Llama3.2-1B | Llama3.2-3B |
| GroupCover | 3.80 | 10.13 | 3.80 | 11.25 | 24.94 |
| ArrowCloak | 2.53 | 6.75 | 2.53 | 7.69 | 17.06 |
| BiShield-TEE | 2.06 | 5.39 | 2.00 | 6.33 | 14.03 |
| Model | Dataset | Black-box | H-only | Scale+H | ||
| Acc. | Acc. | Rel. Black | Acc. | Rel. Black | ||
| ViT-Base | CIFAR-10 | 63.4% | 68.11% | 63.6% | ||
| CIFAR-100 | 59.7% | 72.62% | 59.7% | |||
| Food-101 | 59.2% | 68.96% | 59.2% | |||
| ViT-Large | CIFAR-100 | 68.8% | 81.23% | 68.8% | ||
| Food-101 | 65.3% | 74.90% | 65.3% | |||
LLM Security
Large language model (LLM) security studies attacks, privacy risks, and defenses across model training, inference, and deployment.
See all 318 papers