[Paper Review] Two-Bit Networks for Deep Learning on Resource-Constrained Embedded Devices
This paper proposes Two-Bit Networks (TBNs), a model compression technique that constrains convolutional neural network (CNN) weights to four discrete values (−2, −1, 1, 2), enabling efficient two-bit encoding. By using a differentiable training algorithm with gradient-based optimization and scaling factors, TBNs achieve high accuracy (62.6% top-1, 84.5% top-5 on ImageNet) while reducing memory and computation costs, outperforming prior binary and ternary weight methods.
With the rapid proliferation of Internet of Things and intelligent edge devices, there is an increasing need for implementing machine learning algorithms, including deep learning, on resource-constrained mobile embedded devices with limited memory and computation power. Typical large Convolutional Neural Networks (CNNs) need large amounts of memory and computational power, and cannot be deployed on embedded devices efficiently. We present Two-Bit Networks (TBNs) for model compression of CNNs with edge weights constrained to (-2, -1, 1, 2), which can be encoded with two bits. Our approach can reduce the memory usage and improve computational efficiency significantly while achieving good performance in terms of classification accuracy, thus representing a reasonable tradeoff between model size and performance.
Motivation & Objective
- Address the challenge of deploying large, high-precision CNNs on resource-constrained embedded devices with limited memory and computational power.
- Improve model compression efficiency by making better use of two-bit weight representations compared to existing binary or ternary weight methods.
- Maintain high classification accuracy despite aggressive weight quantization to enable practical deployment on edge devices.
- Develop a differentiable training procedure that enables end-to-end optimization of two-bit weights and scaling factors.
Proposed method
- Quantize real-valued convolutional filters to four discrete values: −2, −1, 1, and 2, each representable in two bits.
- Approximate each filter W as α·W̃, where W̃ is the two-bit quantized filter and α > 0 is a learnable scaling factor.
- Minimize the L2 quantization error ∥W − αW̃∥²₂ through a two-step optimization: first discretize weights to the four values, then compute the optimal α for each filter.
- Use a stochastic gradient descent (SGD) training algorithm where forward and backward passes use the quantized filters (W̃ and α), but real-valued weights are updated using gradients.
- Apply deterministic discretization: each weight is mapped to the nearest value in {−2, −1, 1, 2} based on magnitude.
- During inference, only the two-bit weights and learned scaling factors are used, enabling efficient computation via additions, subtractions, and bit shifts.
Experimental results
Research questions
- RQ1Can a two-bit weight representation with four discrete values (−2, −1, 1, 2) achieve better performance than existing binary or ternary weight methods on large-scale datasets like ImageNet?
- RQ2How does the use of a learnable scaling factor α improve the accuracy of two-bit quantized networks compared to fixed quantization?
- RQ3Does the proposed training algorithm with gradient-based optimization on quantized weights maintain high model capacity while reducing memory and computational costs?
- RQ4Can Two-Bit Networks achieve a better trade-off between model size and accuracy than state-of-the-art weight compression techniques on real-world benchmarks?
Key findings
- Two-Bit Networks achieve a top-1 accuracy of 62.6% and top-5 accuracy of 84.5% on the ImageNet validation set, outperforming Binary Weight Networks, XNOR-Net, and Ternary Weight Networks.
- The method reduces memory usage significantly: for ResNet-18, memory usage drops from 104 MB (FP32) to 26 MB (2-bit), a 4× reduction.
- The use of four values (−2, −1, 1, 2) instead of three (−1, 0, 1) in ternary networks increases model capacity and improves performance.
- The proposed training algorithm enables stable convergence and high-accuracy models despite aggressive weight quantization.
- The computational efficiency is enhanced through arithmetic operations using additions, subtractions, and bit shifts, which are hardware-friendly and fast on embedded systems.
- The method is generalizable and can be applied to other deep neural networks beyond CNNs, including RNNs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.