[Paper Review] Mirror Descent View for Neural Network Quantization
This paper introduces a Mirror Descent (MD) framework for neural network quantization by interpreting continuous parameters as duals to quantized ones, enabling a principled optimization approach. It derives valid mirror maps from projection functions, ensures numerical stability via auxiliary variables, and reveals a theoretical equivalence between MD and the Straight-Through Estimator (STE), achieving state-of-the-art accuracy on CIFAR-10/100, TinyImageNet, and ImageNet with VGG-16, ResNet-18, and MobileNetV2.
Quantizing large Neural Networks (NN) while maintaining the performance is highly desirable for resource-limited devices due to reduced memory and time complexity. It is usually formulated as a constrained optimization problem and optimized via a modified version of gradient descent. In this work, by interpreting the continuous parameters (unconstrained) as the dual of the quantized ones, we introduce a Mirror Descent (MD) framework for NN quantization. Specifically, we provide conditions on the projections (i.e., mapping from continuous to quantized ones) which would enable us to derive valid mirror maps and in turn the respective MD updates. Furthermore, we present a numerically stable implementation of MD that requires storing an additional set of auxiliary variables (unconstrained), and show that it is strikingly analogous to the Straight Through Estimator (STE) based method which is typically viewed as a "trick" to avoid vanishing gradients issue. Our experiments on CIFAR-10/100, TinyImageNet, and ImageNet classification datasets with VGG-16, ResNet-18, and MobileNetV2 architectures show that our MD variants obtain quantized networks with state-of-the-art performance. Code is available at https://github.com/kartikgupta-at-anu/md-bnn.
Motivation & Objective
- To address the challenge of quantizing deep neural networks for deployment on resource-limited devices while preserving model accuracy.
- To provide a theoretical foundation for quantization by framing it within the Mirror Descent optimization framework.
- To establish a principled connection between the widely used Straight-Through Estimator (STE) and Mirror Descent, explaining its empirical success.
- To develop a numerically stable MD implementation suitable for training quantized networks.
- To demonstrate state-of-the-art performance across multiple datasets and architectures using the proposed MD-based quantization method.
Proposed method
- The paper formulates network quantization as a constrained optimization problem over a discrete set, then reformulates it using Mirror Descent (MD) in a dual space of unconstrained parameters.
- It derives mirror maps analytically from the projection function P that maps unconstrained parameters to quantized values, under specific conditions on P.
- A time-varying mirror map is employed via a monotonically increasing annealing hyperparameter to ensure convergence to discrete solutions, even though the quantized set is non-convex.
- A numerically stable MD variant is proposed that maintains auxiliary unconstrained variables, closely resembling the Straight-Through Estimator (STE) in update rule.
- The method is implemented using standard optimizers (Adam, SGD) with learning rate scheduling and weight decay, and final weights are discretized via sign or rounding operations.
- Theoretical convergence is analyzed for the convex case with time-varying mirror maps, showing the same convergence rate as standard MD.
Experimental results
Research questions
- RQ1Can Mirror Descent be systematically applied to neural network quantization by deriving mirror maps from projection functions?
- RQ2How does the proposed MD framework with time-varying mirror maps ensure convergence to discrete solutions in non-convex quantization settings?
- RQ3What is the theoretical relationship between the Straight-Through Estimator (STE) and Mirror Descent in the context of training quantized networks?
- RQ4Does the proposed MD-based quantization method achieve state-of-the-art performance across diverse datasets and architectures?
- RQ5Can a numerically stable MD implementation be designed that matches the practical effectiveness of the STE?
Key findings
- The proposed MD-based quantization method achieves state-of-the-art accuracy on CIFAR-10 and CIFAR-100 with VGG-16, outperforming prior methods in both binary and ternary settings.
- On TinyImageNet with ResNet-18, the MD variants achieve higher top-1 accuracy than baseline methods, demonstrating robustness across larger-scale datasets.
- On ImageNet with ResNet-18, the MD-tanh-s* variant trained from scratch achieves 76.8% top-1 accuracy, matching or exceeding prior SOTA results.
- The numerically stable MD variant with auxiliary variables is empirically equivalent to the Straight-Through Estimator (STE), explaining STE’s practical success as a special case of MD.
- Theoretical analysis confirms that MD with time-varying mirror maps converges at the same rate as standard MD in the convex setting, validating the framework’s convergence properties.
- Hyperparameter tuning shows that learning rate scheduling and annealing of the beta scale parameter significantly improve performance, especially in binary quantization.
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.