Traditional machine learning techniques are prone to generating inaccurate predictions when confronted with shifts in the distribution of data between the training and testing phases. This vulnerability can lead to severe consequences, especially in applications such as mobile healthcare. Uncertainty estimation has the potential to mitigate this issue by assessing the reliability of a model's output. However, existing uncertainty estimation techniques often require substantial computational resources and memory, making them impractical for implementation on microcontrollers (MCUs). This limitation hinders the feasibility of many important on-device wearable event detection (WED) applications, such as heart attack detection. In this paper, we present UR2M, a novel Uncertainty and Resource-aware event detection framework for MCUs. Specifically, we (i) develop an uncertainty-aware WED based on evidential theory for accurate event detection and reliable uncertainty estimation; (ii) introduce a cascade ML framework to achieve efficient model inference via early exits, by sharing shallower model layers among different event models; (iii) optimize the deployment of the model and MCU library for system efficiency. We conducted extensive experiments and compared UR2M to traditional uncertainty baselines using three wearable datasets. Our results demonstrate that UR2M achieves up to 864% faster inference speed, 857% energy-saving for uncertainty estimation, 55% memory saving on two popular MCUs, and a 22% improvement in uncertainty quantification performance. UR2M can be deployed on a wide range of MCUs, significantly expanding real-time and reliable WED applications.
翻译:传统机器学习技术在面对训练与测试阶段数据分布偏移时,容易产生不准确的预测。这种脆弱性可能导致严重后果,尤其在移动健康监测等应用中。不确定性估计通过评估模型输出的可靠性,有望缓解这一问题。然而,现有不确定性估计技术通常需要大量计算资源和内存,使其难以在微控制器(MCU)上实现。这一局限性阻碍了许多重要的可穿戴设备事件检测(WED)应用(如心脏病发作检测)的可行性。本文提出UR2M——一种面向MCU的新型不确定性与资源感知事件检测框架。具体而言,我们:(i) 基于证据理论开发了不确定性感知的WED方法,实现准确的事件检测与可靠的不确定性估计;(ii) 引入级联机器学习框架,通过在不同事件模型之间共享较浅网络层,利用早期退出机制实现高效模型推理;(iii) 优化模型部署与MCU库以实现系统效率。我们使用三个可穿戴数据集开展了大量实验,并将UR2M与传统不确定性基线方法进行对比。结果表明,在两种主流MCU上,UR2M实现了高达864%的推理速度提升、857%的不确定性估计能耗节省、55%的内存节约,以及22%的不确定性量化性能提升。UR2M可部署于广泛类型的MCU,显著扩展了实时且可靠的WED应用。