BetterSWE DigestWhat is BetterSWE?

Deep Dive · Issue 2

How Homomorphic Encryption Now Runs CIFAR-10 Inference in 200ms

Encrypted image classification went from days to seconds. A new vendor demo claims 200ms. Here is the engineering that actually got us there.

Encrypted image entering a neural network and producing an encrypted label

The problem

Running a CNN without ever seeing the data

Encrypted image entering a neural network and producing an encrypted label

Fully homomorphic encryption lets a server compute on ciphertext directly. You send an encrypted CIFAR-10 image, the server runs a ResNet-20 over it, and you get back an encrypted label. The server never decrypts anything and never learns the picture or the answer.

The catch has always been speed. An early published baseline needed 180.4 seconds on a 64-thread CPU to classify a single 32x32 image, and older reference implementations ran into the thousands of seconds. That is the number the whole field has spent years attacking.

  plaintext CNN        FHE CNN (2021 CPU)
  ~milliseconds   →    ~180 seconds / image
                       ~100x-10,000x overhead
The overhead FHE inference starts from

Getting from three minutes per image down to something interactive is a story of three concrete mechanisms, and then a startup that claims to have leapfrogged all of them.

Where the time goes

ReLU is the villain

Cost breakdown showing bootstrapping and ReLU dominating execution time

CKKS, the scheme most of this work uses, handles addition and multiplication on encrypted vectors natively. That covers convolutions and matrix multiplies fine. The problem is the nonlinear parts of a network, above all ReLU.

A comparison like max(x, 0) has no direct FHE equivalent, so it gets approximated by a high-degree polynomial. Every multiplication in that polynomial eats multiplicative depth, and when the depth runs out you must bootstrap: an expensive refresh that resets the ciphertext's noise budget.

Bootstrapping — The operation that refreshes a ciphertext so more multiplications can be applied. It is the single most costly primitive in CKKS inference.

In the SNU group's analysis of prior work, bootstrapping plus ReLU accounted for 84% of total execution time. Attack that 84% and everything else is rounding error, which is exactly what the next mechanisms do.

Mechanism 1

Move the lattice math onto the GPU

CKKS primitives being offloaded from CPU to a many-core GPU

Under the hood, CKKS operations reduce to polynomial arithmetic over huge rings, and the hot loop is the Number Theoretic Transform (NTT) plus base conversion. These are massively parallel, which makes them a natural fit for a GPU.

Porting the CPU implementation to an A100 gave the SNU group a 21.0x speedup on its own, before any algorithmic cleverness. Standalone kernel benchmarks tell the same story: one RTX 4090 library reported up to 246x on homomorphic multiply and 161x on relinearization versus CPU.

HomMul     ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 246x
Relin      ▇▇▇▇▇▇▇▇▇▇▇▇▇      161x
Rotation   ▇▇▇▇▇▇▇▇▇          121x
Rescale    ▇▇▇▇▇▇▇▇           113x
GPU vs CPU speedups per primitive (RTX 4090, ring 2^15)

Raw hardware gets you a factor of 20-ish. The rest of the journey to one second is about doing less work in the first place.

Mechanism 2

Replace ReLU with a quadratic

ReLU replaced by a smooth low-degree polynomial activation

If ReLU is what forces the expensive high-degree approximation and the bootstraps, the direct fix is to stop using ReLU. SNU's AESPA replaces the ReLU-plus-batchnorm block with a low-degree Hermite polynomial activation, a quadratic, and trains the network end-to-end with it.

The worry is always accuracy. Here it barely moved: ResNet-20 on CIFAR-10 hit 92.18% with AESPA against 92.15% for the ReLU baseline. A cheaper activation, essentially free.

ReLU + batchnorm

high-degree poly, heavy bootstrapping

AESPA quadratic

low degree, 92.18% accuracy

A quadratic consumes far less multiplicative depth than a degree-30 polynomial, so the network needs fewer bootstraps to get through all its layers. That is where the largest chunk of that 84% starts to disappear.

Mechanism 3

Pack the ciphertext so rotations get cheap

Feature maps repacked into ciphertext slots between convolution layers

A CKKS ciphertext holds thousands of slots, so a whole feature map is packed into one encrypted vector. To line up values for a convolution you rotate the slots, and rotation is not cheap. In the referenced Lee et al. baseline, rotations ate more than 83% of convolution time.

A single fixed packing layout either minimizes bootstraps or minimizes rotations, rarely both. HyPHEN uses multiple packing methods and switches the layout before and after each convolution, picking whichever arrangement is cheapest for the next operation.

conv1 ──▶ [repack] ──▶ conv2 ──▶ [repack] ──▶ conv3
         choose layout        choose layout
         (fewest rotations, controlled bootstraps)
HyPHEN flips packing between layers to cut rotation cost

AESPA and HyPHEN together added a 6.12x speedup on top of the GPU port. Stack the two factors and the arithmetic lands almost exactly where the paper says it does.

The published record

1.4 seconds, and a glimpse of 30ms

Latency staircase from 180 seconds to 1.4 seconds to a projected 30ms

Combined, GPU kernels plus AESPA plus HyPHEN bring ResNet-20 CIFAR-10 FHE inference to 1.4 seconds on an A100. Measured against the old reference implementation, that is a 1,622x improvement, roughly 21 x 6.12 from the two factors above with the rest from tuning.

1622×  ≈  21.0×⏟GPU port  ×  6.12×⏟AESPA + HyPHEN1622\times \;\approx\; \underbrace{21.0\times}_{\text{GPU port}}\;\times\;\underbrace{6.12\times}_{\text{AESPA + HyPHEN}}
How the published speedup decomposes

The same stack, simulated on a proposed custom accelerator called SHARP, projects to 0.03 seconds. That 30ms figure is the closest published number to "interactive," and it is a hardware simulation, not a measured GPU run. The technique also scales up: ResNet-18 on ImageNet lands at 14.7 seconds on GPU.

Other tracks worth knowing

Ant Group's RBOOT fuses ReLU evaluation into the bootstrapping step itself, cutting ReLU's depth from 14-20 levels to 8 and yielding 2.77x faster inference with under 0.1% accuracy loss. A separate FHEW/TFHE track (FHE-Neuron) hits CIFAR-10 in 30 seconds at 90.5% accuracy using compact ciphertexts, a different point on the memory-versus-throughput tradeoff.

So the honest, peer-reviewed frontier for a measured GPU is about 1.4 seconds. Which is what makes the next claim so eye-catching.

The 200ms claim

What Belfort's demo does and does not show

A demo showing 200ms inference with a hidden pre-cached key behind it

Belfort Labs, a startup from KU Leuven-affiliated researchers, announced sub-200ms CIFAR-10 FHE inference via a blog post and live demo, powered by an upcoming GPU library they call Cyclops. If real and comparable, that is roughly 7x faster than the published 1.4s A100 record. No paper, no methodology, and no architecture details have been released.

The demo also sidesteps the hardest production cost. On Hacker News, co-founder "furkanturan" confirmed it pre-caches the same evaluation key material for every visitor instead of generating per-user keys, to avoid a slow setup on mobile. So the number reflects raw compute, not an end-to-end trust flow.

200ms demo (shared cached key, server holds both keys and evaluators)Real deployment (per-user keys, ~100+ MiB each)

The gap between the demo and production

Because the client's secret is downloaded from Belfort's own server, an outsider cannot cryptographically prove the box is doing FHE at all rather than decrypting and computing in plaintext. That is not evidence of fraud, but it is not verifiable either. Commenters also clocked the ciphertext ballooning about 341x and saw real misclassifications, both consistent with known FHE overhead and ResNet-20's ~90% accuracy ceiling.

And key material is the unsolved part. As FHE researcher j2kun noted in the thread, each user needs at least ~100 MiB of evaluation keys; a billion-user service at 1 GiB each is an exabyte of storage, a problem the demo simply does not touch.

The takeaway

A real trajectory, and a number to watch

Why it matters

Private inference has quietly gone from a research curiosity at three minutes per image to something within reach of interactive use, driven by three well-understood levers: GPU-ported CKKS kernels, cheap polynomial activations, and adaptive packing. The 200ms headline sits ahead of the verifiable frontier and rests on a demo that hides the key-management cost that dominates any real deployment. The compute is getting genuinely fast; whether the surrounding system is deployable is the open question.

The short version

  • Published SOTA for encrypted ResNet-20 CIFAR-10 inference is **1.4 seconds on an A100**, down from **180 seconds** on CPU.
  • The **1,622x** gain decomposes into a **21x** GPU port and **6.12x** from AESPA quadratic activations plus HyPHEN packing.
  • Bootstrapping and ReLU were **84%** of runtime, so replacing ReLU with a quadratic (at 92.18% accuracy) is the biggest single win.
  • Belfort's **200ms** claim is an unverified vendor demo with no published methodology and a shared pre-cached key.
  • The unsolved production cost is key material: **100+ MiB per user**, which the demo does not address.

Sources

  1. 1.Belfort Labs announcement discussion (Hacker News)
  2. 2.Latency-Aware Inference on Convolutional Neural Network ...
  3. 3.[PDF] Performance Comparison of Homomorphic Encrypted Convolutional ...
  4. 4.Latency-Aware Inference on Convolutional Neural Network ...
  5. 5.Is FHE Still Too Slow? Homomorphic Encryption Benchmarks 2026
  6. 6.EncryptedLLM: Privacy-Preserving Large Language Model Inference ...
  7. 7.Towards Efficient Fully Homomorphic Encryption Acceleration using ...
  8. 8.Optimization of CNN inference for multi-image with fully homomorphic ...
  9. 9.Parallel and memory-efficient homomorphically encrypted CNNs ...
  10. 10.AN ACCELERATED GPU LIBRARY FOR EFFICIENT HOMOMORPHIC ...
  11. 11.Encrypted GNN Inference via Server-Side Input Graph ...
  12. 12.[1801.05507] Gazelle: A Low Latency Framework for Secure Neural Network Inference
  13. 13.Neural Network Quantisation for Faster Homomorphic ...
  14. 14.Science Cast
  15. 15.Enabling Homomorphically Encrypted Inference for Large ...
  16. 16.Toward Practical Privacy-Preserving Convolutional Neural ...
  17. 17.Model Design, Quantization and Fine-Tuning Using FHEW/ ...
  18. 18.Accelerating Homomorphic Neural Network Inference by ...
  19. 19.GitHub - lorenzorovida/LowMemoryFHEResNet20: Source code for the paper "Encrypted Image Classification with Low Memory Footprint using Fully Homomorphic Encryption" · GitHub
  20. 20.Towards Deep Encrypted Training: Low-Latency, Memory-Efficient, and High-Throughput Inference for Privacy-Preserving Neural Networks
  21. 21.Toward Practical Privacy-Preserving CNNs Exploiting FHE (Park et al., SNU, DISCC 2023)
  22. 22.Encrypted Image Classification with Low Memory Footprint Using FHE (Rovida & Leporati, IJNS 2024)
  23. 23.Optimizing Encrypted Neural Networks with FHEW/TFHE (Ku et al., PoPETs 2025)
  24. 24.RBOOT: ReLU-Bootstrapping Fusion for CKKS CNN Inference (Yang et al., Ant Group, USENIX Security 2026 prepub)