BoostCom: Towards Efficient Universal Fully Homomorphic Encryption by Boosting the Word-wise Comparisons

Ardhi Wiratama Baskara Yudha, Jiaqi Xue, Qian Lou, Huiyang Zhou, Yan Solihin

TL;DR

BoostCom is a new acceleration framework that supercharges word-wise comparisons in "Universal" Fully Homomorphic Encryption (uFHE). By combining a multi-level CPU/GPU parallelization strategy with clever algorithmic optimizations like slot compaction, the researchers achieved an average 11.1× end-to-end speedup over state-of-the-art CPU-based systems, making privacy-preserving data analysis significantly more practical.

What Problem Does This Paper Address?

Fully Homomorphic Encryption (FHE) is the "holy grail" of data privacy: it allows a server to process data while it remains encrypted, ensuring the server never sees the actual content. Historically, FHE schemes were split into two camps: arithmetic-based (great for math like addition/multiplication) and non-arithmetic (better for logic like "is A > B?").

Recently, the BGV scheme was upgraded to handle "word-wise" comparisons, effectively becoming a Universal FHE (uFHE) that can do both. However, there’s a catch: a single comparison in this framework is incredibly slow—often orders of magnitude slower than a multiplication. This creates a massive bottleneck for real-world applications like sorting, database queries, or neural networks (which rely on ReLU comparison layers). BoostCom aims to break this bottleneck.

Methods

The authors introduce a "multi-prong" approach to acceleration:

  1. Multi-Level Heterogeneous Parallelization: Instead of just dumping everything onto a GPU, BoostCom uses a hierarchy. Multicore CPUs manage high-level "digit-level" parallelism, while the GPU handles the granular, math-heavy "polynomial-level" operations. This prevents the GPU from being bogged down by small, serial tasks.
  2. GPU-Specific Optimizations:
    • Branch Removal: They restructured the BluesteinNTT algorithm into "offline" and "online" phases to remove loop-carried dependencies, allowing the GPU to run it in a massive parallel sweep.
  3. Plan Reuse: They optimized the use of the cuFFT library by creating execution plans once and reusing them, cutting down on overhead.
  4. Layout Transformation: They developed a way to map non-contiguous memory into contiguous buffers to maximize the speed of data transfers between the CPU and GPU.
  5. Algorithm-Aware Enhancements:
    • Slot Compaction: FHE uses "slots" to process data in parallel (SIMD). Often, previous operations (like convolutions) leave these slots mostly empty. BoostCom introduces a Slot Manager that tracks and "packs" useful data into fewer ciphertexts before a comparison, reducing the total workload.
  6. Non-Blocking Semantics: They allow the system to start a comparison on a helper thread while the main thread continues other work, overlapping the two to hide latency.

Datasets

The authors evaluated BoostCom using five diverse benchmarks designed to represent real-world FHE workloads:

  • Sorting: Sorting an array of 16 encrypted 32-bit integers.
  • Min: Finding the minimum value in an array.
  • MLP (Multi-Layer Perceptron): A 3-layer neural network classifying MNIST images (using encrypted 16-bit integers).
  • Img_col: An image recoloring application that calculates pixel distances to a threshold.
  • Private_q: A private database query involving 100 ciphertexts.

Key Insights and Ideas

  • The "Non-Power-of-Two" Advantage: While most FHE research focuses on power-of-two (PoT) ring degrees for simplicity, this paper demonstrates that non-PoT rings are actually much faster for comparisons because they allow for more efficient cyclic slot permutations.
  • Don't Offload Everything: A key "aha" moment was realizing that offloading every small loop to the GPU actually hurts performance due to memory copy overhead. The heterogeneous split (CPU for logic/big integers, GPU for polynomials) is the sweet spot.
  • Waste Not, Want Not: In neural networks, convolutions often result in "wasted" SIMD slots (sometimes only 25% utilization). By "compacting" these slots before the ReLU (comparison) layer, they significantly boosted efficiency without adding new cryptographic noise.

Key Results

  • Speedup: BoostCom achieved a geometric mean speedup of 11.1× (with peaks up to 26.7×) compared to the industry-standard HElib running on a 16-core CPU.
  • Comparison to State-of-the-Art: It outperformed HE-Booster (a previous GPU accelerator for BGV) by a staggering 553%.
  • Memory Efficiency: The slot compaction technique reduced memory usage by an average of 29.3%.
  • Scalability: The system showed excellent scalability; as the complexity of the encryption parameters increased, the speedup from BoostCom’s optimizations actually became more pronounced.

Limitations and Future Work

  • Big Integer Support: Currently, the Chinese Remainder Theorem (CRT) components of the BGV scheme are kept on the CPU because GPUs lack native support for the highly optimized big-integer libraries required.
  • Noise Management: While the optimizations don't increase noise, the underlying uFHE scheme still has a finite "noise budget" that limits how many operations can be done before decryption becomes impossible.
  • Future Directions: The authors suggest that future work could involve specialized hardware (ASICs) or further refining the Slot Manager to handle even more complex data flow patterns in deep learning.

Summary updated

Abstract

Fully Homomorphic Encryption (FHE) allows for the execution of computations on encrypted data without the need to decrypt it first, offering significant potential for privacy-preserving computational operations. Emerging arithmetic-based FHE schemes (ar-FHE), like BGV, demonstrate even better performance in word-wise comparison operations over non-arithmetic FHE (na-FHE) schemes, such as TFHE, especially for basic tasks like comparing values, finding maximums, and minimums. This shows the universality of ar-FHE in effectively handling both arithmetic and non-arithmetic operations without the expensive conversion between arithmetic and non-arithmetic FHEs. We refer to universal arithmetic Fully Homomorphic Encryption as uFHE. The arithmetic operations in uFHE remain consistent with those in the original arithmetic FHE, which have seen significant acceleration. However, its non-arithmetic comparison operations differ, are slow, and have not been as thoroughly studied or accelerated. In this paper, we introduce BoostCom, a scheme designed to speed up word-wise comparison operations, enhancing the efficiency of uFHE systems. BoostCom involves a multi-prong optimizations including infrastructure acceleration (Multi-level heterogeneous parallelization and GPU-related improvements), and algorithm-aware optimizations (slot compaction, non-blocking comparison semantic). Together, BoostCom achieves an end-to-end performance improvement of more than an order of magnitude (11.1 × faster) compared to the state-of-the-art CPU-based uFHE systems, across various FHE parameters and tasks.
BibTeX
@inproceedings{yudha2024boostcom,
  author = {Ardhi Wiratama Baskara Yudha and Jiaqi Xue and Qian Lou and Huiyang Zhou and Yan Solihin},
  title = {{BoostCom: Towards Efficient Universal Fully Homomorphic Encryption by Boosting the Word-wise Comparisons}},
  booktitle = {PACT},
  year = {2024},
  url = {https://openreview.net/forum?id=BR6p9zYx87},
}

Loading related content...

Figure