NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Self-Binarizing Networks

Fayez Lahoud, Radhakrishna Achanta, Pablo Márquez-Neila, Sabine SüsstrunkarXiv 2019

Introduction

Deep learning models like AlexNet and VGG are notoriously resource-hungry, often requiring hundreds of megabytes of memory and high-end GPUs. This makes deploying them on "edge" devices—like smartwatches or embedded sensors—extremely difficult. Binary Neural Networks (BNNs) offer a solution by restricting weights and activations to just two values: -1 and +1, allowing complex multiplications to be replaced by bitwise operations. However, training them is challenging because the standard "sign" function has a gradient of zero almost everywhere, breaking backpropagation. Researchers have developed a "soft binarization" technique to overcome this, enabling models to run entirely without floating-point math during inference.

Methods

Soft Binarization with Scaled Tanh

Instead of using the non-differentiable sign function from the start, the authors introduce a scaled hyperbolic tangent: $\tanh(\nu x)$. At the beginning of training, $\nu$ is small (e.g., 1), making the function smooth and differentiable. As training progresses, $\nu$ is increased exponentially. This "sharpens" the function until it behaves like the sign function, allowing the network to "self-binarize" gradually while maintaining valid gradients.

The evolution of the scaled tanh function and its derivative (gradient) as the scaling parameter nu increases.

Binary Batch Normalization (BinaryBN)

Standard Batch Normalization (BN) typically requires floating-point arithmetic. The authors realized that in a binary network, the output of a BN layer is immediately fed into a binarization function. They proved that the entire BN operation plus the sign activation can be reduced to a simple comparison: Is the input $I$ greater than a threshold $T$? This eliminates floating-point math at inference time, replacing it with 8-bit integer comparisons.

Key Results and Insights

The proposed approach achieves state-of-the-art accuracy on major benchmarks. On CIFAR-10, the self-binarizing VGG reached 86.91% accuracy, outperforming XNOR-Net (86.16%). On ImageNet, their AlexNet-based model achieved 39.44% Top-1 accuracy, a significant improvement over previous binarization methods.

Beyond accuracy, the efficiency gains are substantial. The BinaryBN layer is nearly an order of magnitude faster and uses significantly less memory than standard BN. For a typical feature map, BinaryBN requires only 9 bits of storage per channel compared to 128 bits for standard BN.

Comparison of inference time and memory usage across different normalization techniques, highlighting the efficiency of BinaryBN.
  • Gradient Mismatch Resolution: Traditional "hard" binarization causes a mismatch between forward and backward passes. Soft binarization keeps weights mobile longer, allowing the network to find better local minima.
  • Hardware-Friendly Inference: By reducing operations to comparisons ($I > T$), the network becomes truly "floating-point free," which is ideal for microcontrollers lacking dedicated floating-point units.
  • Regularization: In some cases, binarized models outperformed full-precision versions, suggesting that binarization acts as a powerful regularizer against overfitting.

Conclusion

Self-Binarizing Networks provide a robust framework for training high-performance BNNs. By combining a differentiable continuation method (scaled tanh) with hardware-optimized normalization (BinaryBN), this research paves the way for deploying sophisticated computer vision models on resource-constrained edge hardware without sacrificing significant accuracy.

Summary updated

BibTeX
@misc{lahoud2019self,
  author = {Fayez Lahoud and Radhakrishna Achanta and Pablo Márquez-Neila and Sabine Süsstrunk},
  title = {{Self-Binarizing Networks}},
  year = {2019},
  eprint = {1902.00730},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.00730},
}
Figure