acceptodds
Under review as a conference paper at ICLR 2027

Anamorph: A Secure and Efficient TEE-Shielded Obfuscation Scheme for On-Device LLM Inference

Abstract

Deploying large language models on untrusted devices poses a risk of model weight leakage, and Trusted Execution Environment (TEE)-based model obfuscation provides a practical solution for protecting model weights. The state-of-the-art lightweight defense based on dense orthogonal matrices can effectively resist cosine-similarity-based analysis attacks while reducing TEE-side computation. However, we identify a key vulnerability in existing lightweight obfuscation schemes: statistical similarity between private fine-tuned models and public pretrained models. Furthermore, we find that the problems of estimating secret transformation matrices in multiple existing obfuscation schemes can be reduced to orthogonal Procrustes problems. Based on these observations, we propose ORTHOTRACE, a novel attack that exploits the correspondence between public pretrained weights and exposed obfuscated weights to estimate secret transformation matrices, thereby compromising multiple obfuscation mechanisms, including the state-of-the-art lightweight defense. To mitigate this vulnerability, we propose ANAMORPH, a novel obfuscation scheme that combines parameter-dimension expansion with the injection of random masks satisfying null-space constraints to perturb the orthogonal estimation relationships exploited by ORTHOTRACE. These masks vanish automatically during authorized inference, reducing the need to enter the TEE for layerwise mask correction and maintaining lightweight TEE computation while ensuring model security. We evaluate ORTHOTRACE and ANAMORPH on four representative models and eight datasets. Experimental results show that ORTHOTRACE compromises multiple existing lightweight obfuscation schemes, recovering models with task performance close to the no-protection baseline, with the task recovery rate exceeding % for each scheme. ANAMORPH demonstrates effective defense against existing similarity-based analysis attacks and ORTHOTRACE while preserving authorized-inference utility, and achieves up to a speedup in time to first token (TTFT) compared with an effective defense scheme that requires layerwise correction on real SGX hardware.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Large Language Models, Secure Inference, Trusted Execution Environments, Model Protection

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_VK8xOpenReview ↗
Rating
2
Confidence
4
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

The paper presents ORTHOTRACE, an attack from public pretrained weights by orthogonal analysis. Correspondingly, ANAMORPH is proposed as a defence. It includes dimension expansion with random masks that cancel during authorized inference. The results show strong recovery compared with five prior schemes and lower inference cost.

Critical strengths
  1. The attack identifies a meaningful limitation of orthogonal obfuscation. its useful advance is global alignment and its demonstrated effectiveness against SLIM.

  2. The null space constraints of the proposed defence allow masks to cancel without correction inside the TEE at every layer. This addresses an important source of inference overhead.

Critical weaknesses
  1. I think the security analysis does not address exposed runtime information. Appendix C defines a fixed linear authorization map, If a traces provide sufficient rank, an attacker could estimate this composite map and emulate the authorization step. Appendix D places the classification output outside the TEE, which makes this issue more significant.

  2. The attack evaluation does not isolate the benefit of exposed weights. Table 2 should include the public pretrained model after adaptation with the same query budget. Figure 3 provides this baseline for the ANAMORPH defense experiment, but the main attack comparison lacks it.

  3. The paper motivates deployment on user controlled edge devices, but all experiments use a Xeon server with an RTX 5090. The missing evaluation on mobile devices or another platform with comparable resource constraints makes practical feasibility unclear. In particular, the paper does not establish whether the required TEE access, GPU communication, and memory footprint are compatible with the intended devices.

Questions for authors
  1. If an attacker can observe what enters and leaves the TEE, could they recover the authorization map in Appendix C?

  2. How much better is ORTHOTRACE than the public pretrained model fine tuned with the same query budget?

  3. Can author test the proposed method in several mobile phones as well?

Reviewer_2BykOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper investigates model extraction attacks targeting TEE-assisted weight obfuscation. ORTHOTRACE integrates public pretrained weights, orthogonal Procrustes alignment, and query-based fine-tuning to reconstruct surrogate models. ANAMORPH employs dimensional expansion and null-space masks that cancel each other out during authorized inference, eliminating the need for layerwise mask correction within the TEE. The evaluation covers multiple models and tasks, showing that ORTHOTRACE compromises several existing defenses, while ANAMORPH withstands the evaluated attacks and incurs lower inference overhead than ArrowCloak.

Critical strengths
  1. ORTHOTRACE presents a well-motivated and effective attack against current obfuscation defenses.
  2. ANAMORPH offers an efficient obfuscation approach that avoids layerwise mask correction within the TEE.
Critical weaknesses
  1. The evidence is insufficient to support ANAMORPH’s security claims. See Q1.
  2. The correctness argument does not sufficiently cover the architectures used in the experiments. See Q2.
Questions for authors

The encoded residual activations lie in the subspace defined by HH. This raises a concern that GPU-visible activations could reveal this subspace. Such information could help an attacker remove the corresponding null-space masks and align the remaining weights with a public checkpoint. Are these activations observable to attackers under the stated threat model?

Equations (7)–(8) raise a related concern: (Wq′)⊤H=(D1Wq)⊤(W_q')^\top H = (D_1 W_q)^\top. Since HH is shared across layers, these relations could potentially allow joint estimation of HH, using public pretrained weights as approximate regression targets. Could the authors clarify how ANAMORPH addresses this potential estimation route and whether it affects the claimed model protection?

Gemma 3 uses both pre- and post-normalization. The derivation in Section 5 and Appendix B describes a pre-normalized block. How are Gemma 3’s post-attention and post-FFN normalization layers handled in the implementation?

What constraints on π\pi ensure the validity of the nonlinear steps in Eq. (14)? How is PP constructed so that Eq. (13) remains valid for multi-head attention?

Reviewer_FQb9OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
1
Read review
Paper summary

The paper addresses protecting model weights on user devices with TEE-shielded obfuscation. First, it proposes OrthoTrace, an attack that treats several existing schemes (ShadowNet, Tempo, TransLinkGuard, CoreGuard, Slim) as orthogonal transforms of the weights. Because private models are fine-tuned from public ones, the attack recovers the secret transform by solving an orthogonal Procrustes problem against the public weights. It restores over 95% of task performance for all five schemes. Second, it proposes Anamorph, which lifts the weights to a slightly larger dimension and adds random masks in a null space so that they cancel during authorized inference. It needs only O(1) TEE calls per forward pass and is much faster than ArrowCloak.

Critical strengths
  1. The attack is useful. Showing that one simple Procrustes step breaks five published schemes, including the most recent lightweight one, is a clear and practical message for this line of work.
Critical weaknesses
  1. The defense is only tested against the paper's own attack and ArrowMatch, and a natural adaptive attack is not considered. The lifting matrix H is shared across layers, and the GPU sees hidden states of the form xH^T, which lie in the column space of H. Collecting a few of them would reveal that subspace. Since the masks satisfy H^T Mask = 0, projecting the exposed weights onto this subspace would appear to remove the masks completely and reduce the problem back to OrthoTrace. If this works, the defense does not stand. There is also no security argument beyond the experiments, and only one expansion size (s = 32) is tested.

  2. More broadly, this is another round of the scheme-attack-scheme cycle in lightweight linear obfuscation, which has no formal hiding guarantee to begin with. A more lasting contribution would be a security definition, or a result showing what is or is not achievable when the attacker holds the public base model.

Questions for authors
  1. Can an attacker estimate span(H) from the hidden states visible on the GPU and project out the masks? If not, why not? This is the main question for my score.

  2. Is H the same across layers? How does security change with s?

  3. Have you evaluated open-ended generation tasks, not only classification and short-answer tasks?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.