CipherGPT
CipherGPT: Secure Two-Party GPT Inference
Reported benchmarks
| model | params | inference latency s | communication mb | accuracy | network | component | vs sota |
|---|---|---|---|---|---|---|---|
| GPT-2 (end-to-end, per generated token) | 117M | 1180.9 | 15096.8 | 99.22% of outputs identical to plaintext GPT-2 (10,000 WikiText-103 sentences) | LAN ONLY (3000 Mbps, 0.8 ms RTT), SINGLE THREAD; AWS c5.9xlarge, Xeon 8000 @ 3.6 GHz | — | — |
| GPT-2 (component -- matrix multiplication, sVOLE) | — | — | — | — | LAN only (3000 Mbps, 0.8 ms RTT), single thread | matrix multiplication | vs BumbleBee: 5.8x runtime / 1.4x comm at t=256 words; 6.2x / 4.1x only at t=1024 |
| GPT-2 (component -- GELU, spline) | — | — | — | — | LAN only (3000 Mbps, 0.8 ms RTT), single thread | GELU (spline-based) | vs BOLT: 1.8x runtime, 2.5x comm, 7.4x precision. But communication REGRESSES vs Bolt+/BumbleBee. |
| GPT-2 (component -- top-K selection) | — | 3.281 | 136.1 | — | LAN only (3000 Mbps, 0.8 ms RTT), single thread | top-K (K=100 from a 50,257-entry vocabulary vector) | 8.8x speedup, 14.8x less communication vs a Bitonic sorting network |
inference_latency_note: Table V Total: 1,180,933 ms (~20 min) to produce ONE token. "A comprehensive benchmark for CipherGPT in generating a single response word; these are amortized results for the generation of 256 response words; the input is a vector of 256 words." 12 transformer decoders, embedding size 768. The paper's own verdict (Sec IX): "CipherGPT requires a latency of 20 minutes and a bandwidth of 15 GB to produce a token. This level of cost is currently impractical."
communication_note: Table V Total = 15,096.82 MB (~15 GB) PER TOKEN, amortized over a 256-word response.
accuracy_note: Sec VIII-D: "99.22% of the outputs generated by CipherGPT are identical to the outputs produced by GPT-original ... Even for the outputs that are different (78 out of 10 000), each of these 'wrong' outputs still falls within the top-5 outputs." Top-K sampling was disabled (K=1) for this comparison.
vs_sota_note: The abstract's "up to 6.2x speedup and 4.1x bandwidth reduction" is the t=1024 figure -- "up to" is doing the work. At t=256, the paper's own "reasonable number of iterations", Sec VIII-D gives: "the amortized runtime for our protocol is 1 462ms, 2.3x speedup over Iron, 6.4x speedup over Bolt and 5.8x speedup over BumbleBee; the amortized communication for our protocol is 8.2MB, 3.7x reduction over Iron, 3.0x reduction over Bolt and 1.4x reduction over BumbleBee." The gain is a function of how many response words are preprocessed together.
vs_sota_note: Table IV, GELU over a 2^20-length vector of 37-bit elements: Iron 694 s / 12,225 MB; Bolt 55.61 s / 1,962.23 MB; Bolt+ (Bolt with BOLE) 52.22 s / 559.28 MB; BumbleBee 73.52 s / 641.02 MB; CipherGPT 30.56 s / 764.96 MB. The headline "2.5x less communication" is measured against PLAIN BOLT ONLY -- against Bolt+ (559.28 MB) and BumbleBee (641.02 MB), CipherGPT's GELU uses MORE communication, and the runtime win falls to 1.7x ("Compared with Bolt+, we still achieves a 1.7x speedup"). The PRECISION win is unambiguous and is the real result: maximal ULP error 5, vs Bolt's 37 (7.4x) and BumbleBee's 73 (14.6x).
Approach
First secure 2PC GPT inference. Three custom protocols: (1) sVOLE-based (subfield VOLE) matrix multiplication customized for GPT's autoregressive generation -- each response word is one inference producing an UNBALANCED matmul, and they combine these into a single unbalanced matmul over sVOLE (efficient when n >> k); (2) SPLINE-based GELU -- split the GELU curve into intervals, one LUT to find the interval, then a per-interval linear function y=ax+d via multiply-then-truncate, avoiding the error accumulation of multi-step (SIRNN/Iron) and high-degree-polynomial (BOLT) approaches; (3) shuffling-based top-K selection + the FIRST secure top-K SAMPLING protocol.
Notes
The GPT-focused member of the line -- and uniquely, the one that handles AUTOREGRESSION and SAMPLING. Its secure top-K sampling is the first of its kind. This is the exact capability the zkML side (Jolt Atlas) lacks: recall Jolt Atlas proves a single forward pass with no decode/sampling, whereas CipherGPT builds bespoke 2PC protocols for word-by-word generation and stochastic top-K decode. See the docs' certify/argmax pages.
Security model
semi-honest 2PC
Our reading
What is new
CipherGPT is the only paper in either column of this repo that takes generation seriously, and that is what makes it worth reading from the zkML side.
Everyone else, Iron, BOLT, Nimbus, Bootstrapping is All You Need on the privacy side; zkGPT, zkLLM, DeepProve, Jolt Atlas on the verifiability side, computes or proves a forward pass. CipherGPT builds protocols for what an LLM actually does: emit one word, append it, run again, and sample from the resulting distribution. Three contributions follow from that framing:
sVOLE matmul specialized for autoregression. Each generated word is one inference producing an unbalanced matmul (a thin activation against a fat weight matrix). Subfield VOLE is efficient exactly when the dimensions are lopsided, and, crucially, the same weight matrix recurs across every generated word, so the correlations can be preprocessed once for the whole response.
Spline-based GELU. One lookup to find which interval the input falls in, then a single
per-interval linear function y = ax + d evaluated by multiply-then-truncate. This dodges both
failure modes of the alternatives: the error accumulation of SIRNN/Iron's multi-step iteration,
and the approximation error of BOLT's and BumbleBee's high-degree polynomials. It is the most
precise GELU in the cluster and it costs the fewest primitives. Genuinely good.
The first secure top-K sampling protocol. Shuffle the logit vector, then run a modified
quicksort that only recurses into partitions containing the top-K, the comparison results leak
nothing because the vector was shuffled first, and the recursion cuts comparisons from O(n log n)
to O(n). Then sample one element according to secret-shared probabilities with K−1 comparisons
and K multiplexers. Prior work either used garbled circuits (unaffordable) or simply took the
argmax, "thereby diminishing the utility of the LLMs."
That last sentence is the one the zkML column should sit with. DeepProve's certification argument depends on argmax determinism, and it concedes that randomized decoding "is not included in our implementation, same as all prior works." The privacy literature built the sampling protocol that the verifiability literature has not.
What it actually proves
Nothing, no proof is produced. What it computes, privately and against a semi-honest counterparty, is a full 256-word GPT-2 generation, with the bit widths stated (12 fractional bits, a 37-bit ring), single-threaded, over a LAN.
And it tells you what that costs, in a sentence the rest of the field's summaries do not quote:
Our benchmark (Table V) shows that CipherGPT requires a latency of 20 minutes and a bandwidth of 15 GB to produce a token.
CipherGPT · §IX, Discussion
Per token. That is the number that belongs in papers.yml, which currently records only
component-level speedups for this system. It is the anchor for autoregressive private inference the
way Iron's figure is the anchor for a single BERT pass, and it is far more sobering: a
several-hundred-word response is measured in days and terabytes. The paper says so plainly, "this
level of cost is currently impractical", which is more than most papers here manage.
What to distrust
The headline matmul speedup is amortized in a way the baselines are not, and the authors say so.
We acknowledge that this comparison may be considered unfair, but it accurately reflects the setting for GPT inference.
CipherGPT · §VIII-D, Evaluation results
The headline matmul figure is measured by amortizing the sVOLE preprocessing across a 256-word
response, exploiting the fact that the weight matrix is constant across iterations. The baselines
(Iron, BOLT, BumbleBee) get no such amortization, because their protocols cannot use it,
which is, to be fair, precisely CipherGPT's structural advantage. But it means the figure is not a
protocol-against-protocol comparison, it is a deployment-setting comparison, and it grows
arbitrarily with the response length the authors choose. papers.yml and the README carry the
matmul speedup with no caveat; the caveat is in the paper, written by the authors, and should travel
with the number.
The paper's flagship contribution is never evaluated for its effect on output quality. The accuracy experiment compares CipherGPT's outputs against floating-point GPT-2 on 10,000 WikiText sentences and finds them near-identical, but:
To eliminate the interference of top-K sampling, we set K = 1 for both CipherGPT and GPT-original to predict the most possible word.
CipherGPT · §VIII-D, Evaluation results
K = 1 is argmax. The accuracy of the system is measured with the secure sampling protocol turned
off. It is a defensible experimental choice, you cannot compare two stochastic decoders by
equality, but it means the paper's most-touted novelty, the thing that distinguishes it from every
other system in this repo, has no reported effect on the model's output distribution at all. Does
the secret-shared probability arithmetic distort the sampling distribution? Does the fixed-point
truncation of the softmax outputs bias which of the top-K gets picked? Unknown. For a protocol whose
whole justification is that argmax "diminish[es] the utility of the LLMs," not measuring the utility
you restored is a conspicuous gap.
LAN only. Every result is on a fast local link with sub-millisecond latency. This is a communication-bound protocol shipping gigabytes per token; on any realistic WAN the numbers change character entirely. BOLT reports across several network settings, and its speedup spread turns out to be almost entirely explained by bandwidth. CipherGPT reports one network.
Single-threaded, which cuts the other way. Every number here is from one thread on a c5.9xlarge. That is a conservative choice and worth saying out loud, since most of this cluster reports multi-threaded figures.
Citation neighbourhood
Cited by, in this corpus
Edges are a proxy: paper A's text mentions B anywhere (body or bibliography). See the full graph.
Discussed in
Other recorded fields
pdf_available: true model: GPT-2