嵌入式设备上的深度学习推理是一个新兴的领域,有着无数的应用,因为微型嵌入式设备无处不在。但我们必须克服重大挑战,才能从这一机会中获益。嵌入式处理器是严重的资源约束。它们最接近的移动对手在计算能力、内存可用性和功耗方面表现出至少100 - 1,000倍的差异。因此,机器学习(ML)模型和相关的ML推理框架不仅必须有效地执行,而且还必须在几个字节的内存中运行。此外,嵌入式设备的生态系统非常分散。为了最大限度地提高效率,系统供应商通常会省略许多主流系统中常见的功能,包括动态内存分配和虚拟内存,这些功能允许跨平台的互操作性。硬件有多种风格(例如,指令集架构和FPU支持,或缺乏支持)。我们介绍TensorFlow Lite Micro(TF Micro),这是一个开源ML推理框架,用于在嵌入式系统上运行深度学习模型。TF Micro解决了嵌入式系统资源限制和碎片化挑战带来的效率要求,这些挑战使得跨平台互操作性几乎不可能实现。该框架采用了独特的基于解释器的方法,在克服这些挑战的同时提供了灵活性。本文解释了TF Micro背后的设计决策,并描述了其实施细节。此外,我们提出了一个评估,以证明其低资源需求和最小的运行时性能开销。
英文摘要:
Deep learning inference on embedded devices is a burgeoning field with myriad applications because tiny embedded devices are omnipresent. But we must overcome major challenges before we can benefit from this opportunity. Embedded processors are severely resource constrained. Their nearest mobile counterparts exhibit at least a 100 -- 1,000x difference in compute capability, memory availability, and power consumption. As a result, the machine-learning (ML) models and associated ML inference framework must not only execute efficiently but also operate in a few kilobytes of memory. Also, the embedded devices' ecosystem is heavily fragmented. To maximize efficiency, system vendors often omit many features that commonly appear in mainstream systems, including dynamic memory allocation and virtual memory, that allow for cross-platform interoperability. The hardware comes in many flavors (e.g., instruction-set architecture and FPU support, or lack thereof). We introduce TensorFlow Lite Micro (TF Micro), an open-source ML inference framework for running deep-learning models on embedded systems. TF Micro tackles the efficiency requirements imposed by embedded-system resource constraints and the fragmentation challenges that make cross-platform interoperability nearly impossible. The framework adopts a unique interpreter-based approach that provides flexibility while overcoming these challenges. This paper explains the design decisions behind TF Micro and describes its implementation details. Also, we present an evaluation to demonstrate its low resource requirement and minimal run-time performance overhead.
MicroNets: Neural Network Architectures for Deploying TinyML Applications on Commodity Microcontrollers
Arm ML Research(Arm机器学习研究院);Harvard University(哈佛大学);SambaNova Systems
在资源受限的微控制器(MCU)上本地执行机器学习工作负载有望大幅扩展物联网的应用空间。然而,所谓的TinyML提出了严峻的技术挑战,因为深度神经网络推理需要大量的计算和内存预算。为了应对这一挑战,神经架构搜索(NAS)有望帮助设计出精确的ML模型,以满足MCU内存、延迟和能量的严格限制。NAS算法的一个关键组成部分是它们的延迟/能量模型,即,从给定的神经网络架构到其在MCU上的推理延迟/能量的映射。在本文中,我们观察到一个有趣的性质NAS搜索空间的MCU模型设计:平均而言,模型延迟与模型操作(op)计数线性变化下,一个统一的先验模型在搜索空间。利用这一洞察力,我们采用可区分NAS(DNAS)来搜索具有低内存使用和低操作数的模型,其中操作数被视为延迟的可行代理。实验结果验证了我们的方法,产生了我们的MicroNet模型,我们使用Tensorflow Lite Micro(TinyML社区中广泛使用的标准开源NN推理运行时)将其部署在MCU上。MicroNets展示了所有三个TinyMLperf行业标准基准任务的最新结果:视觉唤醒词,音频关键字定位和异常检测。模型和培训脚本可以在github.com/ARM-software/ML-zoo上找到。
Measuring what Really Matters: Optimizing Neural Networks for TinyML
ETH Zürich(苏黎世联邦理工学院);RWTH Aachen(亚琛工业大学)
随着廉价的计算和存储资源的激增,神经网络(NN)在架构和计算复杂性方面经历了前所未有的增长。将NN引入资源受限的设备可以实现经济高效的部署、广泛的可用性和敏感数据的保存。这项工作解决了将机器学习引入MCU的挑战,我们专注于无处不在的ARM Cortex-M架构。优化方法、软件框架和MCU硬件架构对推理延迟和能耗等关键性能指标的详细影响和权衡,以前尚未针对TensorFlow Lite Micro等最先进的框架进行深入研究。我们发现,经验调查,衡量可感知的指标-性能体验的用户-是必不可少的,因为专门的指令和层类型的影响可能是微妙的。为此,我们提出了一个实现感知的设计作为一个具有成本效益的方法进行验证和基准测试。利用我们开发的工具链,我们演示了如何通过系统地优化NN以适应其目标应用场景来改进资源受限设备上的现有NN部署。
Deep Learning-based ECG Classification on Raspberry PI using a Tensorflow Lite Model based on PTB-XL Dataset
University of Manitoba(曼尼托巴大学)
自COVID-19疫情以来,由于需求增加,医疗保健领域的物联网设备数量预计将大幅增加。深度学习和物联网设备正在被用于监测身体生命体征,并在临床和非临床环境中自动检测异常。目前的大多数技术都需要将原始数据传输到远程服务器,这对于资源受限的物联网设备和嵌入式系统来说效率低下。此外,由于缺乏广泛的开放公共数据库,开发用于ECG分类的机器学习模型具有挑战性。在某种程度上,为了克服这一挑战,使用了PTB-XL数据集。在这项工作中,我们开发了将部署在Raspberry Pi上的机器学习模型。我们使用两个分类类对我们的TensorFlow模型进行了评估。我们还对相应的TensorFlow Lite FlatBuffers进行了评估,以证明其最低的运行时要求,同时保持可接受的准确性。
A Compression-Compilation Framework for On-mobile Real-time BERT Applications
College of William and Mary(威廉与玛丽学院);Northeastern University(东北大学);University of Notre Dame(圣母大学);University of Connecticut(康涅狄格大学);IBM Research(IBM研究院)
Systematic Literature Review of Machine Learning Models and Applications for Text Recognition
Faculty of Electrical Engineering, Universiti Teknologi Malaysia(马来西亚工艺大学电气工程学院);Faculty of Artificial Intelligence, Universiti Teknologi Malaysia(马来西亚工艺大学人工智能学院);Department of Electrical and Electronic Engineering, American International University-Bangladesh(孟加拉国美国国际大学电气与电子工程系);Department of Electrical Engineering, Balochistan University of Information Technology, Engineering and Management Sciences(巴基斯坦俾路支省信息技术、工程与管理科学大学电气工程系)
SPFlow: An Easy and Extensible Library for Deep Probabilistic Learning using Sum-Product Networks
TU Darmstadt(达姆施塔特工业大学);Max-Planck-Institute(马克斯-普朗克研究所);University of Cambridge(剑桥大学);University of Waterloo(滑铁卢大学);University of Bari “Aldo Moro”(巴里大学“阿尔多·莫罗”)
UCLA(加州大学洛杉矶分校);Northwestern Kellogg School of Management(西北大学凯洛格管理学院);University of Chicago(芝加哥大学);Harvard Medical School(哈佛医学院);Santa Fe Institute(圣塔菲研究所)
ShadowNet: A Secure and Efficient On-device Model Inference System for Convolutional Neural Networks
Google(谷歌);Florida International University(佛罗里达国际大学);Northeastern University(东北大学);University of California, San Diego(加州大学圣地亚哥分校);University of Wisconsin-Madison(威斯康星大学麦迪逊分校)
Quantization Backdoors to Deep Learning Commercial Frameworks
The University of Adelaide(阿德莱德大学);Data61, CSIRO(联邦科学与工业研究组织数据61所);Nanjing University of Science and Technology(南京理工大学);The University of Western Australia(西澳大学);Hunan University(湖南大学)