[论文解读] Quantization Backdoors to Deep Learning Commercial Frameworks
本文揭示了一种新型后门攻击,称为PQ后门,该攻击利用TensorFlow Lite和PyTorch Mobile等商业深度学习量化框架,在训练后量化之后才激活隐蔽后门。该攻击在全精度模型中嵌入一个处于休眠状态的后门,在标准检测下保持不可见,但在量化为int-8模型后,攻击成功率接近100%,凸显了在设备端AI部署流程中的关键安全风险。
Currently, there is a burgeoning demand for deploying deep learning (DL) models on ubiquitous edge Internet of Things (IoT) devices attributed to their low latency and high privacy preservation. However, DL models are often large in size and require large-scale computation, which prevents them from being placed directly onto IoT devices, where resources are constrained and 32-bit floating-point (float-32) operations are unavailable. Commercial framework (i.e., a set of toolkits) empowered model quantization is a pragmatic solution that enables DL deployment on mobile devices and embedded systems by effortlessly post-quantizing a large high-precision model (e.g., float-32) into a small low-precision model (e.g., int-8) while retaining the model inference accuracy. However, their usability might be threatened by security vulnerabilities. This work reveals that the standard quantization toolkits can be abused to activate a backdoor. We demonstrate that a full-precision backdoored model which does not have any backdoor effect in the presence of a trigger -- as the backdoor is dormant -- can be activated by the default i) TensorFlow-Lite (TFLite) quantization, the only product-ready quantization framework to date, and ii) the beta released PyTorch Mobile framework. When each of the float-32 models is converted into an int-8 format model through the standard TFLite or Pytorch Mobile framework's post-training quantization, the backdoor is activated in the quantized model, which shows a stable attack success rate close to 100% upon inputs with the trigger, while it behaves normally upon non-trigger inputs. This work highlights that a stealthy security threat occurs when an end user utilizes the on-device post-training model quantization frameworks, informing security researchers of cross-platform overhaul of DL models post quantization even if these models pass front-end backdoor inspections.
研究动机与目标
- 揭示商业深度学习量化框架中此前未知的安全漏洞,该漏洞可实现量化后隐蔽后门的激活。
- 证明后门可在全精度(float-32)模型中保持休眠且不可检测,即使在触发时也无异常行为,但在标准训练后量化后完全激活。
- 评估现有后门检测防御措施对这一新威胁的有效性,表明其在全精度阶段无法检测到后门。
- 提出并验证一种轻量级、用户友好的预防性防御方法,即在量化前向全精度模型中注入高斯噪声。
- 强调通过商业量化工具包进行设备端部署的风险,即使模型通过了前端安全检查。
提出的方法
- 攻击构建一个全精度后门模型(M_bd),其触发模式不会改变模型在干净输入或甚至触发输入下的行为,使其表现得看似无害。
- 后门仅通过TFLite或PyTorch Mobile的训练后量化过程激活,该过程将float-32模型转换为int-8模型。
- 该攻击利用量化特有的行为——特别是权重舍入和动态范围量化——在低精度模型中放大后门效应。
- 研究人员使用三种标准架构(VGG16、ResNet18、ResNet50)和三个数据集(MNIST、CIFAR10、GTSRB)在多种模型和数据配置下验证了该攻击。
- 提出一种预防性防御:在量化前向全精度模型的权重中注入小幅度高斯噪声,该方法可破坏量化后模型中的后门,同时不影响干净数据的准确率。
- 通过测量不同噪声幅度下的攻击成功率(ASR)和干净数据准确率(CDA),评估了噪声防御的有效性,结果显示ASR呈现两阶段下降。
实验结果
研究问题
- RQ1是否可以在全精度深度学习模型中嵌入后门,使其在标准检测下不可见,但仅在训练后量化后激活?
- RQ2现有后门检测防御措施在全精度模型阶段未能识别此类后门的程度如何?
- RQ3在标准商业量化框架下,PQ后门在不同模型架构和数据集上的有效性如何?
- RQ4轻量级、非训练依赖的防御是否能有效防止量化模型中的后门激活?
- RQ5高斯噪声注入通过何种机制破坏量化模型中的后门,同时不损害干净性能?
主要发现
- 当触发时,PQ后门在量化后的int-8模型中实现了接近100%的攻击成功率(ASR),而全精度模型中未表现出任何可检测的后门行为。
- 四种最先进的后门检测防御方法均未能在全精度模型阶段识别出该后门,证实其在量化前检测中的隐蔽性。
- 该攻击在多种模型架构(VGG16、ResNet18、ResNet50)和数据集(MNIST、CIFAR10、GTSRB)上均有效,证明了其广泛适用性。
- 该攻击仅通过TFLite和beta版PyTorch Mobile框架的量化过程激活,表明商业工具包中存在跨平台漏洞。
- 在量化前向全精度模型中注入高斯噪声可降低量化后模型中的ASR,呈现两阶段效应:初始抑制,随后部分恢复,再在高噪声水平下进一步抑制。
- 该噪声防御方法有效、轻量且无需微调,是一种针对PQ后门的实用预防措施。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。