提出快慢梯度机制,提升二值神经网络优化效率
Fast and Slow Gradient Approximation for Binary Neural Network Optimization
- 设计历史梯度存储模块,融合历史梯度信息生成动量
- 在CIFAR-10和CIFAR-100上收敛更快,损失更低
- 适合边缘设备部署的高效二值网络优化
二值神经网络(BNNs)因其在边缘设备上的部署潜力受到广泛关注。然而,量化函数的不可导性导致无法进行反向传播,阻碍了BNN的优化。为此,基于超网络的方法通过神经网络学习非可导量化函数的梯度,展现出自适应优势。但现有方法仅依赖当前梯度信息,忽略历史梯度影响,易在优化中累积误差。为此,本文提出历史梯度存储(HGS)模块,建模历史梯度序列以生成一阶动量。进一步提出快慢梯度生成(FSG)方法,提升超网络梯度生成能力,并引入层识别嵌入(LRE),实现分层精细梯度生成。在CIFAR-10和CIFAR-100上的大量实验表明,本方法收敛更快、损失更低,优于现有基线。代码已开源。
原文摘要 · Abstract (English)
Binary Neural Networks (BNNs) have garnered significant attention due to their immense potential for deployment on edge devices. However, the non-differentiability of the quantization function poses a challenge for the optimization of BNNs, as its derivative cannot be backpropagated. To address this issue, hypernetwork based methods, which utilize neural networks to learn the gradients of non-differentiable quantization functions, have emerged as a promising approach due to their adaptive learning capabilities to reduce estimation errors. However, existing hypernetwork based methods typically rely solely on current gradient information, neglecting the influence of historical gradients. This oversight can lead to accumulated gradient errors when calculating gradient momentum during optimization. To incorporate historical gradient information, we design a Historical Gradient Storage (HGS) module, which models the historical gradient sequence to generate the first-order momentum required for optimization. To further enhance gradient generation in hypernetworks, we propose a Fast and Slow Gradient Generation (FSG) method. Additionally, to produce more precise gradients, we introduce Layer Recognition Embeddings (LRE) into the hypernetwork, facilitating the generation of layer-specific fine gradients. Extensive comparative experiments on the CIFAR-10 and CIFAR-100 datasets demonstrate that our method achieves faster convergence and lower loss values, outperforming existing baselines.Code is available at http://github.com/two-tiger/FSG .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。