atlas

Research map / Federated learning and privacy / Privacy attacks and secure learning

EncryptedLLM: Privacy-Preserving Large Language Model Inference via GPU-Accelerated Fully Homomorphic Encryption

ICML 2025 · Federated learning and privacy › Privacy attacks and secure learning · approach: Encryption-based private learning

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Builds a GPU-accelerated OpenFHE/CKKS workflow and uses it to run an encrypted GPT-2 small forward pass with polynomial approximations of activations, reporting about 200x speedup over CPU.

Problem

Privacy-preserving LLM inference where a client's query must stay hidden from a cloud server, but FHE evaluation of transformers is too slow to be practical.

Approach

Provides a GPU-accelerated CKKS implementation integrated into OpenFHE and evaluates GPT-2 under FHE using low-degree polynomial approximations of GeLU, LayerNorm, and SoftMax (with a precomputed max lookup, batched evaluation), with accuracy checked on standard benchmarks.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace activation functions with FHE-friendly approximationsGPT-2 small · ARC (Easy), HellaSwag, PIQA, Social IQA, MNLI, SST-2, ANLI, WiCaccuracyMixed
Replace activation functions with FHE-friendly approximationsGPT-2 medium · ARC (Easy), HellaSwag, PIQA, Social IQA, MNLI, SST-2, ANLI, WiCaccuracyMixed
Replace activation functions with FHE-friendly approximationsGPT-2 large · ARC (Easy), HellaSwag, PIQA, Social IQA, MNLI, SST-2, ANLI, WiCaccuracyMixed
Use per-layer empirical SoftMax max lookup values instead of computing max with a circuitGPT-2 small approximate model · GPT-2 small accuracy benchmarksaccuracyNo clear effect
Use GPU acceleration instead of out-of-the-box OpenFHE CPU functionsGPT-2 small encrypted forward pass · GPT-2 small forward pass, single unbatched evaluationspeedup: about 200×Helped

Surprising findings

Limitations

Experimental setup

Datasets: WebText

Benchmarks: HellaSwag ARC (Easy) PIQA Social IQa MNLI SST-2 ANLI WiC

Metrics: accuracy forward pass runtime

Baselines: OpenFHE CPU implementation unaltered GPT-2 plaintext baseline

Builds on: CKKS OpenFHE Cho et al. 2024 SoftMax optimization Zhang et al. 2024 CKKS transformer inference Dong et al. 2023 integer-only approximations

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy