提出可量化神经网络冗余度的新方法,助力模型轻量化。
RedTest: Towards Measuring Redundancy in Deep Neural Networks Effectively
- 设计结构冗余评分MSRS,定量衡量模型冗余程度。
- 实验表明移除冗余对模型性能影响极小,但模型更小。
- 适用于NAS搜索与大模型剪枝,适合资源受限场景。
深度学习在众多实际应用中革新了计算,但大型模型训练和使用成本高昂,需在资源受限场景(如移动端)下进行轻量化优化。当前优化方法缺乏对模型剩余冗余的量化评估。为此,本文提出新测试方法RedTest,引入模型结构冗余评分(MSRS),可有效揭示并量化深层模型中的冗余问题。实验显示,基于MSRS的冗余感知算法在神经架构搜索中能引导找到更优结构;在大规模预训练模型剪枝中,通过层相似性指导剪枝,显著减小模型尺寸且几乎不影响性能。大量实验证明,去除冗余对模型实用性影响微乎其微。
原文摘要 · Abstract (English)
Deep learning has revolutionized computing in many real-world applications, arguably due to its remarkable performance and extreme convenience as an end-to-end solution. However, deep learning models can be costly to train and to use, especially for those large-scale models, making it necessary to optimize the original overly complicated models into smaller ones in scenarios with limited resources such as mobile applications or simply for resource saving. The key question in such model optimization is, how can we effectively identify and measure the redundancy in a deep learning model structure. While several common metrics exist in the popular model optimization techniques to measure the performance of models after optimization, they are not able to quantitatively inform the degree of remaining redundancy. To address the problem, we present a novel testing approach, i.e., RedTest, which proposes a novel testing metric called Model Structural Redundancy Score (MSRS) to quantitatively measure the degree of redundancy in a deep learning model structure. We first show that MSRS is effective in both revealing and assessing the redundancy issues in many state-of-the-art models, which urgently calls for model optimization. Then, we utilize MSRS to assist deep learning model developers in two practical application scenarios: 1) in Neural Architecture Search, we design a novel redundancy-aware algorithm to guide the search for the optimal model structure and demonstrate its effectiveness by comparing it to existing standard NAS practice; 2) in the pruning of large-scale pre-trained models, we prune the redundant layers of pre-trained models with the guidance of layer similarity to derive less redundant ones of much smaller size. Extensive experimental results demonstrate that removing such redundancy has a negligible effect on the model utility.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。