Learning both Weights and Connections for Efficient Neural Networks

TL;DR

Proposed a connection importance learning-based pruning method; reduced AlexNet parameters by 9× and VGG-16 by 13× without accuracy loss.

cs.NE 🔴 Advanced 2015-06-09 37 views
Song Han Jeff Pool John Tran William J. Dally
neural network compression pruning deep learning model optimization image recognition

Key Findings

Methodology

The approach involves three steps: first, train the network to learn connection importance via gradient-based metrics; second, prune connections below a threshold, converting dense layers into sparse ones; third, fine-tune remaining weights. Regularization (L2) enhances importance learning. Iterative pruning refines the structure, achieving high compression ratios. Experiments on ImageNet show AlexNet’s parameters from 61M to 6.7M (9×), VGG-16 from 138M to 10.3M (13×), with negligible accuracy loss.

Key Results

  • On ImageNet, AlexNet’s parameters reduced from 61 million to 6.7 million (9× compression), with Top-1 error at 42.78% and Top-5 at 19.73%, matching baseline accuracy.
  • VGG-16’s parameters decreased from 138 million to 10.3 million (13×), with minimal error increase (Top-1 at 31.34%, Top-5 at 10.88%).
  • Multiple pruning iterations further improved compression, demonstrating the method’s robustness across architectures.

Significance

This work addresses the critical challenge of deploying large neural networks on resource-constrained devices by significantly reducing model size and energy consumption. It introduces a biologically inspired, importance-based connection learning framework, enabling models to adaptively prune redundant links while maintaining accuracy. The approach advances both theoretical understanding and practical deployment, opening pathways for real-time, low-power AI applications in mobile and embedded systems.

Technical Contribution

The paper presents a novel connection importance learning framework integrated with iterative pruning and retraining, contrasting with conventional magnitude-based methods. It combines regularization, importance metrics, and multi-round pruning to achieve high compression ratios. The method enables models to learn their own optimal sparse structure, facilitating hardware-friendly deployment without accuracy compromise. It also provides insights into layer-wise sensitivity and importance distribution, informing future model design.

Novelty

This is the first comprehensive framework that combines importance-based connection learning with iterative pruning, inspired by biological synaptic pruning. Unlike prior methods relying solely on weight magnitude, this approach dynamically learns which connections are critical during training, leading to much higher compression ratios with preserved accuracy. It bridges the gap between model pruning and structure learning, offering a new paradigm for neural network compression.

Limitations

  • The method depends on extensive initial training and multiple pruning-retraining cycles, increasing overall training time and complexity.
  • Effectiveness on ultra-deep or non-visual networks remains to be validated, as layer sensitivity varies significantly.
  • Hardware implementation of sparse matrices poses engineering challenges, especially for real-time inference acceleration, requiring specialized hardware design.

Future Work

Future directions include developing adaptive, data-driven thresholds for pruning, integrating quantization and hashing for further compression, and extending the framework to other architectures like transformers. Additionally, optimizing hardware support for sparse computation will be crucial for practical deployment.

AI Executive Summary

Deep neural networks have revolutionized fields like image recognition and natural language processing, yet their enormous size hampers deployment on mobile and embedded devices. Traditional models like AlexNet and VGG-16 contain tens to hundreds of millions of parameters, demanding significant storage, computation, and energy resources. This bottleneck limits real-time applications and increases costs, prompting urgent research into model compression techniques.

Existing methods such as quantization, low-rank approximation, and simple magnitude-based pruning have achieved some success but often fall short of balancing compression ratio and accuracy. Magnitude pruning, for example, removes low-weight connections but tends to be suboptimal because it ignores the importance of the connection in the network’s overall function.

This paper introduces a biologically inspired, importance-based connection learning framework. The core idea is to train the network to identify which connections are crucial for performance, then prune away the less important ones, and finally fine-tune the remaining structure. The importance of each connection is evaluated using gradient-based metrics during training, allowing the network to adaptively learn its own sparse architecture.

Experimental results on large-scale datasets like ImageNet demonstrate remarkable compression capabilities. AlexNet’s parameters are reduced from 61 million to 6.7 million (9×), and VGG-16 from 138 million to 10.3 million (13×), with negligible accuracy loss. Multiple pruning iterations further enhance compression ratios, showcasing the robustness of the approach. These compressed models significantly reduce storage needs and energy consumption, making real-time inference on mobile devices feasible.

The significance of this work lies in its biological plausibility and practical impact. By mimicking synaptic pruning in the brain, the method achieves high efficiency without sacrificing performance. It paves the way for deploying deep learning models in resource-constrained environments, accelerating AI adoption across industries. Future efforts will focus on hardware-aware sparse computation, adaptive pruning strategies, and extending the framework to other neural architectures, promising a new era of lightweight yet powerful AI models.

Deep Analysis

Background

Deep neural networks在图像识别、语音处理等领域取得巨大成功,但模型庞大带来存储、计算和能耗瓶颈。早期如LeNet-5仅有百万参数,后续AlexNet、VGG等模型参数逐步上升至百亿级。尽管性能优越,但在移动设备上难以部署,促使研究者探索模型压缩与剪枝技术。此前方法包括量化、低秩分解、哈希等,但多在单一技术上突破,缺乏系统性结构学习。近年来,剪枝成为主流,尤其是基于连接权重大小的剪枝,但效果有限,难以实现大幅压缩。

Core Problem

核心问题在于如何在不损失模型性能的前提下,实现参数的极大压缩。传统剪枝多依赖权重大小阈值,忽略连接的重要性动态变化,导致压缩效果有限。模型的冗余连接未被充分利用,深层网络中的梯度消失和参数调优困难,使得模型压缩变得复杂。如何学习连接的结构信息,动态识别关键连接,成为提升压缩比的关键。

Innovation

本研究提出结合连接重要性学习的剪枝策略,创新点在于:1)在训练阶段引入连接重要性指标,利用梯度信息衡量连接关键性;2)根据阈值剪除低重要性连接,将密集层转为稀疏层;3)多轮迭代剪枝与微调,逐步优化模型结构。不同于传统只依赖权重大小的剪枝,此方法模拟大脑突触修剪机制,动态学习连接网络拓扑,显著提高压缩比且保持性能。

Methodology

  • �� 训练:用标准反向传播学习参数,同时引入L2正则化增强稀疏性;
  • �� 连接重要性评估:利用梯度信息,衡量每个连接对损失的贡献;
  • �� 剪枝:设定阈值,将低于阈值的连接剪除,形成稀疏网络;
  • �� 微调:对剩余连接进行微调,恢复或提升模型性能;
  • �� 迭代:重复剪枝-微调过程,逐步提升压缩比,直至目标达成。

Experiments

在MNIST、ImageNet上验证,采用Caffe框架,调节剪枝阈值,比较不同正则化策略。对LeNet-300-100、LeNet-5、AlexNet、VGG-16进行剪枝,观察参数压缩比例和准确率变化。多轮迭代剪枝显著提升压缩比,AlexNet最高达9倍,VGG-16达13倍,精度无明显下降。还分析了不同层的敏感性和稀疏性分布,验证了方法的普适性。

Results

AlexNet在ImageNet上,参数从61M降至6.7M(9×压缩),Top-1误差无明显变化,保持在42.78%;VGG-16参数从138M降至10.3M(13×),误差变化极小,验证了方法的有效性。多轮迭代策略进一步提升压缩比,且剪枝后模型存储空间大幅减少,能耗显著降低,适合移动端部署。

Applications

该技术适用于需要模型轻量化的场景,如移动设备、嵌入式系统、实时图像识别等。通过大幅压缩模型参数,减少存储和能耗,提升推理速度,满足边缘计算需求。未来结合硬件优化,可实现高效稀疏矩阵运算,推动深度学习在实际场景的广泛应用。

Limitations & Outlook

依赖充分训练的模型,剪枝过程复杂,难以实时在线调整。对超深网络和非视觉任务的适应性尚未充分验证。稀疏矩阵存储和硬件实现仍面临工程挑战,尤其在实际硬件加速中,结构不规则性可能影响效率。未来需优化算法简化流程,增强泛化能力。

Plain Language Accessible to non-experts

想象你在整理一个大工厂的工具箱,里面装满了各种工具。有些工具用得少,很多工具占空间还影响效率。你会逐一检查每个工具,发现哪些用得少,就把它们收起来,只留下经常用的。这样,工具箱变得更轻便,取用也更快。这个方法就像给神经网络“整理工具箱”,把不常用的连接剪掉,只留下最重要的部分,让它变得更快、更省资源,还能保持原来的工作能力。

ELI14 Explained like you're 14

想象你在玩一个超级复杂的游戏,里面有很多技能和装备。有些技能你用得很少,装备也没怎么用到。你会不会觉得,游戏变得太重,反应变慢?其实,你可以把那些用得少的技能和装备都收起来,只留下最常用的。这样,你的角色变得更轻快,反应也更快,还能打得更厉害。深度学习模型也是一样的,把那些不重要的连接剪掉,就像整理背包一样,让模型变得更快、更省电,还能在手机上跑得动!

Glossary

Pruning (剪枝)

在神经网络中,将低重要性连接或参数删除的过程,以减少模型复杂度和存储需求。技术上通过阈值筛选,保留关键连接。

本文采用剪枝策略,学习连接重要性后剪除冗余连接,提升模型压缩比。

Connectivity Importance (连接重要性)

衡量神经网络中每个连接对模型性能贡献的指标,结合梯度信息评估连接的关键程度。

通过学习连接重要性,指导剪枝,确保模型在压缩后仍保持高准确率。

Sparse Network (稀疏网络)

大部分连接被剪除后形成的网络结构,连接数远少于密集网络,便于存储和计算优化。

剪枝后网络由稀疏矩阵表示,减少存储空间和能耗。

Iterative Pruning (迭代剪枝)

多轮剪枝与微调交替进行的策略,以逐步提升压缩比,避免性能大幅下降。

多次迭代剪枝实现AlexNet参数压缩9倍,VGG-16压缩13倍。

Open Questions Unanswered questions from this research

  • 1 在超深网络中保持剪枝效率的机制尚未完善,未来需要更稳定的连接重要性评估方法。
  • 2 硬件实现稀疏矩阵存储与加速仍是挑战,需结合硬件设计优化算法。

Abstract

Neural networks are both computationally intensive and memory intensive, making them difficult to deploy on embedded systems. Also, conventional networks fix the architecture before training starts; as a result, training cannot improve the architecture. To address these limitations, we describe a method to reduce the storage and computation required by neural networks by an order of magnitude without affecting their accuracy by learning only the important connections. Our method prunes redundant connections using a three-step method. First, we train the network to learn which connections are important. Next, we prune the unimportant connections. Finally, we retrain the network to fine tune the weights of the remaining connections. On the ImageNet dataset, our method reduced the number of parameters of AlexNet by a factor of 9x, from 61 million to 6.7 million, without incurring accuracy loss. Similar experiments with VGG-16 found that the number of parameters can be reduced by 13x, from 138 million to 10.3 million, again with no loss of accuracy.

cs.NE cs.CV cs.LG