arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.16479cs.SE
收藏

无模型即最佳模型:生成纯代码实现以替代端侧深度学习模型

Model-less Is the Best Model: Generating Pure Code Implementations to Replace On-Device DL Models

Mingyi Zhou, Xiang Gao, Pei Liu, John Grundy, Chunyang Chen, Xiao Chen, Li Li

AI总结:

本文提出 CustomDLCoder 方法,将端侧深度学习模型自动转换为不含显式模型表示的纯代码可执行程序,以抵御模型提取攻击,并同时提升推理速度、降低内存占用。

摘要:

近期研究表明,已部署的深度学习(DL)模型(例如 TensorFlow Lite(TFLite)中的模型)能够被攻击者从真实应用和设备中轻易提取,从而制造对抗攻击等多种攻击。尽管保护已部署的端侧深度学习模型已受到越来越多的关注,但现有方法均无法完全防范上述威胁。传统软件保护技术已被广泛探索,如果端侧模型能够用纯代码(如 C++)实现,将为复用现有软件保护技术提供可能。然而,由于深度学习模型的复杂性,目前尚无自动化方法能够将深度学习模型翻译为纯代码。为填补这一空白,我们提出了一种新方法 CustomDLCoder,能够自动提取端侧模型信息,并为广泛的深度学习模型合成定制化的可执行程序。CustomDLCoder 首先解析深度学习模型,提取其后端计算单元,将计算单元配置为图,然后生成定制化代码,在不保留显式模型表示的情况下实现并部署机器学习解决方案。由于无需保留显式模型表示,所合成的程序在深度学习部署环境中隐藏了模型信息,从而阻止了许多针对深度学习模型的攻击。此外,由于定制化代码去除了模型解析和预处理步骤,仅保留数据计算过程,因此还提升了机器学习性能。我们的实验结果表明,CustomDLCoder 通过禁用端侧模型嗅探提升了模型安全性。与原始端侧平台(即 TFLite)相比,我们的方法在 x86-64 和 ARM64 平台上分别可将模型推理加速 21.8% 和 24.3%。最重要的是,在 x86-64 和 ARM64 平台上,它分别可显著减少 68.8% 和 36.0% 的内存消耗。

英文摘要:

Recent studies show that deployed deep learning (DL) models such as those of Tensor Flow Lite (TFLite) can be easily extracted from real-world applications and devices by attackers to generate many kinds of attacks like adversarial attacks. Although securing deployed on-device DL models has gained increasing attention, no existing methods can fully prevent the aforementioned threats. Traditional software protection techniques have been widely explored, if on-device models can be implemented using pure code, such as C++, it will open the possibility of reusing existing software protection techniques. However, due to the complexity of DL models, there is no automatic method that can translate the DL models to pure code. To fill this gap, we propose a novel method, CustomDLCoder, to automatically extract the on-device model information and synthesize a customized executable program for a wide range of DL models. CustomDLCoder first parses the DL model, extracts its backend computing units, configures the computing units to a graph, and then generates customized code to implement and deploy the ML solution without explicit model representation. The synthesized program hides model information for DL deployment environments since it does not need to retain explicit model representation, preventing many attacks on the DL model. In addition, it improves ML performance because the customized code removes model parsing and preprocessing steps and only retains the data computing process. Our experimental results show that CustomDLCoder improves model security by disabling on-device model sniffing. Compared with the original on-device platform (i.e., TFLite), our method can accelerate model inference by 21.8% and 24.3% on x86-64 and ARM64 platforms, respectively. Most importantly, it can significantly reduce memory consumption by 68.8% and 36.0% on x86-64 and ARM64 platforms, respectively.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑