一句话:提出自动学习重写规则并利用时间受限穷举搜索优化 FHE 电路的方法,降低乘法深度。
全同态加密(FHE)支持安全第三方计算,但求值电路计算开销高,现有 FHE 编译器依赖人工优化规则,结果常次优。本文提出自动学习并使用优化规则的方法,目标是降低决定性能瓶颈的最大乘法深度。方法先从训练电路合成小电路的等价关系作为重写规则,再对输入电路做项重写,采用学习规则的泛化等式匹配,并形式证明其可靠性;同时用称为等式饱和的时间受限穷举搜索探索不同重写顺序。实验显示,生成的电路同态求值速度比当前最优方法快 1.08×–3.17×(几何平均 1.56×),且与现有领域特定优化正交。
We present a new and general method for optimizing homomorphic evaluation circuits. Although fully homomorphic encryption (FHE) holds the promise of enabling safe and secure third party computation, building FHE applications has been challenging due to their high computational costs. Domain-specific optimizations require a great deal of expertise on the underlying FHE schemes and FHE compilers that aim to lower the hurdle, generate outcomes that are typically sub-optimal, as they rely on manually-developed optimization rules. In this article, based on the prior work of FHE compilers, we propose a method for automatically learning and using optimization rules for FHE circuits. Our method focuses on reducing the maximum multiplicative depth, the decisive performance bottleneck, of FHE circuits by combining program synthesis, term rewriting, and equality saturation. It first uses program synthesis to learn equivalences of small circuits as rewrite rules from a set of training circuits. Then, we perform term rewriting on the input circuit to obtain a new circuit that has lower multiplicative depth. Our rewriting method uses the equational matching with generalized version of the learned rules, and its soundness property is formally proven. Our optimizations also try to explore every possible alternative order of applying rewrite rules by time-bounded exhaustive search technique called equality saturation. Experimental results show that our method generates circuits that can be homomorphically evaluated 1.08×–3.17× faster (with the geometric mean of 1.56×) than the state-of-the-art method. Our method is also orthogonal to existing domain-specific optimizations.
@article{paperbot2126,
title = {Optimizing Homomorphic Evaluation Circuits by Program Synthesis and Time-bounded Exhaustive Search},
author = {Dongkwon Lee and Woosuk Lee and Hakjoo Oh and Kwangkeun Yi},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {45},
number = {3},
year = {2023},
doi = {10.1145/3591622}
}