To addresses the efficiency bottleneck of ReLU (nonlinear unit) in privacy inference schemes (such as homomorphic encryption and secure multi-party computation), we propose a neural network nonlinearity optimization method—ReLURep (ReLU Replace) framework. It uses automatic differentiable gradient descent and binary auxiliary control masks to automatically identify and replace ReLU operations, achieving a trade-off between efficiency and accuracy. ReLURep uses learnable binary masks to locate ReLU activation functions that need to be replaced, and after mask parameter fixation, it jointly trains to automatically learn the optimal polynomial parameters, reducing performance degradation caused by ReLU replacement. Additionally, a feature distribution distillation method is employed to learn the best coefficients layer by layer, minimizing accuracy loss due to network linearization. Experimental results on CIFAR10, CIFAR100, and Tiny ImageNet datasets demonstrate significant improvements in almost all ReLU budgets. For example, on CIFAR100, with a ReLU budget of 6 000, ReLURep achieves an accuracy of 75.29%, which is 1.5 percentage points higher than the state-of-the-art method.
为了设计ReLU高效的网络架构,一些研究引入了神经网络架构搜索方法。例如,CryptoNAS[17]通过将核心网络和跳跃连接的搜索空间解耦并分别进行优化,降低了搜索成本,并实现了更高的准确性和效率。SAFENet[34]提出了一种通道级激活函数近似方法,通过保留最重要的激活通道并用不同阶数的多项式替换剩余不太有用的通道,以加速隐私推理,并采用二叉树种群训练(Binary-Tree Population Based Training, BTPBT)算法搜索合适的替换比例和阶数。Sphynx[35]则结合了微搜索策略和重参数化技巧,通过学习缩减ReLU单元的最优位置,最小化非线性单元的计算成本。
KRIZHEVSKYA, SUTSKEVERI, HINTONG E. ImageNet classification with deep convolutional neural networks[J]. Communications of the ACM, 2017, 60(6): 84-90. DOI:10.1145/3065386 .
[2]
LIX G, YANGY N, WUX H. A comparative study on selecting acoustic modeling units in deep neural networks based large vocabulary Chinese speech recognition[C]//Intelligence Science and Big Data Engineering. Berlin: Springer, 2013: 473-480. DOI: 10.1007/978-3-642-42057-3_60 .
[3]
LIY B, ZHANGS T, YEF, et al. A UAV path planning method based on deep reinforcement learning[C]//2020 IEEE USNC-CNC-URSI North American Radio Science Meeting (Joint with AP-S Symposium).New York: IEEE Press, 2020: 93-94. DOI: 10.23919/usnc/ursi49741.2020.9321625 .
[4]
ELGAMALT. A public key cryptosystem and a signature scheme based on discrete logarithms[C]//IEEE Transactions on Information Theory. New York: IEEE Press, 1985: 469-472. DOI: 10.1109/TIT.1985.1057074 .
[5]
BONEHD, GOHE J, NISSIMK. Evaluating 2-DNF formulas on ciphertexts[M]//Theory of Cryptography. Berlin: Springer, 2005: 325-341. DOI:10.1007/978-3-540-30576-7_18 .
[6]
GENTRYC. Fully homomorphic encryption using ideal lattices[C]//Proceedings of the Forty-First Annual ACM Symposium on Theory of Computing. New York: ACM. 2009: 169-178. DOI:10.1145/1536414.1536440 .
[7]
BRAKERSKIZ, VAIKUNTANATHANV. Efficient fully homomorphic encryption from (standard) LWE[C]//2011 IEEE 52nd Annual Symposium on Foundations of Computer Science.New York: IEEE Press, 2011: 97-106. DOI:10.1109/FOCS.2011.12 .
[8]
ISHAIY, KILIANJ, NISSIMK, et al. Extending oblivious transfers efficiently[C]// Advances in Cryptology— CRYPTO 2003. Berlin: Springer, 2003: 145-161. DOI:10.1007/978-3-540-45146-4_9 .
[9]
RABINM O. How to exchange secrets with oblivious transfer[EB/OL]. [2024-03-16]. DOI: 10.1201/9781315383033-4 .
[10]
YAOA C. Protocols for secure computations[C]//23rd Annual Symposium on Foundations of Computer Science (sfcs 1982). New York: IEEE Press, 1982: 160-164. DOI:10.1109/SFCS.1982.38 .
[11]
YAOA C. How to generate and exchange secrets[C]//27th Annual Symposium on Foundations of Computer Science (sfcs 1986). New York: IEEE Press, 1986: 162-167. DOI:10.1109/SFCS.1986.25 .
[12]
SHAMIRA. How to share a secret[J]. Communications of the ACM, 1979, 22(11): 612-613. DOI:10.1145/359168.359176 .
[13]
CHORB, GOLDWASSERS, MICALIS, et al. Verifiable secret sharing and achieving simultaneity in the presence of faults[C]//26th Annual Symposium on Foundations of Computer Science (sfcs 1985). New York: IEEE Press, 1985: 383-395. DOI:10.1109/SFCS.1985.64 .
[14]
HERZBERGA, JARECKIS, KRAWCZYKH, et al. Proactive secret sharing or: How to cope with perpetual leakage[C]//Advances in Cryptology—CRYPTO’ 95. Berlin: Springer, 1995: 339-352. DOI:10.1007/3-540-44750-4_27 .
[15]
GOLDREICHO, MICALIS, WIGDERSONA. How to play any mental game, or a completeness theorem for protocols with honest majority[C]//Providing sound foundations for cryptography: On the work of shafi goldwasser and silvio micali. New York: Association for Computing Machinery, 2019: 307-328. DOI:10.1145/3335741.3335755 .
[16]
MISHRAP, LEHMKUHLR, SRINIVASANA, et al. DELPHI: A cryptographic inference service for neural networks[C]//Proceedings of the 29th USENIX conference on security symposium. Berkeley: USENIX Association, 2020:2505-2522. DOI:10.5555/3489212.3489353 .
[17]
GHODSIZ, VELDANDAA K, REAGENB, et al. CryptoNAS: private inference on a relu budget[EB/OL]. [2024-03-20].
[18]
JHAN K, GHODSIZ, GARGS, et al. DeepReDuce: ReLU reduction for fast private inference[EB/OL]. [2021-03-02].
[19]
KUNDUS, LUS, ZHANGY, et al. Learning to linearize deep neural networks for secure and efficient private inference [EB/OL]. [2023-01-23].
[20]
CHOM, JOSHIA, REAGENB, et al. Selective network linearization for efficient private inference[EB/OL]. [2022-06-08].
[21]
PENGH W, HUANGS Y, ZHOUT, et al. AutoReP: Automatic ReLU replacement for fast private network inference[C]//2023 IEEE/CVF International Conference on Computer Vision (ICCV). New York: IEEE Press, 2023: 5155-5165. DOI:10.1109/ICCV51070.2023.00478 .
[22]
ZENGW X, LIM, YANGH C, et al. CoPriv: Network/protocol co-optimization for communication-efficient private inference[EB/OL]. [2023-11-03].
[23]
ZOPHB, LEQ V. Neural architecture search with reinforcement learning[EB/OL]. [2017-02-15].
[24]
HEK M, ZHANGX Y, RENS Q, et al. Deep residual learning for image recognition[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE Press, 2016: 770-778. DOI:10.1109/CVPR.2016.90 .
SIMONYANK, ZISSERMANA. Very deep convolutional networks for large-scale image recognition[EB/OL]. [2015-04-10]. DOI: 10.48550/arXiv.1409.1556 .
[27]
GILAD-BACHRACHR, DOWLINN, LAINEK, et al. CryptoNets: Applying neural networks to encrypted data with high throughput and accuracy[EB/OL]. [2024-03-22].
JUVEKARC, VAIKUNTANATHANV, CHANDRAKASANA. GAZELLE: A low latency framework for secure neural network inference[C]//Proceedings of the 27th USENIX Conference on Security Symposium. Baltimore: USENIX Association, 2018: 1651-1668. DOI:10.5555/3277203.3277326 .
[31]
ELSKENT, METZENJ H, HUTTERF. Neural architecture search: A survey[J]. Journal of Machine Learning Research, 2019, 20(1): 1997-2017. DOI:10.5555/3322706.3361996 .
[32]
LIUH X, SIMONYANK, YANGY M. DARTS: Differentiable architecture search[EB/OL]. [2019-04-23].
[33]
YANGT J, LIAOY L, SZE V. NetAdaptV2: Efficient neural architecture search with fast super-network training and architecture optimization[C]//2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE Press, 2021: 2402-2411. DOI:10.1109/cvpr46437.2021.00243 .
[34]
LOUQ, SHENY, JINH, et al. SAFENet: A secure, accurate and fast neural network inference[EB/OL]. [2023-05-06].
[35]
CHOM, GHODSIZ, REAGENB, et al. Sphynx: A deep neural network design for private inference[J]. IEEE Security & Privacy, 2022, 20(5): 22-34. DOI:10.1109/MSEC.2022.3165475 .
CHENP J, HEK, CHENJ, et al. A survey on privacy-preserving deep learning[J]. Journal of Cryptologic Research, 2024, 11(4): 771-798. DOI: 10.13868/j.cnki.jcr.00070(Ch ).