SiMaN: Sign-to-Magnitude Network Binarization

Mingbao Lin, Rongrong Ji, Zihan Xu, Baochang Zhang, Fei Chao +2 more
2/16/2021
34 citations
cs.CVcs.AI

Official code: lmbxmu/SiMaN (8 stars, Python, last commit 2022-12-30).

Abstract

Binary neural networks (BNNs) have attracted broad research interest due to their efficient storage and computational ability. Nevertheless, a significant challenge of BNNs lies in handling discrete constraints while ensuring bit entropy maximization, which typically makes their weight optimization very difficult.

Show full abstract

Existing methods relax the learning using the sign function, which simply encodes positive weights into +1s, and -1s otherwise. Alternatively, we formulate an angle alignment objective to constrain the weight binarization to {0,+1} to solve the challenge. In this paper, we show that our weight binarization provides an analytical solution by encoding high-magnitude weights into +1s, and 0s otherwise. Therefore, a high-quality discrete solution is established in a computationally efficient manner without the sign function. We prove that the learned weights of binarized networks roughly follow a Laplacian distribution that does not allow entropy maximization, and further demonstrate that it can be effectively solved by simply removing the $\ell_2$ regularization during network training. Our method, dubbed sign-to-magnitude network binarization (SiMaN), is evaluated on CIFAR-10 and ImageNet, demonstrating its superiority over the sign-based state-of-the-arts. Our source code, experimental settings, training logs and binary models are available at https://github.com/lmbxmu/SiMaN.

View on arXivView PDF

Code Implementations(1)

lmbxmu/SiMaNOfficial100%

Pytorch implementation of our paper accepted by TPAMI 2022 -- SiMaN: Sign-to-Magnitude Network Binarization

82Python, ShellJan 12, 20213 years ago

Similar Papers

Cite this paper

@article{lin2021siman,
  title  = {SiMaN: Sign-to-Magnitude Network Binarization},
  author = {Mingbao Lin and Rongrong Ji and Zihan Xu and Baochang Zhang and Fei Chao and Chia-Wen Lin and Ling Shao},
  year   = {2021},
  eprint = {2102.07981},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.07981}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.07981.svg)](https://codeofpaper.com/paper/2102.07981)

Discussion