用编码思想压缩深度学习模型,省算力还省通信开销。
Coded Deep Learning: Framework and Algorithm
- 将信息论编码融入训练过程,量化权重与激活值
- 训练时全程使用量化数据,浮点运算大幅减少
- 模型天然可压缩,适合资源受限场景部署
深度学习的成功常依赖大模型与高复杂度,限制了在资源受限环境中的训练。本文提出新框架「编码深度学习」(CDL),将信息论编码思想融入深度学习内部,显著压缩模型权重与激活值,降低训练与推理的计算复杂度,并实现高效的模型/数据并行。具体而言:(i) 提出一种概率量化方法及其可微变体,支持训练中梯度解析计算;(ii) 训练时前向与反向传播均在量化数据上执行,消除多数浮点运算;(iii) 训练中对权重与激活施加熵约束,使其全程可压缩,降低并行通信成本;(iv) 训练完成的模型默认为可压缩的量化格式,降低推理与存储开销。此外,提出松弛版CDL(R-CDL),在保持其他优势前提下,以全精度训练换取更高准确率与压缩比的平衡。大量实验表明,CDL与R-CDL在深度神经网络压缩方面优于现有最先进算法。
原文摘要 · Abstract (English)
The success of deep learning (DL) is often achieved with large models and high complexity during both training and post-training inferences, hindering training in resource-limited settings. To alleviate these issues, this paper introduces a new framework dubbed ``coded deep learning'' (CDL), which integrates information-theoretic coding concepts into the inner workings of DL, to significantly compress model weights and activations, reduce computational complexity at both training and post-training inference stages, and enable efficient model/data parallelism. Specifically, within CDL, (i) we first propose a novel probabilistic method for quantizing both model weights and activations, and its soft differentiable variant which offers an analytic formula for gradient calculation during training; (ii) both the forward and backward passes during training are executed over quantized weights and activations, eliminating most floating-point operations and reducing training complexity; (iii) during training, both weights and activations are entropy constrained so that they are compressible in an information-theoretic sense throughout training, thus reducing communication costs in model/data parallelism; and (iv) the trained model in CDL is by default in a quantized format with compressible quantized weights, reducing post-training inference and storage complexity. Additionally, a variant of CDL, namely relaxed CDL (R-CDL), is presented to further improve the trade-off between validation accuracy and compression though requiring full precision in training with other advantageous features of CDL intact. Extensive empirical results show that CDL and R-CDL outperform the state-of-the-art algorithms in DNN compression in the literature.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。