arXiv:2503.19142cs.CRcs.LG2025-03被引 2

常见激活函数会暴露模型参数,攻击者仅用20次查询即可窃取神经网络权重。

Activation Functions Considered Harmful: Recovering Neural Network Weights through Controlled Channels

  • 利用输入依赖的内存访问模式,通过细粒度页访问追踪提取权重
  • 11输入回归模型中,第一层权重偏差可完全恢复,平均误差小于1%
  • 适用于研究模型安全或防御侧信道攻击的开发者与安全团队

随着高风险机器学习应用越来越多地部署在不可信的终端或云环境,保护预训练模型参数对维护知识产权和用户隐私至关重要。尽管硬件隔离飞地(如Intel SGX)能在操作系统被攻破时仍保护模型内部状态,但我们发现特权软件攻击者可利用常见神经网络激活函数中的输入依赖内存访问模式,从SGX飞地中窃取秘密权重和偏置。本研究基于SGX-Step框架获取无噪声、指令级粒度的页访问轨迹,在使用TensorFlow Micro Lite库的11输入回归网络案例中,完整恢复了第一层所有权重和偏置,并在特定条件下部分恢复深层参数。所提新攻击方法每输入每权重仅需20次查询,即可实现平均绝对误差低于1%的恢复效果,优于以往模型盗取攻击。此外,更广泛的生态系统分析显示,主流机器学习框架中广泛存在具有输入依赖内存访问模式的激活函数(或通过底层数学库间接引入)。研究揭示了在SGX飞地中部署保密模型的局限性,强调需要像安全密码库那样对机器学习实现进行严格的侧信道验证。

原文摘要 · Abstract (English)

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.

模型安全侧信道攻击SGX权重窃取

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。