arXiv:2611.12532cs.CRNov 2026

Manuscript Offprint

arXiv:2611.12532

ML Models Are Not Ciphers: Power Analysis for Weight Extraction Is Harder Than You Think

Mohammed Qaiss, Peter Horvath, Michal Shagam, Lejla Batina, Zhuoran Liu, Eyal Ronen, Mahmood Sharif, Yuval Yarom

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Mohammed Qaiss¹, Peter Horvath², Michal Shagam¹, Lejla Batina², Zhuoran Liu³, Eyal Ronen¹, Mahmood Sharif¹ and Yuval Yarom⁴

¹Tel Aviv University ²Radboud University ³University of Amsterdam ⁴Ruhr University Bochum

mohammedq@mail.tau.ac.il, peter.horvath@ru.nl, michelle15g@gmail.com, lejla@cs.ru.nl, z.liu@uva.nl, eyalronen@taux.tau.ac.il, mahmoods@taux.tau.ac.il, yuval.yarom@rub.de

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.

We propose strategies for addressing the limitations we uncover in the ideal setting. We further show that attacks become much easier when the adversary aims to achieve high benign accuracy rather than to recover the exact weights. However, full recovery of exact model weights under realistic attack settings remains an open challenge.¹

Keywords: Correlation power analysis · Deep neural networks · Model extraction

1 Introduction

Deep neural networks (DNNs) have rapidly become the dominant approach for solving complex tasks such as object detection [LOW⁺²⁰], image classification [SZ15], audio

¹Our code is available at https://github.com/Mohammedq-cs/cpa-weight-extraction.

processing [PLV+19], forecasting [WLB21], and natural language processing [OMK21]. Training these models requires carefully curated datasets, significant computational resources, and substantial human expertise. As a result, trained models, and particularly their learned weights, represent valuable intellectual property. The resources required to develop modern DNNs make their learned parameters a valuable asset, and consequently an appealing target for adversaries seeking to replicate or misuse proprietary models [JSMA19, YYZ+20]. This motivates a deeper examination of how such parameters may unintentionally leak.

In recent years, the machine-learning ecosystem has been undergoing a shift toward edge deployment [WTG+25]. To reduce latency, improve availability, and avoid transmitting sensitive user data to the cloud, many companies deploy trained models directly onto edge devices such as smart cameras, drones, and autonomous vehicles. In this work, we use the term edge GPU to refer to platforms, such as NVIDIA Jetson-class devices, designed for on-device inference in embedded robotics and Internet-of-Things (IoT) systems [nvi]. This deployment strategy prevents direct access to model weights, because they are not exposed through any accessible interface. However, it still places valuable models on devices under the physical control of potentially untrusted users. This creates an opportunity for physical side-channel attacks that bypass software-level protections.

Side-channel attacks extract information by observing incidental interactions between computation and the environment in which it takes place. A common example is Correlation Power Analysis (CPA), which correlates observed power consumption with hypothesized leakage models to recover secret values from computation [BCO04]. In the past, side-channel attacks such as CPA mostly targeted cryptographic primitives [Koc96, BCO04, LGC+07]. However, more recently, multiple works have used CPA to extract weights from DNN implementations, targeting partial sums or the results of individual multiplications stored in registers. For example, CSI-NN [BBJP19a] shows how to recover the hidden architecture and weights of multilayer perceptrons [Hay94] and convolutional neural networks (CNNs) [LBD+89]. Subsequent works target FPGAs [YKO+20, LTO22, DCA20, YMIH+21] and GPUs [HCW+25, HSC+26] and use CPA-based techniques to extract model information such as architecture and weights. However, these works generally show the feasibility of CPA only on toy examples or, at most, on the first two layers of larger DNNs, and ignore error propagation. To the best of our knowledge, no prior attack has demonstrated parameter extraction of all the layers of a trained model, with realistic depth, parameter distributions, and architectural complexity, from edge devices.

In this work, we investigate the challenges of using side-channel attacks for such a full recovery of a DNN model. To facilitate the analysis, we focus only on intrinsic challenges that relate to the nature of leakage from DNN models, ignoring the challenges of physically measuring the leakage. To eliminate the effects of measurement limitations, such as interference, alignment, and device-specific behavior, we develop a simulation-based framework. Our framework uses the common Hamming weight (HW) and Hamming distance (HD) leakage models [BCO04] and allows us to incorporate synthetic noise in the simulated measurements. Using this approach, we can systematically explore when, how, and to what extent correlation-based side-channel attacks can recover parameters from our target models.

Our main finding is that extraction of weights from DNNs presents new challenges that do not manifest in cryptographic attacks. We find that, in our setting, full key recovery of AES requires fewer than ten noise-free traces, whereas attacks on even simple DNNs may require more than 150,000 traces, often significantly more (Section 5.1). We analyze the causes of this stark difference and identify two fundamental differences between DNN models and cryptographic functions that contribute to it. The first difference is that, unlike cryptography, which aims to hide information and increase entropy, DNNs aim to extract information, i.e., reduce entropy. Consequently, as the computation progresses

Figure

Figure 1: The number of traces required for the extracted model to achieve baseline accuracy as a function of the number of layers, for different models. While the number of traces grows exponentially with the number of layers, the total number of weights in the model (in parentheses) seems to have little effect. For comparison, we add the AES cipher, modeling a CPA attack on the first-round S-box computation as one layer and 16 weights (one per key byte).

through the DNN model, the variability of the data tends to decrease [PHD20]. However, CPA requires high data variability to distinguish between weight candidates. Hence, the decreased entropy hampers CPA attacks. We also find that we can increase the variability of the data in deeper layers by selecting data samples from the population that the model is designed to process, rather than selecting them uniformly at random, as is common in prior work [HCW +^{+}25] (see Section 4).

The second difference we identify is the common use of floating-point numbers in DNN models. Floating-point computation behaves differently from the integer- or bit-vector-based computation typically used in cryptography. In particular, the loss of precision in floating-point addition [Gol91], especially when summing long sequences of numbers, causes collisions between weight candidates, rendering it infeasible to identify a single correct weight guess. We further demonstrate that, due to properties of floating-point numbers, the Hamming distance model is inherently better suited than the Hamming weight model for CPA attacks on DNNs.

Balancing the negative outlook so far, we further note that, when targeting DNNs, the adversary's goals diverge from those of attacks on cryptography. When attacking cryptography, the adversary aims to extract the exact secret. In contrast, when attacking DNN models, obtaining an approximate model is often sufficient. For example, an attacker might only need to reconstruct a model that achieves similar classification accuracy on benign samples, or one that is useful as a surrogate model for generating adversarial examples (Section 6). We find that acquiring such an approximate model requires orders of magnitude fewer traces than completely replicating the original model's weights.

However, we show that this easier task of approximate model extraction can still be challenging, even in an ideal, noise-free setting. Our findings indicate that the complexity of extraction, measured by the number of traces required, grows exponentially with the depth of the target model. As Figure 1 shows, in our setting, a standard attack on a cryptographic primitive such as AES requires fewer than ten traces. In comparison, a simple CNN model with eight layers can be extracted using 5,000 traces, a VGG-11 [SZ15] model with 11 layers requires 20,000 traces, and for a ResNet-18 [HZRS16] model with 21 layers, even 200,000 traces are not sufficient. Furthermore, adding even a small amount of noise to our simulation can increase the required number of traces by two orders of magnitude. When using a realistic signal-to-noise ratio (SNR), our experiments show that even extracting only the first layer of the model requires more than ten million traces.

While our work proposes multiple techniques to overcome some of the challenges we encountered during the extraction process, the complexity of a full end-to-end extraction of a model such as ResNet-18, even in the ideal noise-free setting, suggests that we need to develop new approaches to allow for practical attacks on modern models, which are usually much larger.

In summary, we make the following contributions:

  • We present a comprehensive analysis of the inherent challenges in CPA attacks for DNN weight extraction (Section 3).

  • We identify and quantify challenges due to the non-random structure of DNN models (Section 4) and due to the use of floating-point numbers (Section 5), showing that these challenges nearly preclude accurate weight recovery from non-trivial models.

  • We show that, nonetheless, approximate models extracted using a limited number of samples are still functional and can be treated as equivalent to the original models (Section 6). We further connect this result to the constrained error propagation in DNN models (Section 6.4) and describe approximate extraction of the common models VGG-11 and ResNet-18 (Section 7).

  • Finally, we demonstrate that extraction of functional DNNs remains feasible in the presence of a small amount of noise (albeit requiring significantly more traces), but fails with realistic noise levels (Section 8).

References (61)