arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.12659cs.LGcs.AIcs.CV
收藏

DKM:用于神经网络压缩的可微K均值聚类层

DKM: Differentiable K-Means Clustering Layer for Neural Network Compression

Apple(苹果公司)

Minsik Cho, Keivan A. Vahid, Saurabh Adya, Mohammad Rastegari

摘要:

深度神经网络(DNN)模型压缩用于有效的设备上推理对于降低存储器需求并将用户数据保持在设备上变得越来越重要。为此,我们提出了一种新的可微分k均值聚类层(DKM)及其在基于训练时权重聚类的DNN模型压缩中的应用。DKM将k-means聚类作为注意力问题,并实现DNN参数和聚类中心的联合优化。与依赖于额外的正则化器和参数的先前工作不同,基于DKM的压缩保持原始损失函数和模型架构固定。我们在各种DNN模型上评估了基于DKM的压缩,用于计算机视觉和自然语言处理(NLP)任务。我们的研究结果表明,DKM在ImageNet 1 k和GLUE基准测试中提供了卓越的压缩和准确性权衡。例如,基于DKM的压缩可以在ResNet 50 DNN模型上提供74.5%的top-1 ImageNet 1 k准确度,模型大小为3.3MB(29.4x模型压缩因子)。对于MobileNet-v1,这是一个具有挑战性的DNN压缩,DKM提供了63.9%的top-1 ImageNet 1 k精度与0.72 MB的模型大小(22.4倍模型压缩因子)。这一结果比当前最先进的DNN压缩算法高出6.8%的top-1精度和33%的相对较小的模型大小。此外,DKM可以将DistilBERT模型压缩11.8倍,在GLUE NLP基准测试中损失最小(1.1%)的准确性。

英文摘要:

Deep neural network (DNN) model compression for efficient on-device inference is becoming increasingly important to reduce memory requirements and keep user data on-device. To this end, we propose a novel differentiable k-means clustering layer (DKM) and its application to train-time weight clustering-based DNN model compression. DKM casts k-means clustering as an attention problem and enables joint optimization of the DNN parameters and clustering centroids. Unlike prior works that rely on additional regularizers and parameters, DKM-based compression keeps the original loss function and model architecture fixed. We evaluated DKM-based compression on various DNN models for computer vision and natural language processing (NLP) tasks. Our results demonstrate that DKM delivers superior compression and accuracy trade-off on ImageNet1k and GLUE benchmarks. For example, DKM-based compression can offer 74.5% top-1 ImageNet1k accuracy on ResNet50 DNN model with 3.3MB model size (29.4x model compression factor). For MobileNet-v1, which is a challenging DNN to compress, DKM delivers 63.9% top-1 ImageNet1k accuracy with 0.72 MB model size (22.4x model compression factor). This result is 6.8% higher top-1accuracy and 33% relatively smaller model size than the current state-of-the-art DNN compression algorithms. Additionally, DKM enables compression of DistilBERT model by 11.8x with minimal (1.1%) accuracy loss on GLUE NLP benchmarks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑