[Paper Review] Simultaneously Optimizing Weight and Quantizer of Ternary Neural Network using Truncated Gaussian Approximation
This paper proposes a novel method for ternary neural network (TNN) training that jointly optimizes network weights and quantizer thresholds using a closed-form truncated Gaussian approximation, enabling end-to-end back-propagation. The approach achieves state-of-the-art accuracy with only 2.16% top-1 accuracy degradation on ImageNet using ResNet-50, significantly outperforming prior fixed-threshold TNNs.
In the past years, Deep convolution neural network has achieved great success in many artificial intelligence applications. However, its enormous model size and massive computation cost have become the main obstacle for deployment of such powerful algorithm in the low power and resource-limited mobile systems. As the countermeasure to this problem, deep neural networks with ternarized weights (i.e. -1, 0, +1) have been widely explored to greatly reduce the model size and computational cost, with limited accuracy degradation. In this work, we propose a novel ternarized neural network training method which simultaneously optimizes both weights and quantizer during training, differentiating from prior works. Instead of fixed and uniform weight ternarization, we are the first to incorporate the thresholds of weight ternarization into a closed-form representation using the truncated Gaussian approximation, enabling simultaneous optimization of weights and quantizer through back-propagation training. With both of the first and last layer ternarized, the experiments on the ImageNet classification task show that our ternarized ResNet-18/34/50 only has 3.9/2.52/2.16% accuracy degradation in comparison to the full-precision counterparts.
Motivation & Objective
- To address the accuracy degradation and slow convergence in low-bit quantized neural networks caused by fixed, non-optimized quantizers.
- To enable end-to-end differentiable training of both network weights and quantization thresholds through a differentiable approximation of the ternarization function.
- To improve training stability and convergence speed by introducing a gradient correctness optimization in the straight-through estimator.
- To achieve state-of-the-art performance in ternary neural networks with full layer-wise ternarization on large-scale datasets like ImageNet.
Proposed method
- Introduces a closed-form expression for the ternarization threshold using truncated Gaussian approximation, making the threshold differentiable and trainable via back-propagation.
- Treats the layer-wise quantizer threshold as a learnable parameter within the network, allowing joint optimization with network weights and scaling factors.
- Proposes a gradient correctness method in the straight-through estimator to correct gradient scaling issues caused by layer-wise scaling factors during back-propagation.
- Applies the method to full-precision pre-trained ResNet architectures, ternarizing both first and last layers while keeping intermediate layers full-precision during training.
- Uses adaptive learning rate scheduling and SGD/Adam optimizers for weights and thresholds, with thresholds initialized as 10% of the maximum absolute weight per layer.
Experimental results
Research questions
- RQ1Can jointly optimizing the quantizer threshold and network weights during training improve accuracy in ternary neural networks?
- RQ2Does a closed-form differentiable approximation of the ternarization function enable effective back-propagation through the quantizer?
- RQ3How does gradient correctness in the straight-through estimator affect convergence speed and final accuracy?
- RQ4What is the impact of threshold initialization on training performance in the proposed method?
Key findings
- The proposed method achieves 66.01% top-1 accuracy on ImageNet using ResNet-18 with full ternarization, only 3.9% degradation from the full-precision baseline.
- For ResNet-34, the method achieves 70.79% top-1 accuracy, a 2.52% degradation compared to the full-precision model.
- On ResNet-50, the method achieves 73.97% top-1 accuracy, with just 2.16% accuracy degradation relative to the full-precision model.
- The method outperforms prior state-of-the-art ternarization techniques such as APPRENTICE and TTN, especially in full-ternarized settings.
- The training convergence is significantly faster and more stable when gradient correctness is applied in the straight-through estimator.
- Threshold initialization has minimal impact on performance, as the fully trainable thresholds quickly adapt 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.