Skip to main content
QUICK REVIEW

[Paper Review] Self-Binarizing Networks

Fayez Lahoud, Radhakrishna Achanta|arXiv (Cornell University)|Feb 2, 2019
Advanced Memory and Neural ComputingEngineering34 references23 citations
TL;DR

This paper proposes Self-Binarizing Networks, a method that trains deep neural networks to evolve into binary weights and activations using a smooth, sharpening tanh activation function instead of the non-differentiable sign function. By avoiding alternating between floating-point and binary modes, and replacing batch normalization with a comparison-based operation, the method achieves state-of-the-art accuracy on CIFAR-10, CIFAR-100, and ImageNet while enabling fully binary inference on low-precision hardware.

ABSTRACT

We present a method to train self-binarizing neural networks, that is, networks that evolve their weights and activations during training to become binary. To obtain similar binary networks, existing methods rely on the sign activation function. This function, however, has no gradients for non-zero values, which makes standard backpropagation impossible. To circumvent the difficulty of training a network relying on the sign activation function, these methods alternate between floating-point and binary representations of the network during training, which is sub-optimal and inefficient. We approach the binarization task by training on a unique representation involving a smooth activation function, which is iteratively sharpened during training until it becomes a binary representation equivalent to the sign activation function. Additionally, we introduce a new technique to perform binary batch normalization that simplifies the conventional batch normalization by transforming it into a simple comparison operation. This is unlike existing methods, which are forced to the retain the conventional floating-point-based batch normalization. Our binary networks, apart from displaying advantages of lower memory and computation as compared to conventional floating-point and binary networks, also show higher classification accuracy than existing state-of-the-art methods on multiple benchmark datasets.

Motivation & Objective

  • To address the challenge of training binary neural networks where the sign activation function has zero gradients, making standard backpropagation infeasible.
  • To eliminate the need for alternating between floating-point and binary representations during training, which is inefficient and introduces approximation errors.
  • To replace conventional batch normalization—requiring floating-point operations—with a binary-compatible, memory-efficient comparison-based alternative.
  • To enable deployment of fully binary networks on low-precision chips and microcontrollers by removing all floating-point computations.
  • To achieve higher classification accuracy than existing binarization methods while maintaining low memory and computational costs.

Proposed method

  • The method uses a scaled hyperbolic tangent function, tanh(νx), where ν is a learnable scaling factor that increases during training, gradually sharpening the activation to approximate the sign function.
  • The network is trained end-to-end using backpropagation on a single, continuous floating-point representation, avoiding the need to toggle between binary and floating-point modes.
  • A new Binary Batch Normalization (BinaryBN) layer is introduced that replaces the standard batch normalization with a simple comparison operation: output = (x > T) ? 1 : -1, where T is a learnable threshold per channel.
  • The BinaryBN layer stores only a single 8-bit threshold per channel and a binary sign for the scale, reducing memory usage to 9c bits per layer compared to 128c for standard BN.
  • The method enables full binary inference by eliminating all floating-point operations, including in batch normalization, making it suitable for deployment on microcontrollers and low-precision chips.
  • The approach is validated on VGG and AlexNet architectures using CIFAR-10, CIFAR-100, and ImageNet benchmarks, with performance measured in accuracy, memory, and computation.

Experimental results

Research questions

  • RQ1Can a deep neural network be trained to self-binarize its weights and activations using a continuous, differentiable activation function that gradually becomes binary?
  • RQ2Does avoiding the alternating training scheme between floating-point and binary representations improve training stability and final model accuracy?
  • RQ3Can batch normalization be replaced with a binary-compatible, comparison-based operation that maintains performance while eliminating floating-point computation?
  • RQ4Can the resulting network achieve state-of-the-art accuracy on standard benchmarks while being fully deployable on low-precision hardware?
  • RQ5How does the soft binarization via sharpening tanh compare to hard binarization using the sign function in terms of weight distribution evolution and final performance?

Key findings

  • The proposed self-binarizing network achieves higher classification accuracy than existing state-of-the-art binarization methods on CIFAR-10, CIFAR-100, and ImageNet benchmarks.
  • On CIFAR-10, the method achieves a top-1 accuracy of 92.1% on VGG-16, outperforming prior methods such as XNOR-Net and BWN.
  • The BinaryBN layer reduces memory usage to 9c bits per layer (vs. 128c for standard BN), representing a 93% reduction in storage requirements.
  • The BinaryBN layer performs 2chw operations using only comparisons and bit shifts, making it nearly an order of magnitude faster than standard BN and SBN in inference.
  • The method enables fully binary inference with no floating-point operations, making it deployable on microcontrollers and low-precision integrated circuits.
  • Weight histograms show that soft binarization via tanh(νx) maintains a zero-centered distribution during early training, allowing better gradient flow and improved convergence compared to hard binarization with sign(x).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.