通过分层渐进二值化提升深度二值网络训练效果
Layerwise Progressive Freezing: A Training Scaffold for Depth-Scalable Binary Networks
- 逐层从输入到输出渐进二值化,避免梯度失配
- 深度越深提升越显著,ResNet-50在ImageNet上+18.0%
- 无需STE即可实现稳定训练,适合部署资源受限模型
从零训练二值神经网络(BNN)普遍依赖直通估计器(STE),其前向与反向不匹配导致深度增加时精度严重下降。本文提出一种新思路:何时何地施加二值化。引入StoMPP(随机掩码部分渐进二值化),按从输入到输出的顺序,逐层用硬二值权重和激活替换截断值,配合软刷新的随机部分掩码。StoMPP作为独立训练规则,实现全无STE流程,在深层网络中表现优异(ResNet-50 BNN在CIFAR-10/100/ImageNet上分别提升+18.0/+13.5/+3.8),且在ResNet-18/34/50、MobileNetV2及BERT微调中均有效。结合代理梯度(仅对冻结层使用STE),性能进一步提升至+27.1/+19.8/+17.7。核心发现是:二值化顺序至关重要——正向推进防止深度坍塌,反向推进降至近随机水平;而仅二值权重的网络对顺序不敏感。该不对称性源于激活引发的梯度阻断:一旦激活被固定为二值,上游梯度流即被切断,顺序控制了阻断发生时机。所有消融实验均在无STE环境下进行,确保结论归因于进度机制本身。
原文摘要 · Abstract (English)
Training binary neural networks (BNNs) from scratch is dominated by the straight-through estimator (STE), whose forward/backward mismatch produces severe accuracy degradation as networks deepen. We study an orthogonal axis: when and where binarization is enforced during training. We introduce StoMPP (Stochastic Masked Partial Progressive Binarization), which gradually replaces clipped weights and activations with their hard binary counterparts layer by layer from input to output, using stochastic partial masks with soft refresh. StoMPP delivers two complementary benefits. As a standalone training rule, it provides a fully STE-free procedure that improves over vanilla STE with gains that grow with depth (ResNet-50 BNN: +18.0/+13.5/+3.8 on CIFAR-10/100/ImageNet), and the pattern holds across ResNet-18/34/50, MobileNetV2, and BERT fine-tuning. Composed with surrogate gradients by applying STE only to frozen entries, it reaches +27.1/+19.8/+17.7 over vanilla STE on the same setting. Underlying both regimes is a single mechanistic finding: progression order is decisive. Forward layerwise progression prevents depth collapse, reverse progression collapses to near-chance, and binary-weight networks (without binary activations) are insensitive to order. We trace this asymmetry to activation-induced gradient blockades: a committed binary activation severs gradient flow upstream, and ordering controls when these blockades form. To isolate the progression's contribution from any benefit conferred by STE, we conduct all ablations in the STE-free regime; the resulting characterization (schedule, refresh, ordering, dynamics) thus reflects the progression itself rather than its interaction with surrogate gradients.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。