Inference systems · Research feature

SpliTEE: Fast and Private LLM Inference by Coupling GPU-Assisted Trusted Execution Environments with Differential Privacy

Researchers developed a method using differential privacy to protect user prompts during AI model inference, balancing speed and security by splitting computation between a trusted environment and a GPU.

Adapted from research by Shashie Dilhara Batan Arachchige, Robin Carpentier, Hassan Jameel Asghar and colleagues.

arXiv preprint revision · 2026-10-06 · Attribution & reuse
In this article
Editorial illustration of processor die.

Editor’s introduction

The study evaluates a split-inference architecture where large language model (LLM) processing is divided between a trusted execution environment (TEE) and an untrusted GPU. The team tested this approach on 500 prompts from the Dolly dataset, measuring reconstruction accuracy via token precision, recall, F1-score, and semantic similarity. Results show that even with knowledge of the DP mechanism, reconstructed prompts contain no more information than unrelated prompts. A key finding is that DP noise can introduce floating-point errors, which are bounded by the privacy parameter epsilon. The method achieves faster inference than fully TEE-based processing and outperforms prior encryption-based systems like Slalom in both speed and accuracy.

Introduction

Additionally, collection of vast amounts of personal data by LLM service providers can raise significant concerns, as this data can be sold to advertisers to manipulate what people buy, shared with third parties to manipulate what people think, or compromised and leaked to malicious actors. Depending on the provider’s jurisdiction, data sovereignty concerns may also arise as governments can request access to this data, even when it’s stored overseas, and may use it for mass surveillance programs of the population.

A simple solution for private LLM inference would be to deploy LLMs locally on users’ devices. However, this deployment model is not suitable for LLM service providers who want to protect their intellectual property, i.e., the learned weights of the model, which is the case for the current best-performing LLMs. Moreover, hosting such models locally is infeasible due to their substantial computational requirements. Other solutions for private LLM inference include modifying the prompt to remove sensitive information, or carrying out LLM inference in the encrypted domain using homomorphic encryption or secure multiparty computation. Modifications of the prompt can be performed automatically. For example, a differentially private solution probabilistically replaces either individual words or sentences in the prompt with semantically similar counterparts (see, for example ). This is not ideal for utility as it perturbs words in the prompt which may result in lower result quality and, depending on the task, the user may want to keep the text in the prompt unchanged, e.g., specific sales numbers in an Information Extraction task. Cryptographic solutions through homomorphic encryption and secure multiparty computations are computationally or communication-wise expensive, require changes to the LLM to make it more suitable for cryptographic operations, and some part of the LLM computation is assumed to be done publicly, e.g., by the client.

Another solution, which is also related to the theme of this paper, is to execute the LLM inside a trusted execution environment (TEE). The service provider hosts the LLM within the TEE, with the guarantee that computations performed inside the TEE can neither be observed nor be tampered with by the service provider. These are standard assumptions for computations performed within a TEE. Unfortunately, end-to-end inference within the TEE is slow, as current TEEs are primarily CPU-based which are significantly slower than GPUs for LLM inference. While the first commercial GPU-TEE was released recently, specifications are scarce and the threat model is weaker.

TEE-Assisted Private LLM Inference

Slalom is one of the earliest approaches to combine a TEE with an untrusted GPU for private and verifiable neural-network inference. Instead of executing the complete model inside the TEE, it outsources expensive linear operations while masking their inputs with a random mask. The corresponding correction is precomputed inside the TEE so that the original linear result can be recovered after GPU execution. Slalom also uses Freivalds’ algorithm to verify the correctness of the outsourced computation. Our approach differs in both the masking mechanism and execution setting. Slalom uses pseudorandom masks over finite-field representations, whereas our approach adds differentially private noise. Slalom was designed for conventional Deep Neural Networks (DNNs) and evaluated using Intel SGX, while our work considers transformer-based LLM inference inside an Intel TDX virtual machine. We further show that our system is better at maintaining the accuracy of LLM responses, as we do not quantize the model which is required in Slalom-based LLM inference.

SOTER also partitions neural-network inference between a TEE and an untrusted accelerator to reduce the cost of executing the complete model inside trusted hardware. Its main objective, however, is to protect the intellectual property of the model when inference is performed on a user device. SOTER identifies associative operators and transforms their parameters by multiplying them with a random scalar mask before outsourcing the operator to the untrusted GPU; the intended result is then recovered inside the TEE using the corresponding inverse scaling. We could adapt their technique to our use case by multiplying intermediate inputs with a vector of random scalars, but this exacerbates the floating-point issues discussed in our paper. Furthermore, SOTER considers more general neural-network models instead of Transformer-based LLMs, which has a broader set of operations that must be protected.

TwinShield addresses confidential execution of transformer models in an untrusted cloud environment. It aims to protect model parameters, input data, and computation integrity while reducing the amount of computation performed inside the TEE. Unlike earlier approaches that primarily outsource linear operations, TwinShield extends outsourcing to transformer-specific operations, attention matrix multiplication and the non-linear softmax function. It also provides a verification mechanism for the outsourced computation. While their mechanism to mask inputs to the linear layers is the same as Slalom i.e., through additive random masks, the non-linear components are protected through a combination of scalar masking and permutation. The former can be proven to be secure assuming the security of the underlying cipher, but the latter is ad hoc and susceptible to algebraic attacks. The authors do not provide any security proof of said combination. Moreover, their scheme suffers from the same accuracy issues as Slalom due to model quantization.

Embedding Inversion Attacks

Song and Raghunathan showed that embeddings can retain enough information to recover words from the original input. Later works extended this to full-sentence reconstruction using optimization-based attacks and learning-based approaches that train a generative decoder to recover the input. The latter particularly motivates our reconstruction attack. Dong et al. further study inversion of hidden states exposed during split LLM inference and show that adding Laplace noise directly to these states can reduce reconstruction only at a substantial utility cost. This differs from our setting because their noisy representation is also used for inference. In our design, noise is added only to outsourced inputs, and subsequently removed from the result inside the TEE before inference continues.

Trusted Execution Environments (TEEs)

A TEE is a type of hardware enforcing security guarantees during computations. For example, a TEE can provide integrity of the processing code, as well as integrity and confidentiality of the processed data. In some TEEs, protection against software attacks is achieved by providing a specific execution context, isolated from the rest of the system (including applications, OS and hypervisor). On the other hand, protection against hardware attacks is attained by leveraging encryption. TEEs are a powerful tool to perform remote computations privately, where a user submits data (and possibly the processing code) to a remote server for processing. In this case, the user has a proof that the executed code is correct and not tampered with, through remote attestation. In a nutshell, a cryptographic hash of the code is signed by the TEE, then received by the user. They can verify the signature and the hash via the corresponding public verification key through the vendor’s certificate. Intel SGX, ARM Trustzone and Intel TDX are examples of CPU-based TEEs embedded in many commercially available processors. However, our paper deals with LLM inference which is heavily reliant on GPU for speed. Hence, we propose a solution for private LLM inference by coupling a CPU-based TEEs with an untrusted GPU.

While the first commercial GPU-based TEE was recently released, namely NVIDIA Confidential Computing, it is only available on one, very high-end commercial GPU and specifications are scarce, which renders the security analysis of the system difficult. Some sources mention a weaker threat model, where the VRAM is not encrypted while CPU-based TEEs encrypt RAM to protect against hardware attacks. Nevertheless even GPU-based TEEs are likely to be slower than state-of-the-art GPUs outside the trusted zone.

Note that it may be possible to infer information about data inside TEEs through side channel attacks and meta data exchanged between the TEE and the host machine. Mitigation of side-channel attacks are orthogonal to our contribution and therefore out of scope.

Differences With Other LLMs

The architecture described above is based primarily on Llama-3B, which is the main model used in our evaluation. However, the proposed outsourcing approach is not intended to depend on a single model architecture. To examine how it can be applied more broadly, we consider other widely used Transformer-based model families and identify architectural differences that are relevant to the outsourced computation. In particular, we consider Qwen, which is also included in our experimental evaluation, and also discuss Gemma and Mistral. Since our approach outsources the computationally expensive linear projections while keeping the other model operations within the TEE, the main question is whether these models retain similar linear operations and how the surrounding computations differ.

Finally, we consider Mistral. For this comparison, we inspect Mistral-7B-Instruct-v0.3. This model uses bias-free linear projections, follows the same general RMSNorm placement as Llama-3B, and uses a SiLU-based gated feed-forward block. It also does not apply additional normalization to the query or key representations. Unlike the original Mistral 7B release, this does not use sliding-window attention.

Overall, our evaluation focuses primarily on Llama-3B, with Qwen also included in the experimental evaluation. Gemma and Mistral are discussed here only to examine how the approach extends to other model families. Differences in hidden size and projection dimensions do not affect the basic masking approach, since the same mechanism is applied using the dimensions of each model’s linear projections. Model specific architectural differences mainly change the operations surrounding the outsourced projections rather than the masking principle itself. Therefore, the proposed mechanism can be applied in the same way to other models that contain linear projections suitable for outsourcing.

System Architecture

We are not the first to notice this disparity. Tramèr and Boneh used this as the motivation to split inference of a conventional deep neural network (DNN) between a TEE and an untrusted external processor. The same observation was used by Xue et al to motivate split-inference for LLMs. The main idea in to split DNN inference, which was later adopted by Xue et al for LLM inference, is to outsource linear operations to the GPU.

Implementation

We use Intel Trust Domain Extensions (TDX) as our CPU-based TEE. The Intel TDX architecture allows instantiating hardware-isolated virtual machines, which we call TDX guests (sometimes referred to as Trust Domains), whose memory and execution state are protected from the hypervisor, other TDX guests, and any other software running on the host. We implement the split-inference architecture on a single physical machine by partitioning LLM inference between a TDX guest (virtual machine) and a honest-but-curious GPU running on the host. In addition to the guest’s private memory, Intel TDX supports sharing a memory zone with the host to enable guest-host communication. The detailed host and TDX configuration used for our implementation is provided in our Supplementary Materials3.

Inference Time

For each configuration, we use 45 prompts selected from the Databricks Dolly dataset, with an average input length of about 100 tokens. Databricks Dolly is a human-generated instruction-response dataset designed for instruction-following LLMs. We use a batch size of 15, resulting in three batches per configuration. Each configuration is executed once over the same set of prompts, and we report the average inference time per prompt. Batching allows multiple prompts to be processed in a single run and reduces the number of separate data transfers and GPU calls. We evaluate four output-token limits of 100, 200, 400, and 800 tokens.

How Much Numerical Error is Too Much?

To understand how much numerical error the model can tolerate before output quality starts to degrade, we performed an additional controlled error (CE) experiment. We used 100 prompts from the same Dolly dataset and evaluated all prompts at each controlled error level. For each outsourced operator, we first measured the numerical error that is naturally created by the masking and unmasking process under EP1. This error is the difference between the clean projection output under T3 and the corrected output recovered after masking, and is computed separately for every operator invocation rather than using a single fixed error value. We then preserved the error pattern observed for each operator call and changed only its magnitude. This allowed us to gradually increase the numerical error seen by the model while keeping the structure of the naturally occurring masking error.

Token Divergence is Much More Complex

Token-level traces show that output divergence is not determined by the numerical error magnitude alone. When the baseline model assigns very similar scores to its top two candidates for the next token, even a small numerical error can change which token is selected. This then changes the subsequent generated tokens as well. Having said that, if the logits of top few tokens are extremely close, then replacing one with another will not cause significant change in the model’s utility. In our experiments, smaller mean true errors were generally associated with fewer divergent outputs and higher semantic similarity. Therefore, the error bound provides a useful indicator of whether masking is likely to impact the quality of the generated output.

Prompt Reconstruction Attack

We use a prompt reconstruction attack inspired by the generative embedding inversion attack of Li et al.. Unlike their use of pooled sentence embedding, our attack uses token-level intermediate representations that may retain prompt information. This attack can be launched by the GPU using a public dataset and a local copy of the LLM to train a reconstruction model that maps offloaded inputs back to prompts.

Reconstruction Attack Results

To compare the reconstructed and original prompts, we use token precision, recall, F1-score, and semantic similarity. Precision measures how many generated tokens appear in the original prompt, while recall measures how many original tokens are recovered; F1 provides a balanced measure of both. We evaluate these metrics on 500 Dolly prompts containing 100-300 tokens.

Discussions, Limitations and Future Directions

Our experiments leverage the Databricks Dolly dataset, which has been chosen as it was readily available to us and contained enough prompts of approximately the same size. We chose to use a public dataset not containing personal information for ethical reasons. In particular, our scheme still considers the entire prompt as private, and protects each textual entity without distinction of type or sensibility. Hence, our results can be extrapolated to any type of textual prompt.

Precomputing the mask and noise correction reduces inference time at the expense of storage space. Depending on the number of prompts, and the size of the model, this can exceed the memory specification. This drawback is similar to preprocessing in secure multiparty computation, where increased storage is required to trade off online computational time. Likewise, this issue also applies to Slalom. One way to alleviate this issue is to keep unused noise in an encrypted form on the untrusted disk, and then only load and decrypt it inside the TDX when required, similar to what is done in. Through a separate process, the TEE could continuously generate noise, encrypt and store it in the untrusted disk for future use.

Our prompt reconstruction attack may not be the most powerful attack possible, in terms of the capabilities of the underlying large language model used in the attack. Apart from this, the attack’s assumptions are the strongest possible: full knowledge of the learned parameters and architecture of the victim model, as well as the differentially private mechanism and its parameters. However, since we add fresh noise to each input to the GPU, it is unlikely that a more powerful LLM will perform substantially better than ours.

Conclusion

In this work, we show that splitting LLM inference between a trusted but slower TEE and an untrusted but faster GPU, with intermediate representations protected by differential privacy, enables the system to benefit from GPU acceleration while simultaneously protecting the prompt. We have shown that these representations can leak information about the original prompt, which motivates protecting the values sent outside the TEE. Our method does come with a trade-off. We show that uncontrolled differentially private noise can result in irreversible floating-point errors. However, unlike systems that use encryption to mask inputs, this error can be reined in by tuning the differential privacy parameter to balance privacy and accuracy of the LLM response. With the suggested values of the privacy parameter, we show that prompt reconstruction fails even with full knowledge of the LLM and the privacy mechanism. Beyond the use case considered in this paper, our method could also enable systems to leverage newly available, state-of-the-art GPUs without exposing information about portentially sensitive prompts to them.