TL;DR
This paper introduces a breakthrough method for comparing encrypted numbers in Homomorphic Encryption (HE) using "composite polynomial approximation." By composing low-degree polynomials instead of using one massive one, the authors achieve the theoretical optimal complexity, resulting in a 30x speedup over previous state-of-the-art methods for 20-bit integers.
What Problem Does This Paper Address?
Homomorphic Encryption (HE) is the "holy grail" of privacy-preserving computation, allowing a server to process data without ever seeing it. However, HE has a major weakness: it natively only supports addition and multiplication.
Non-polynomial operations—like the comparison function (is $a > b$?) or the sign function—are notoriously difficult and slow to compute. Standard approaches usually involve "minimax" polynomial approximations, but to get high precision, the degree of these polynomials becomes astronomical, making them computationally prohibitive. A 2019 attempt by Cheon et al. used rational functions to speed things up, but it required expensive division operations that are themselves hard to do in HE. This paper seeks a way to perform comparisons that is both high-precision and computationally "optimal."
Methods
The authors propose a technique called Composite Polynomial Approximation. Instead of finding one high-degree polynomial to approximate the sign function, they design a simple, constant-degree polynomial $f$ and compose it with itself multiple times ($f \circ f \circ \dots \circ f$).
Key Components:
- Core Properties of $f$: The authors identified three essential properties for the base polynomial:
- Origin Symmetry: It must be an odd function ($f(-x) = -f(x)$).
- Fixed Points: It must satisfy $f(1)=1$ and $f(-1)=-1$ to ensure convergence.
- Derivative Control: The derivative $f'(x)$ should have maximal multiple roots at 1 and -1. This "pushes" values toward $\pm 1$ faster as you iterate.
- The $f_n$ Family: They derived a specific family of polynomials that satisfy these properties uniquely for any given degree.
- Heuristic Acceleration ($g_n$): To speed up the initial phase (where values are very close to zero), they introduced a second family of polynomials, $g_n$. These have a steeper slope at the origin, acting as a "booster" to move values away from zero before the $f_n$ polynomials take over to refine the result.
- Optimal Complexity: They prove that this composition approach reaches the asymptotic lower bound of $\Theta(\log(1/\epsilon)) + \Theta(\log \alpha)$, where $\epsilon$ is the distance from zero and $\alpha$ is the precision.
Datasets
As a theoretical and algorithmic paper in cryptography, it does not use standard machine learning datasets (like ImageNet). Instead, the authors evaluated their algorithms on:
- Plaintext simulations: To verify convergence rates and mathematical optimality.
- Encrypted Integers: 8-bit to 20-bit integers encrypted using the HEAAN (Homomorphic Encryption for Arithmetic of Approximate Numbers) library.
- Amortized Performance: Evaluations were performed on large batches of comparisons to calculate the "amortized" time per operation.
Key Insights and Ideas
- Shape over Exactness: The "aha" moment is realizing that you don't need a specific rational function to approximate a sign; you just need any polynomial with the right geometric "shape" (convex/concave in specific regions) that can be composed.
- The Power of Composition: Composing a degree-3 polynomial 10 times results in a degree-$3^{10}$ (59,049) polynomial, but it only costs 20 multiplications. This is exponentially more efficient than evaluating a degree-59,049 polynomial directly.
- Division-Free: By sticking strictly to polynomials, the authors avoid the "Goldschmidt’s division" iterations required by previous rational-function-based methods, removing a massive bottleneck in HE.
- Stability: Unlike previous methods that could diverge or give "totally wrong" results if two numbers were too close together, this composite method remains stable across the entire interval $[-1, 1]$.
Key Results
- 30x Speedup: For 20-bit encrypted integers, the new method is 30 times faster than the previous state-of-the-art (Cheon et al., 2019).
- Latency: A 20-bit comparison takes just 1.43 milliseconds in amortized running time.
- Max/Min Functions: Because $\max(a, b)$ can be defined using the sign function, their "NewMax" algorithm is roughly 4.5 times faster than previous HE implementations.
- Depth Efficiency: The multiplicative depth (the "height" of the computation circuit) is significantly reduced, which is crucial for HE because every level of depth adds noise to the ciphertext.
Limitations and Future Work
- Amortization Dependency: The impressive "1.43ms" figure is amortized. HE is most efficient when doing thousands of operations at once. A single, isolated comparison would still take significantly longer (seconds) due to the overhead of HE.
- Heuristic Nature of $g_n$: While the $f_n$ family is mathematically rigorous, the $g_n$ acceleration relies on heuristic properties that, while empirically validated, lack the same level of closed-form proof.
- Parameter Tuning: The choice of $n$ (the degree of the base polynomial) involves a trade-off. While $n=4$ was found to be optimal for their setup, different HE schemes or hardware might require different tuning.
- Application to General Functions: The authors suggest this could be used for other piecewise functions (like ReLU or step functions), but they only explicitly demonstrate it for sign, comparison, and max/min.
Summary updated