Homomorphic encryption (HE) is a promising technique used for privacy-preserving computation. Since HE schemes only support primitive polynomial operations, homomorphic evaluation of polynomial approximations for non-polynomial functions plays an important role in privacy-preserving machine learning. In this paper, we introduce a simple solution to approximating any functions, which might be overmissed by researchers: just using the neural networks for regressions. By searching decent superparameters, neural networks can achieve near-optimal computation depth for a given function with fixed precision, thereby reducing the modulus consumed. There are three main reasons why we choose neural networks for homomorphic evaluation of polynomial approximations. Firstly, neural networks with polynomial activation functions can be used to approximate whatever functions are needed in an encrypted state. This means that we can compute by one unified process for any polynomial approximation, such as that of Sigmoid or of ReLU. Secondly, by carefully finding an appropriate architecture, neural networks can efficiently evaluate a polynomial using near-optimal multiplicative depth, which would consume less modulus and therefore employ less ciphertext refreshing. Finally, as popular tools, model neural networks have many well-studied techniques that can conveniently serve our solution. Experiments showed that our method can be used for approximation of various functions. We exploit our method to the evaluation of the Sigmoid function on large intervals $[-30, +30]$, $[-50, +50]$, and $[-70, +70]$, respectively.
翻译:同态加密(HE)是一种用于隐私保护计算的前沿技术。由于同态加密方案仅支持基本多项式运算,非多项式函数的多项式近似同态评估在隐私保护机器学习中具有重要作用。本文提出一种可能被研究者忽视的近似任意函数的简易方案:直接使用神经网络进行回归。通过搜索合适的超参数,神经网络能够在给定精度下以接近最优的计算深度逼近目标函数,从而减少模数消耗。我们选择神经网络进行多项式近似同态评估主要基于三个原因:首先,采用多项式激活函数的神经网络可在加密状态下近似任意所需函数,这意味着我们可以通过统一流程处理任何多项式近似(如Sigmoid函数或ReLU函数的近似)。其次,通过精心设计网络架构,神经网络能够以接近最优的乘法深度高效计算多项式,从而减少模数消耗并降低密文刷新频率。最后,作为主流工具,神经网络模型拥有大量成熟技术可便捷地服务于本方案。实验表明,我们的方法适用于多种函数近似。我们将该方法应用于Sigmoid函数在大区间$[-30, +30]$、$[-50, +50]$和$[-70, +70]$上的评估。