Secure inference of deep convolutional neural networks (CNNs) under RNS-CKKS involves polynomial approximation of unsupported non-linear activation functions. However, existing approaches have three main limitations: 1) Inflexibility: The polynomial approximation and associated homomorphic evaluation architecture are customized manually for each CNN architecture and do not generalize to other networks. 2) Suboptimal Approximation: Each activation function is approximated instead of the function represented by the CNN. 3) Restricted Design: Either high-degree or low-degree polynomial approximations are used. The former retains high accuracy but slows down inference due to bootstrapping operations, while the latter accelerates ciphertext inference but compromises accuracy. To address these limitations, we present AutoFHE, which automatically adapts standard CNNs for secure inference under RNS-CKKS. The key idea is to adopt layerwise mixed-degree polynomial activation functions, which are optimized jointly with the homomorphic evaluation architecture in terms of the placement of bootstrapping operations. The problem is modeled within a multi-objective optimization framework to maximize accuracy and minimize the number of bootstrapping operations. AutoFHE can be applied flexibly on any CNN architecture, and it provides diverse solutions that span the trade-off between accuracy and latency. Experimental evaluation over RNS-CKKS encrypted CIFAR datasets shows that AutoFHE accelerates secure inference by $1.32\times$ to $1.8\times$ compared to methods employing high-degree polynomials. It also improves accuracy by up to 2.56% compared to methods using low-degree polynomials. Lastly, AutoFHE accelerates inference and improves accuracy by $103\times$ and 3.46%, respectively, compared to CNNs under TFHE.
翻译:在RNS-CKKS框架下实现深度卷积神经网络(CNN)的安全推理,需采用多项式近似替代非线性的激活函数。然而现有方法存在三大局限:1)缺乏灵活性——多项式近似及关联的同态求值架构需为每个CNN架构手工定制,无法泛化至其他网络;2)近似次优性——仅对单个激活函数进行近似,而非CNN整体所表征的函数;3)设计受限——使用高次或低次多项式近似时,前者因自举操作降低推理速度但保持高精度,后者虽加速密文推理却牺牲准确率。针对上述问题,本文提出AutoFHE方法,能自动适配标准CNN在RNS-CKKS框架下的安全推理。其核心思想在于采用逐层混合次数的多项式激活函数,并通过自举操作放置策略与同态求值架构实现联合优化。该问题被建模为多目标优化框架,同时最大化精度与最小化自举操作次数。AutoFHE可灵活应用于任意CNN架构,并提供涵盖精度-延迟权衡的多样化解决方案。在RNS-CKKS加密的CIFAR数据集上的实验表明:相较于高次多项式方法,AutoFHE将安全推理速度提升1.32至1.8倍;相较于低次多项式方法,其精度最高提升2.56%。此外,与TFHE框架下的CNN相比,AutoFHE在推理速度与精度上分别实现103倍提升与3.46%的提高。