Static Bootstrap Placement for Encrypted Language Model Decoding
cs.CR, cs.DC, cs.LG
Submitted: 2026-10-04
Updated: 2026-10-04
Comments: 20 pages, 10 figures, 8 tables
License: http://creativecommons.org/licenses/by/4.0/
The gist: Language models increasingly serve prompts that carry private data, and secure inference under homomorphic encryption lets a client outsource the computation without revealing the prompt.
Abstract
Language models increasingly serve prompts that carry private data, and secure inference under homomorphic encryption lets a client outsource the computation without revealing the prompt. Existing secure inference systems run a forward pass without consuming a token under encryption, and generating text with them requires a client round trip at every generated token. Keeping the loop on the server instead requires selecting and consuming a token under encryption, and placing bootstraps for a loop body that grows with the context. We build AR-HE, which runs the whole loop on the server, selects each token under encryption, retrieves its embedding, and writes it back into the encrypted state. The client sends one prompt and remains offline until the output. One rule places every bootstrap in the run, without search, so the bootstrap cost of a token is a formula in the context length that is known before the run starts. The schedule skips work whose result cannot reach the output, packs bootstraps that share an operand, and keeps the keys and values of past positions in an encrypted cache. With every optimization applied, generating a GPT-2 small token costs 544 seconds on one NVIDIA H100, down from 4715 seconds without optimization. The prompt step before it costs 4630 seconds. The cache alone takes a generated step from 11751 bootstraps to 1072. The formula predicts every step we measured, including steps of a model it was not derived from.
Sources
- Scaling up FHE-based Privacy-Preserving ML: Higher Throughput, Longer Inputs for LLama-3-8B
- A Scalable Multi-GPU Framework for Encrypted Large-Model Inference
- Cachemir: Fully Homomorphic Encrypted Inference of Generative Large Language Model with KV Cache
- The Llama 3 Herd of Models
- Mistral 7B
- Qwen2.5 Technical Report
- Encryption-Friendly LLM Architecture
- ROSETTA: Efficient and Accurate Privacy-Preserving LLM Decoding via Hybrid CKKS/TFHE Evaluation
- HE-LRM: Encrypted Deep Learning Recommendation Models using Fully Homomorphic Encryption
- HEIR: A Universal Compiler for Homomorphic Encryption
- AEGIS: Scaling Long-Sequence Homomorphic Encrypted Transformer Inference via Hybrid Parallelism on Multi-GPU Systems
- Traveling Salesman-Based Token Ordering Improves Stability in Homomorphically Encrypted Language Models
Related papers
- SoK: AI-Augmented Binary Reversing
- Relaxed Sender Anonymity for CBDC Interbank Settlement: A Zero-Knowledge Approach on Permissioned EVM
- Calibration-Family Overfit: Why Trusted Sabotage Monitors Don't Transfer Across Lineages
- Efficient Fuzzy PSI under One-Sided Assumptions
- Sealing the Audit-Runtime Gap for LLM Skills
- Token Composition: A Graph Based on EVM Logs