Your Inference Request Will Become a Black Box: Confidential Inference for Cloud-based Large Language Models

Chung-ju Huang, Huiqiang Zhao, Yuanpeng He, Lijian Li, Wenpin Jiao, Zhi Jin, Peixuan Chen, Leye WangarXiv 2026

TL;DR

Talaria is a novel confidential inference framework for cloud-hosted Large Language Models (LLMs) that successfully breaks the "impossible trinity" of privacy, performance, and efficiency. By strategically partitioning the LLM pipeline between a secure client-controlled Confidential Virtual Machine (CVM) and public cloud GPUs, Talaria keeps both prompts and responses completely hidden from the cloud provider. Crucially, it achieves this with zero loss in model accuracy and minimal computational overhead.

What Problem Does This Paper Address?

When organizations deploy or query cloud-hosted LLMs, they expose sensitive data (like proprietary code, personal medical records, or financial queries) to the cloud service provider. This creates a massive privacy risk, as curious providers can use token reconstruction attacks to infer the plaintext of client prompts and responses from intermediate model embeddings.

Existing privacy-preserving solutions force a compromise across three conflicting requirements:

  1. Model Privacy: Protecting the cloud provider's proprietary model weights.
  2. Model Performance: Maintaining output invariance (ensuring the privacy mechanism doesn't degrade or alter the model's answers).
  3. Model Efficiency: Minimizing computational and memory overhead.

Differential privacy methods inject noise that degrades output quality, homomorphic encryption is far too slow for massive LLMs, and standard hardware-enclave (CVM) approaches are economically impractical if they attempt to run the entire memory-heavy LLM inside the secure zone.

Methods

Talaria solves this dilemma through a hybrid approach called Confidential Partitioned Inference (CPI), which splits the standard LLM layers into two distinct execution zones:

  • Weighted (Weight-Dependent) Decoding: Heavy linear projections that multiply activations by the model weights ($W$). These are offloaded to the public cloud's high-performance GPUs to leverage their raw computational power.
  • Structural (Weight-Free) Decoding: Operations like layer normalization, attention-score softmax, residuals, and token sampling. These do not require direct access to model weights and are executed inside the client's secure, cloud-hosted CVM.
Figure 3: Using a Qwen (Team, 2025) attention layer as an example, we split inference into two parts. The green box (weighted decoding) performs linear projec- tions that apply model weights W to inputs. The yel- low box (structural decoding) comprises weight-free ops–RMSNorm (Zhang and Sennrich, 2019), attention score/softmax (Vaswani et al., 2017), and residual con- nections. We run green-box ops on public GPUs and yellow-box ops on cloud CVMs to minimize exposure of confidential weights.

To secure the data moving between the CVM and the public GPU, the authors introduced the Reversible Masked Outsourcing (ReMO) protocol. Before sending intermediate embeddings to the GPU, the CVM applies a secret additive mask ($E_{masked} = E + M$). The GPU performs the heavy matrix multiplication on this masked data and returns the result.

Because the masking process relies on a pre-computed, underdetermined public base mask sketch ($R_{pub} = M_{pub}W$), the CVM can mathematically reverse the mask locally to restore the exact plaintext result. This two-way protection ensures the cloud never sees the client's actual data, and the client can never reverse-engineer the cloud's proprietary model weights.

Figure 4: The overview of Talaria. The client first trans- mits the prompt to the CVM through a secure channel. For each new token generated, we use CPI for secure collaborative inference. When all tokens are generated, the CVM sends the response back to the client confi- dentially. All private data is isolated in the CVM and is invisible to the cloud.

Datasets

The authors evaluated Talaria across four diverse text datasets to simulate different real-world use cases:

  • Midjourney prompts: 246,381 natural language prompts for text-to-image generation.
  • WikiText-2: Over 100 million tokens extracted from high-quality Wikipedia articles.
  • Patient-notes: 40,000 patient clinical history portions.
  • GPT-OSS20B-samples: A collection of 8.96 million text samples.

These datasets were tested against leading open-weight model families, specifically Llama3 (1B, 8B, 70B) and Qwen3 (0.6B, 8B, 32B).

Key Insights and Ideas

  • Exploiting the Linear Structure of MatMuls: The core "aha moment" is that you don't need to hide the entire neural network structure to protect data. Because the most computationally expensive parts of an LLM layer are linear matrix multiplications, you can apply exact additive masking that distributes linearly, allowing the public GPU to do the heavy lifting on obfuscated data.
  • The Power of Underdetermined Systems: By designing the public mask base to be underdetermined ($m < d$), the framework guarantees an infinite number of possible weight matrix solutions. This provides information-theoretic security, making it mathematically impossible for a client to steal the model weights from the setup phase.
  • True Output Invariance: Unlike noisy privacy methods, ReMO is algebraically lossless. The unmasking step yields the exact bitwise output of the original model, meaning the LLM's intelligence is completely uncompromised.

Key Results

  • Defeating State-of-the-Art Attacks: Against TokenInfer (a potent classification-based token reconstruction attack), Talaria crushed the adversary's effectiveness. It reduced token reconstruction accuracy from a highly vulnerable 97.5% down to an average of just 1.34%.
  • Perfect Fidelity: Across all datasets and models, Talaria achieved a Token Reconstruction Accuracy (TRA) of 100% and a Cosine Semantic Similarity (CSS) of 1.00 relative to an unprotected model, proving its mathematically lossless nature.
  • High Scalability: Unlike full isolation baselines (which require duplicating the entire LLM instance inside every client's CVM and cause severe GPU context-switching delays), Talaria maintains low end-to-end latency and superior scalability as the number of concurrent clients grows.

Limitations and Future Work

  • Honest-but-Curious Threat Model: Talaria assumes the cloud provider will honestly follow the protocol instructions but will curiously inspect the data transcripts. It does not currently defend against a fully malicious cloud provider that actively tampers with messages or bypasses attested images. The authors suggest integrating verifiable execution or runtime auditing in future work to counter this.
  • Exposed Control Flow: While model weights are perfectly protected, the structural control flow (the sequence and types of non-weight operators) is visible to the client. Though these operators are highly standardized across modern transformers, a completely black-box solution would require additional obfuscation techniques.

Summary updated

BibTeX
@misc{huang2026your,
  author = {Chung-ju Huang and Huiqiang Zhao and Yuanpeng He and Lijian Li and Wenpin Jiao and Zhi Jin and Peixuan Chen and Leye Wang},
  title = {{Your Inference Request Will Become a Black Box: Confidential Inference for Cloud-based Large Language Models}},
  year = {2026},
  eprint = {2603.00196},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.00196},
}
Figure