[Paper Review] Generalized Ternary Connect: End-to-End Learning and Compression of Multiplication-Free Deep Neural Networks
This paper proposes Generalized Ternary Connect (GTC), an end-to-end differentiable method that learns both the number of quantization levels and their values (as integer powers of two) for deep neural networks, enabling multiplication-free inference via bit shifts. GTC achieves state-of-the-art compression with minimal accuracy drop on MNIST and CIFAR-10, and demonstrates hardware efficiency through FPGA and Raspberry Pi simulations, while also serving as a novel optimizer with improved convergence.
The use of deep neural networks in edge computing devices hinges on the balance between accuracy and complexity of computations. Ternary Connect (TC) \cite{lin2015neural} addresses this issue by restricting the parameters to three levels $-1, 0$, and $+1$, thus eliminating multiplications in the forward pass of the network during prediction. We propose Generalized Ternary Connect (GTC), which allows an arbitrary number of levels while at the same time eliminating multiplications by restricting the parameters to integer powers of two. The primary contribution is that GTC learns the number of levels and their values for each layer, jointly with the weights of the network in an end-to-end fashion. Experiments on MNIST and CIFAR-10 show that GTC naturally converges to an `almost binary' network for deep classification networks (e.g. VGG-16) and deep variational auto-encoders, with negligible loss of classification accuracy and comparable visual quality of generated samples respectively. We demonstrate superior compression and similar accuracy of GTC in comparison to several state-of-the-art methods for neural network compression. We conclude with simulations showing the potential benefits of GTC in hardware.
Motivation & Objective
- To address the challenge of high computational complexity in deploying deep neural networks on edge devices by eliminating multiplications during inference.
- To generalize Ternary Connect by allowing an arbitrary number of quantization levels, constrained to integer powers of two, to enable efficient bit-shift operations.
- To jointly learn the number of levels and their values end-to-end with network weights, optimizing for both accuracy and model compression.
- To demonstrate hardware efficiency gains through FPGA and Raspberry Pi simulations, showing reduced power and latency.
- To explore GTC as a novel optimizer by annealing quantization cost, improving training convergence.
Proposed method
- GTC quantizes network weights to values in the set {0} ∪ {±2^k | k ∈ ℤ}, enabling multiplication-free inference via bit shifts.
- The method introduces trainable parameters to parametrize the quantization function, allowing flexible shapes such as hyperbolic or sigmoid-like mappings.
- A differentiable quantization function is defined using a learnable temperature and scaling parameters, enabling backpropagation through the quantization process.
- The loss function includes a distillation term (λ₁) to preserve network behavior and a bit-cost penalty (λ₂) to control the number of bits used.
- The number of bits per weight is computed as the expected entropy of the learned quantization distribution, enabling end-to-end optimization of compression and accuracy.
- A variant of GTC is used as an optimizer by annealing λ₂ over training, starting with high sparsity and gradually reducing it to allow higher precision.
Experimental results
Research questions
- RQ1Can a deep neural network be trained end-to-end to learn both the number of quantization levels and their values as integer powers of two?
- RQ2Does the proposed method achieve high model compression with minimal accuracy degradation compared to state-of-the-art compression techniques?
- RQ3Can the learned quantization scheme be efficiently mapped to hardware, resulting in measurable reductions in power and latency?
- RQ4Can GTC serve as a competitive optimizer, outperforming standard SGD in training convergence and final accuracy?
- RQ5How does the trade-off between model precision (number of bits) and accuracy behave under different regularization settings?
Key findings
- On VGG-16 for CIFAR-10, GTC achieved 98.8% test accuracy with only 2 bits per weight on average, matching the accuracy of full-precision models.
- On MNIST, GTC achieved 99.3% accuracy with an average of 5.25 bits per weight when λ₂ = 0, and reduced to 2 bits with 95.0% accuracy when λ₂ = 10⁻³.
- FPGA simulations showed a 79.6% reduction in per-operation power consumption, dropping from 49mW (multiplication) to 10mW (bit-shifting).
- Raspberry Pi simulations showed a 28% reduction in per-operation latency, from 93ns to 67ns, due to replacing multiplies with bit shifts.
- The annealed-λ₂ variant of GTC outperformed standard SGD and the fixed-λ₂ GTC variant, dominating the 32-bit baseline in training accuracy up to 40k iterations.
- GTC naturally converged to an 'almost binary' network structure in deep architectures, indicating inherent preference for low-precision representations during training.
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.