Deep neural networks (DNNs) are valuable assets, yet their public accessibility raises security concerns about parameter extraction by malicious actors. Recent work by Carlini et al. (crypto'20) and Canales-Martínez et al. (eurocrypt'24) has drawn parallels between this issue and block cipher key extraction via chosen plaintext attacks. Leveraging differential cryptanalysis, they demonstrated that all the weights and biases of black-box ReLU-based DNNs could be inferred using a polynomial number of queries and computational time. However, their attacks relied on the availability of the exact numeric value of output logits, which allowed the calculation of their derivatives. To overcome this limitation, Chen et al. (asiacrypt'24) tackled the more realistic hard-label scenario, where only the final classification label (e.g., "dog" or "car") is accessible to the attacker. They proposed an extraction method requiring a polynomial number of queries but an exponential execution time. In addition, their approach was applicable only to a restricted set of architectures, could deal only with binary classifiers, and was demonstrated only on tiny neural networks with up to four neurons split among up to two hidden layers. This paper introduces new techniques that, for the first time, achieve cryptanalytic extraction of DNN parameters in the most challenging hard-label setting, using both a polynomial number of queries and polynomial time. We validate our approach by extracting nearly one million parameters from a DNN trained on the CIFAR-10 dataset, comprising 832 neurons in four hidden layers. Our results reveal the surprising fact that all the weights of a ReLU-based DNN can be efficiently determined by analyzing only the geometric shape of its decision boundaries.
Delving into Cryptanalytic Extraction of PReLU Neural Networks
Institute for Advanced Study, Tsinghua University(清华大学高等研究院);Institute for Network Sciences and Cyberspace, Tsinghua University(清华大学网络科学与网络空间研究院);Department of Computer Science and Technology, Tsinghua University(清华大学计算机科学与技术系);State Key Laboratory of Cryptography and Digital Economy Security, Tsinghua University(清华大学密码学与数字经济安全全国重点实验室);School of Cryptologic Science and Engineering, Shandong University(山东大学密码学科学与工程研究院);Zhongguancun Laboratory(中关村实验室);Shandong Institute of Blockchain(山东省区块链研究院)
Hard-Label Cryptanalytic Extraction of Neural Network Models
Institute for Advanced Study, Tsinghua University(清华大学高等研究院);Zhongguancun Laboratory(中关村实验室);School of Physical and Mathematical Sciences, Nanyang Technological University(南洋理工大学物理与数学科学学院);Department of Computer Science and Technology, Tsinghua University(清华大学计算机科学与技术系);Shandong Key Laboratory of Artificial Intelligence Security(山东省人工智能安全重点实验室)
Cryptanalytic Extraction of Neural Networks Without Known Architecture Assumption
Tsinghua University(清华大学);Zhongguancun Laboratory(中关村实验室);Institute for Advanced Study, Tsinghua University(清华大学高等研究院);School of Cryptographic Science and Engineering, Shandong University(山东大学密码科学与工程学院);State Key Laboratory of Cryptography and Digital Economy Security, Tsinghua University(清华大学密码与数字经济安全国家重点实验室);Shandong Institute of Blockchain, Shandong(山东省区块链研究院)