arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.17710cs.LG
收藏

利用前向与反向近端量化器理解神经网络二值化

Understanding Neural Network Binarization with Forward and Backward Proximal Quantizers

University of Waterloo(滑铁卢大学);Vector Institute(Vector研究所);Huawei Noah’s Ark Lab(华为诺亚方舟实验室)

Yiwei Lu, Yaoliang Yu, Xinlin Li, Vahid Partovi Nia

AI总结:

本文从优化视角分析 BinaryConnect 类二值化方法中的梯度替代训练技巧,提出 ProxConnect++ 框架以统一现有前向-反向量化器,并据此设计增强算法 BNN++,在 CNN 和视觉 Transformer 上取得有竞争力的二值化结果。

摘要:

在神经网络二值化中,BinaryConnect(BC)及其变体被视为标准方法。这些方法在前向传播中应用符号函数,并将各自的梯度反向传播以更新权重。然而,符号函数的导数在可定义处均为零,这会导致训练停滞。因此,BC 的实现(例如 BNN)通常在反向计算中用恒等映射或其他近似梯度替代符号函数的导数。尽管这种做法在经验上效果良好,但它在很大程度上是一种启发式方法或“训练技巧”。我们旨在从优化视角阐明这些训练技巧。基于现有的 ProxConnect(PC,BC 的一种推广)理论,我们(1)为 PC 配备不同的前向-反向量化器,得到 ProxConnect++(PC++),它将现有的二值化技术作为特例包含在内;(2)推导出一种有原则的方法来合成具有自动理论保证的前向-反向量化器;(3)通过提出一种增强的二值化算法 BNN++ 来阐释我们的理论;(4)在卷积神经网络和视觉 Transformer 上进行图像分类实验,并经验性地验证 BNN++ 在对这些模型进行二值化时通常能取得有竞争力的结果。

英文摘要:

In neural network binarization, BinaryConnect (BC) and its variants are considered the standard. These methods apply the sign function in their forward pass and their respective gradients are backpropagated to update the weights. However, the derivative of the sign function is zero whenever defined, which consequently freezes training. Therefore, implementations of BC (e.g., BNN) usually replace the derivative of sign in the backward computation with identity or other approximate gradient alternatives. Although such practice works well empirically, it is largely a heuristic or ''training trick.'' We aim at shedding some light on these training tricks from the optimization perspective. Building from existing theory on ProxConnect (PC, a generalization of BC), we (1) equip PC with different forward-backward quantizers and obtain ProxConnect++ (PC++) that includes existing binarization techniques as special cases; (2) derive a principled way to synthesize forward-backward quantizers with automatic theoretical guarantees; (3) illustrate our theory by proposing an enhanced binarization algorithm BNN++; (4) conduct image classification experiments on CNNs and vision transformers, and empirically verify that BNN++ generally achieves competitive results on binarizing these models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑