Efficient inference of Deep Neural Networks (DNNs) on resource-constrained edge devices is essential. Quantization and sparsity are key algorithmic techniques that translate to repetition and sparsity within tensors at the hardware-software interface. This paper introduces the concept of repetition-sparsity trade-off that helps explain computational efficiency during inference. We propose Signed Binarization, a unified co-design framework that synergistically integrates hardware-software systems, quantization functions, and representation learning techniques to address this trade-off. Our results demonstrate that Signed Binarization is more accurate than binarization with the same number of non-zero weights. Detailed analysis indicates that signed binarization generates a smaller distribution of effectual (non-zero) parameters nested within a larger distribution of total parameters, both of the same type, for a DNN block. Finally, our approach achieves a 26% speedup on real hardware, doubles energy efficiency, and reduces density by 2.8x compared to binary methods for ResNet 18, presenting an alternative solution for deploying efficient models in resource-limited environments.
翻译:深度神经网络(DNN)在资源受限的边缘设备上的高效推理至关重要。量化与稀疏性是关键的算法技术,它们在硬件-软件接口层面转化为张量内部的重复性与稀疏性。本文提出重复-稀疏权衡的概念,用以解释推理过程中的计算效率。我们提出有符号二值化,这是一个统一的协同设计框架,通过协同整合硬件-软件系统、量化函数与表征学习技术来应对这一权衡。实验结果表明,在非零权重数量相同的情况下,有符号二值化比标准二值化具有更高的准确率。详细分析表明,有符号二值化在一个更大的同类型总参数分布内部,为DNN模块生成一个更小的有效(非零)参数分布。最终,在ResNet-18网络上,与二值化方法相比,我们的方法在实际硬件上实现了26%的加速、两倍的能效提升,并将密度降低了2.8倍,为资源受限环境下的高效模型部署提供了替代方案。