AutoFHE: Automated Adaption of CNNs for Efficient Evaluation over FHE
作者: Wei Ao, Vishnu Naresh Boddeti
分类: cs.LG, cs.CR
发布日期: 2023-10-12
备注: USENIX Security Symposium 2024
💡 一句话要点
提出AutoFHE以解决CNN在FHE下的安全推理效率问题
🎯 匹配领域: 支柱五:交互与反应 (Interaction & Reaction)
关键词: 同态加密 深度学习 卷积神经网络 多项式近似 优化算法 安全推理 数据隐私 机器学习
📋 核心要点
- 现有方法在CNN架构下的多项式近似灵活性不足,无法适应不同网络,且准确性和推理速度之间存在权衡。
- 本文提出的AutoFHE通过逐层混合度数的多项式激活函数,自动适应CNN架构,优化同态评估过程。
- 实验表明,AutoFHE在加密CIFAR数据集上,相比高阶多项式方法推理速度提升1.32倍至1.8倍,准确率提升最多2.56%。
📝 摘要(中文)
在RNS-CKKS下,深度卷积神经网络(CNN)的安全推理涉及对不支持的非线性激活函数进行多项式近似。然而,现有方法存在三个主要局限性:1)灵活性不足,2)近似效果不佳,3)设计受限。为了解决这些问题,本文提出了AutoFHE,能够自动适应标准CNN以实现安全推理。其核心思想是采用逐层混合度数的多项式激活函数,并在多目标优化框架下共同优化激活函数与同态评估架构。实验结果表明,AutoFHE在RNS-CKKS加密的CIFAR数据集上,相较于高阶多项式方法,推理速度提升1.32倍至1.8倍,准确率提高最多2.56%。
🔬 方法详解
问题定义:本文旨在解决在RNS-CKKS下进行深度卷积神经网络(CNN)安全推理时,现有方法在多项式近似灵活性、准确性和推理速度上的不足。现有方法通常需要手动定制,无法广泛适用于不同的CNN架构。
核心思路:AutoFHE的核心思路是采用逐层混合度数的多项式激活函数,并在多目标优化框架下共同优化激活函数与同态评估架构,以最大化准确性并最小化引导操作的数量。
技术框架:AutoFHE的整体架构包括三个主要模块:1)激活函数的多项式近似,2)同态评估架构的设计,3)多目标优化过程。通过这些模块,AutoFHE能够灵活适应任何CNN架构。
关键创新:AutoFHE的主要创新在于其逐层混合度数的多项式激活函数设计,能够在保持高准确性的同时,减少引导操作的数量,从而加速推理过程。这一设计与现有方法的高阶或低阶多项式近似形成鲜明对比。
关键设计:在AutoFHE中,关键参数包括多项式的度数选择、损失函数的设计以及同态评估架构的优化策略。这些设计确保了在不同CNN架构下的灵活性和高效性。
🖼️ 关键图片
📊 实验亮点
实验结果显示,AutoFHE在RNS-CKKS加密的CIFAR数据集上,相较于使用高阶多项式的方法,推理速度提升了1.32倍至1.8倍,同时准确率提高了最多2.56%。此外,与TFHE下的CNN相比,AutoFHE在推理速度上提升了103倍,准确率提升了3.46%。
🎯 应用场景
AutoFHE的研究成果具有广泛的应用潜力,尤其是在需要保护数据隐私的领域,如医疗影像分析、金融数据处理和智能监控等。通过提高深度学习模型在同态加密下的推理效率,AutoFHE能够推动安全计算技术的发展,并为实际应用提供更高效的解决方案。
📄 摘要(原文)
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.