在微控制器上动态跳过无效计算,实现无需重训练的高效推理
UnIT: Scalable Unstructured Inference-Time Pruning for MAC-efficient Neural Inference on MCUs
- 推理时根据输入激活模式动态跳过冗余乘加运算
- 在MSP430上实现最高82%的乘加操作减少和84%能耗降低
- 适合资源受限设备,无需硬件改动或模型重训
现有剪枝方法通常在训练或编译时应用,依赖结构化稀疏性。尽管适用于低功耗微控制器(MCUs),但结构化剪枝未能充分利用无SIMD或并行计算支持设备的细粒度效率潜力。为此,我们提出UnIT(非结构化推理时剪枝),一种轻量级方法,在推理过程中基于输入特定的激活模式动态识别并跳过不必要的乘加(MAC)操作。与结构化剪枝不同,UnIT采用不规则稀疏性,无需重训练或硬件特殊化。它将剪枝决策转化为轻量级比较,用阈值检查和近似除法替代乘法。通过跨连接复用阈值计算,并应用层与组级剪枝敏感性优化计算。我们提出了三种针对常见嵌入式平台特性的快速、硬件友好的除法近似方法。在MSP430微控制器上,相比训练时剪枝模型,UnIT实现11.02%至82.03%的MAC减少,27.30%至84.19%的推理加速,以及27.33%至84.38%的能耗降低,同时保持0.48%-7%的精度损失。在域偏移下,UnIT表现匹配甚至优于重训练模型,且所需MAC更少。这些结果证明非结构化推理时剪枝是部署深度神经网络于MCU上的一种可行且实用的解决方案。
原文摘要 · Abstract (English)
Existing pruning methods are typically applied during training or compile time and often rely on structured sparsity. While compatible with low-power microcontrollers (MCUs), structured pruning underutilizes the opportunity for fine-grained efficiency on devices without SIMD support or parallel compute. To address these limitations, we introduce UnIT (Unstructured Inference-Time pruning), a lightweight method that dynamically identifies and skips unnecessary multiply-accumulate (MAC) operations during inference, guided by input-specific activation patterns. Unlike structured pruning, UnIT embraces irregular sparsity and does not require retraining or hardware specialization. It transforms pruning decisions into lightweight comparisons, replacing multiplications with threshold checks and approximated divisions. UnIT further optimizes compute by reusing threshold computations across multiple connections and applying layer- and group-specific pruning sensitivity. We present three fast, hardware-friendly division approximations tailored to the capabilities of common embedded platforms. Demonstrated on the MSP430 microcontroller, UnIT achieves 11.02% to 82.03% MAC reduction, 27.30% to 84.19% faster inference, and 27.33% to 84.38% lower energy consumption compared to training-time pruned models, while maintaining accuracy with 0.48-7%. Under domain shift, UnIT matches or exceeds the accuracy of retrained models while requiring significantly fewer MACs. These results establish unstructured inference-time pruning as a viable and practical solution for efficient, retraining-free deployment of deep neural networks on MCUs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。