Power analysis struggles to recover deep neural network weights fully
ML Models Are Not Ciphers: Power Analysis for Weight Extraction Is Harder Than You Think
Cryptography and Security
Summary
The paper looks at whether attackers can steal all the secret numbers (weights) inside trained AI models by watching their power usage. Unlike cryptography where secret keys can sometimes be uncovered this way, the authors find that AI models behave very differently. AI computations use floating-point math and reduce data randomness as they work deeper, making it much harder to extract every weight, even under perfect spying conditions. This means stealing a complete AI model’s secrets through power analysis is much more difficult than earlier work suggested.
What this means in practice
- •For machine learning security teams: Evaluate risks and design defenses knowing full weight extraction via power analysis is very challenging for deep models.
- •For hardware designers for ai chips: Focus on protecting other side channels since this study shows power analysis alone is unlikely to reveal full model weights.
Authors
Mohammed Qaiss, Peter Horvath, Michal Shagam, Lejla Batina, Zhuoran Liu, Eyal Ronen, Mahmood Sharif, Yuval Yarom
Abstract
Can power-analysis techniques reveal secret weights of machine-learning models? Multiple recent works demonstrate proof-of-concept attacks that can partially recover such weights. To that end, these works build on techniques from cryptographic engineering, treating the model as a ``cipher'' and its secret weights as keys. We question the basic assumption behind such straightforward adaptations of cryptographic attacks and highlight the challenges arising when applying past techniques to fully recover all layers of deep neural networks. Unlike past works, which extract only a few weights, typically from shallow layers, we investigate the recovery of complete networks. Moreover, we target fully trained and functional models, rather than untrained, randomly initialized networks. To focus on fundamental challenges, we assume an unrealistically strong side-channel adversary that can directly observe the output of the leakage model without any added noise. With this adversary, we show that machine-learning models differ significantly from cryptographic implementations, giving rise to unique challenges that have not been observed in the prior art. We observe two main differences between machine-learning models and ciphers. First, in contrast to the high-diffusion nonlinear integer arithmetic prevalent in cryptographic schemes, machine-learning models tend to use limited-precision floating-point arithmetic and low-diffusion linear operations. We show that these operations introduce difficulties in weight recovery, often requiring an unexpectedly large number of traces, even under ideal channel conditions. Second, we observe that, unlike ciphers, which aim to increase the data entropy, machine-learning models aim to reduce it. This reduces data variability as the algorithm progresses, hampering weight recovery in deep layers of the model. (details can be found in the paper)