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

描述和理解可靠部署量化模型的行为

Characterizing and Understanding the Behavior of Quantized Models for Reliable Deployment

University of Luxembourg(卢森堡大学);Singapore Management University(新加坡管理大学)

Qiang Hu, Yuejun Guo, Maxime Cordy, Xiaofei Xie, Wei Ma, Mike Papadakis, Yves Le Traon

摘要:

在过去的几十年里,深度神经网络(DNN)由于其在不同应用中的惊人性能而受到了相当大的关注,例如自然语言建模,自动驾驶辅助和源代码理解。随着快速探索,越来越多复杂的DNN架构以及庞大的预训练模型参数被提出。在用户友好的设备(例如,移动电话)在部署之前执行模型压缩。然而,最近的研究已经证明,模型压缩,例如,模型量化,产生精度下降,以及输出不一致时,测试看不见的数据。由于不可见数据往往包含分布偏移,且经常出现在野外,量化模型的质量和可靠性得不到保证。在本文中,我们进行了全面的研究,以表征和帮助用户理解量化模型的行为。我们的研究考虑了从图像到文本的4个数据集,8个DNN架构,包括前馈神经网络和递归神经网络,以及42个具有合成和自然分布偏移的偏移集。结果表明:(1)有分布偏移的数据比无分布偏移的数据发生更多的不一致。2)量化感知训练可以产生比标准,对抗和混合训练更稳定的模型。3)分歧通常具有更接近的前1和前2输出概率,并且$Margin$是比其他不确定性度量更好的区分分歧的指示器。4)有分歧的再培训在消除分歧方面效率有限。我们开源了我们的代码和模型,作为进一步研究量化模型的新基准。

英文摘要:

Deep Neural Networks (DNNs) have gained considerable attention in the past decades due to their astounding performance in different applications, such as natural language modeling, self-driving assistance, and source code understanding. With rapid exploration, more and more complex DNN architectures have been proposed along with huge pre-trained model parameters. The common way to use such DNN models in user-friendly devices (e.g., mobile phones) is to perform model compression before deployment. However, recent research has demonstrated that model compression, e.g., model quantization, yields accuracy degradation as well as outputs disagreements when tested on unseen data. Since the unseen data always include distribution shifts and often appear in the wild, the quality and reliability of quantized models are not ensured. In this paper, we conduct a comprehensive study to characterize and help users understand the behaviors of quantized models. Our study considers 4 datasets spanning from image to text, 8 DNN architectures including feed-forward neural networks and recurrent neural networks, and 42 shifted sets with both synthetic and natural distribution shifts. The results reveal that 1) data with distribution shifts happen more disagreements than without. 2) Quantization-aware training can produce more stable models than standard, adversarial, and Mixup training. 3) Disagreements often have closer top-1 and top-2 output probabilities, and $Margin$ is a better indicator than the other uncertainty metrics to distinguish disagreements. 4) Retraining with disagreements has limited efficiency in removing disagreements. We opensource our code and models as a new benchmark for further studying the quantized models.

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

↑