[论文解读] Learning Sparse Neural Networks through $L_0$ Regularization
本文通过学习在训练中剪枝权重的随机门,提出一种在神经网络中进行 L0 范数正则化的实用框架,能够实现精确零值和条件计算,并通过可微分优化进行。
We propose a practical method for $L_0$ norm regularization for neural networks: pruning the network during training by encouraging weights to become exactly zero. Such regularization is interesting since (1) it can greatly speed up training and inference, and (2) it can improve generalization. AIC and BIC, well-known model selection criteria, are special cases of $L_0$ regularization. However, since the $L_0$ norm of weights is non-differentiable, we cannot incorporate it directly as a regularization term in the objective function. We propose a solution through the inclusion of a collection of non-negative stochastic gates, which collectively determine which weights to set to zero. We show that, somewhat surprisingly, for certain distributions over the gates, the expected $L_0$ norm of the resulting gated weights is differentiable with respect to the distribution parameters. We further propose the \emph{hard concrete} distribution for the gates, which is obtained by "stretching" a binary concrete distribution and then transforming its samples with a hard-sigmoid. The parameters of the distribution over the gates can then be jointly optimized with the original network parameters. As a result our method allows for straightforward and efficient learning of model structures with stochastic gradient descent and allows for conditional computation in a principled way. We perform various experiments to demonstrate the effectiveness of the resulting approach and regularizer.
研究动机与目标
- 激发稀疏性和模型压缩,以减少计算量并改善深度网络的泛化能力。
- 开发可微的代理,以替代不可微的 L0 范数,并在参数中保留精确的零值。
- 使网络参数和门分布参数能够通过基于梯度的方法进行联合优化。
- 展示在训练过程中可以诱导稀疏性,从而实现有条件的计算和加速。
- 在常用基准测试上展示具有竞争力的稀疏性-精度权衡。
提出的方法
- 将权重重新参数化为 theta_j = tilde_theta_j * z_j,其中 z_j ∈ {0,1},使 L0 转化为一个受门控的活动参数计数。
- 通过一个连续代理引入随机门 z_j ~ Bernoulli(pi_j) 来放宽离散门,以实现高效的梯度优化。
- 使用一个辅助的连续变量 s 定义一个带硬sigmoid 门的平滑目标 z = clamp(s),以在允许可重参数化的同时实现精确零值。
- 使用 concrete(hard-concrete)分布来建模门,通过拉伸一个二元 concrete 分布并应用硬 sigmoid,实现在门参数 phi 的可微学习。
- 将 L0 惩罚表达为活跃门的期望数量,并通过带重参数化的蒙特卡洛估计进行优化。
- 可选地将 L0 与 L2 正则化结合,并通过在参数组之间共享门来扩展到组稀疏。
实验结果
研究问题
- RQ1是否可以在神经网络中高效优化 L0 正则化,同时在权重中保留精确零值?
- RQ2硬具体门是否提供了一个适合的梯度友好代理,以在训练过程中实现有效剪枝?
- RQ3门参数和权重参数的联合学习是否能够产生具有竞争精度并潜在加速计算的稀疏模型?
- RQ4所提出的方法与现有的稀疏性先验和基于 dropout 的正则化在标准基准上的比较如何?
主要发现
- 与现有剪枝方法相比,该方法在 MNIST 和 CIFAR 基准上获得具有竞争力的测试准确性的稀疏化结构。
- 用 L0 正则化训练的神经网络在对成本影响更大的层(如某些网络的输入层或第一层全连接层)往往更积极地剪枝。
- 该方法在训练过程中实现浮点运算的渐进式减少,表明可能的训练加速,类似于有条件计算。
- 在 CIFAR 数据集上,L0 正则化的宽残差网络在某些正则化强度下优于 dropout 基线,同时由于稀疏性可以带来额外的加速。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。