On Study of the Binarized Deep Neural Network for Image Classification

Song Wang, Dongchun Ren, Li Chen, Wei Fan, Jun Sun, Satoshi NaoiarXiv 2016 · OpenReview

TL;DR

This paper introduces the Binarized Deep Neural Network (BDNN), a novel neural network architecture where all values and computations are binary. This significantly reduces computational and storage requirements, making deep learning more accessible on resource-constrained devices. Experimental results demonstrate the feasibility of BDNN for image classification, though performance is currently lower than conventional DNNs.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) have achieved remarkable performance in various tasks, particularly image classification. However, their success comes at a cost: they require substantial computational power (often necessitating GPUs) and large amounts of memory for storage. This makes deploying DNNs on everyday devices like smartphones or embedded systems a significant challenge. The authors aim to address this by developing a neural network that is inherently more efficient in terms of computation and storage, without sacrificing too much performance.

Methods

The core innovation is the Binarized Deep Neural Network (BDNN). Unlike traditional neural networks that use real-valued numbers for neurons and weights, BDNNs operate entirely with binary values (represented as -1 and 1).

  • Binarized Propagation Function: The fundamental "neuron" function is redefined. The linear calculation is based on a Boolean "equivalence" operation (which, when using -1 and 1, is equivalent to multiplication). The nonlinear calculation involves counting the number of positive and negative results from the linear step and outputting the majority value.
  • Hybrid-BDNN: To handle non-binary input data (like grayscale images), a hybrid-BDNN is proposed. This architecture combines a conventional neural network front-end with a BDNN back-end, connected by a transition layer that converts real-valued outputs to binary values using a threshold.
  • Gradient Descent Training: A modified gradient descent training method is developed for BDNNs. Since weights are binary, direct adjustment is difficult. The approach involves training with real numbers and then converting them to binary using a sign function. An approximation of the non-continuous activation function is used to enable backpropagation.

Datasets

  • MNIST: A dataset of handwritten digits, suitable for binary data classification. The grayscale images were binarized for use with BDNN.
  • CIFAR10: A dataset of color images of 10 different object classes. This dataset was used to test the hybrid-BDNN on non-binary data. The color images were converted to grayscale.

Key Insights and Ideas

  • Binary is Efficient: The fundamental insight is that by binarizing all network components, significant savings in computation and storage can be achieved. This opens the door for deploying sophisticated AI models on devices with limited resources.
  • Boolean Algebra as a Foundation: The paper demonstrates that complex computations can be effectively performed using Boolean logic, which is highly optimized for hardware.
  • Approximation for Training: The non-continuous nature of binary activation functions poses a challenge for gradient-based training. The paper shows that a carefully chosen approximation can enable effective training.
  • Hybrid Approach for Versatility: The hybrid-BDNN elegantly bridges the gap between binary and non-binary data, allowing the efficiency of BDNNs to be leveraged even when inputs are not inherently binary.

Key Results

  • Feasibility Demonstrated: Experiments on MNIST showed that BDNNs could achieve classification rates around 15% with a three-layer network, proving the concept's viability.
  • Scalability Potential: For the three-layer network, increasing the number of neurons in the hidden layer (Structure B) improved BDNN performance, suggesting that larger-scale BDNNs might achieve better results.
  • Hybrid-BDNN Performance: On CIFAR10, the hybrid-BDNN showed lower training error than conventional CNNs, though its test error was higher. This indicates potential for non-binary classification but also highlights the need for more complex hybrid architectures.
  • Storage and Speed Advantages (Theoretical): The paper claims BDNNs require significantly less storage (1 bit per weight vs. 16+ bits for real numbers) and can run faster on CPUs due to their reliance on Boolean calculations.

Limitations and Future Work

  • Performance Gap: The paper acknowledges that the performance of BDNNs, especially with the current training methods, is not yet comparable to conventional DNNs of similar scale.
  • Training Method: The proposed training method is an approximation and may not be optimal. The authors suggest developing specific training techniques for BDNNs.
  • Computational Limitations: Due to computational constraints, large-scale BDNNs were not tested.
  • Future Directions: The authors propose developing GPU-based training for larger-scale BDNNs, exploring various network structures (e.g., recurrent neural networks), and optimizing forward propagation on CPUs.

Summary updated

Abstract

Recently, the deep neural network (derived from the artificial neural network) has attracted many researchers' attention by its outstanding performance. However, since this network requires high-performance GPUs and large storage, it is very hard to use it on individual devices. In order to improve the deep neural network, many trials have been made by refining the network structure or training strategy. Unlike those trials, in this paper, we focused on the basic propagation function of the artificial neural network and proposed the binarized deep neural network. This network is a pure binary system, in which all the values and calculations are binarized. As a result, our network can save a lot of computational resource and storage. Therefore, it is possible to use it on various devices. Moreover, the experimental results proved the feasibility of the proposed network.
BibTeX
@misc{wang2016study,
  author = {Song Wang and Dongchun Ren and Li Chen and Wei Fan and Jun Sun and Satoshi Naoi},
  title = {{On Study of the Binarized Deep Neural Network for Image Classification}},
  year = {2016},
  eprint = {1602.07373},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1602.07373},
}
Figure