Activation Functions Considered Harmful: Recovering Neural Network Weights through Controlled Channels
Not on the map. Why?
Abstract (arXiv)
With high-stakes machine learning applications increasingly moving to untrusted end-user or cloud environments, safeguarding pre-trained model parameters becomes essential for protecting intellectual property and user privacy. Recent advancements in hardware-isolated enclaves, notably Intel SGX, hold the promise to secure the internal state of machine learning applications even against compromised operating systems. However, we show that privileged software adversaries can exploit input-dependent memory access patterns in common neural network activation functions to extract secret weights and biases from an SGX enclave. Our attack leverages the SGX-Step framework to obtain a noise-free, instruction-granular page-access trace. In a case study of an 11-input regression network using the Tensorflow Microlite library, we demonstrate complete recovery of all first-layer weights and biases, as well as partial recovery of parameters from deeper layers under specific conditions. Our novel attack technique requires only 20 queries per input per weight to obtain all first-layer weights and biases with an average absolute error of less than 1%, improving over prior model stealing attacks. Additionally, a broader ecosystem analysis reveals the widespread use of activation functions with input-dependent memory access patterns in popular machine learning frameworks (either directly or via underlying math libraries). Our findings highlight the limitations of deploying confidential models in SGX enclaves and emphasise the need for stricter side-channel validation of machine learning implementations, akin to the vetting efforts applied to secure cryptographic libraries.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 20 of its 63 references that are in the map. First posted on arXiv 24 Mar 2025.
Builds on
20 of 63 references.
References · 20
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2020GLU Variants Improve Transformercited by 1,724
- 2016Stealing Machine Learning Models via Prediction APIscited by 602
- 2018Cache Telepathy: Leveraging Shared Resource Attacks to Learn DNN Architecturescited by 56
- 2018Stealing Neural Networks via Timing Side Channelscited by 42
- 2018Security Analysis of Deep Neural Networks Operating in the Presence of Cache Side-Channel Attackscited by 18
- 2023Polynomial Time Cryptanalytic Extraction of Neural Network Modelscited by 17
- 2017Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGXcited by 15
- 2017Software Grand Exposure: SGX Cache Attacks Are Practicalcited by 14
- 2020A Survey of Published Attacks on Intel SGXcited by 10
8 more
- 2022Decompiling x86 Deep Neural Network Executablescited by 7
- 2024CoreGuard: Safeguarding Foundational Capabilities of LLMs Against Model Stealing in Edge Deploymentcited by 5
- 2023SEV-Step: A Single-Stepping Framework for AMD-SEVcited by 4
- 2017DR.SGX: Hardening SGX Enclaves against Cache Attacks with Data Location Randomizationcited by 3
- 2022On (the Lack of) Code Confidentiality in Trusted Execution Environmentscited by 3
- 2020CopyCat: Controlled Instruction-Level Attacks on Enclavescited by 2
- 2022Unintended Memorization and Timing Attacks in Named Entity Recognition Modelscited by 2
- 2020D'ej`a Vu: Side-Channel Analysis of Mozilla's NSScited by 1
Built on by
Citing papers per year: 2026: 2.
2 papers.