[Paper Review] Learning Discrete Weights Using the Local Reparameterization Trick
This paper introduces LR-nets, a method that uses a modified local reparameterization trick to train deep neural networks with discrete binary or ternary weights by approximating pre-activation distributions as Gaussian via the central limit theorem. The approach enables effective backpropagation through discrete weights, achieving state-of-the-art accuracy on MNIST, CIFAR-10, and ImageNet, with ternary networks outperforming binary ones due to better representational capacity.
Recent breakthroughs in computer vision make use of large deep neural networks, utilizing the substantial speedup offered by GPUs. For applications running on limited hardware, however, high precision real-time processing can still be a challenge. One approach to solving this problem is training networks with binary or ternary weights, thus removing the need to calculate multiplications and significantly reducing memory size. In this work, we introduce LR-nets (Local reparameterization networks), a new method for training neural networks with discrete weights using stochastic parameters. We show how a simple modification to the local reparameterization trick, previously used to train Gaussian distributed weights, enables the training of discrete weights. Using the proposed training we test both binary and ternary models on MNIST, CIFAR-10 and ImageNet benchmarks and reach state-of-the-art results on most experiments.
Motivation & Objective
- To address the challenge of training deep neural networks with discrete weights (binary or ternary) on low-power, memory-constrained hardware.
- To overcome the non-differentiability of discrete weights during backpropagation by using a smooth approximation of the pre-activation distribution.
- To improve training stability and performance compared to existing methods like straight-through estimators or stochastic weight sampling.
- To evaluate whether ternary weights offer a better trade-off between performance and computational efficiency than binary weights.
- To demonstrate that a principled, differentiable approximation of discrete pre-activations enables state-of-the-art results in low-precision networks.
Proposed method
- The method models the pre-activation of each neuron as a Gaussian distribution using the Lyapunov central limit theorem, enabling differentiable backpropagation.
- It applies a modified local reparameterization trick to sample from the pre-activation distribution, allowing gradients to flow through discrete weights.
- Stochastic weights are sampled from a learned distribution, and the network is trained using standard backpropagation on the reparameterized pre-activations.
- For binary weights, the method uses a temperature-controlled sigmoid to approximate the sign function, while ternary weights are modeled with a three-point discrete distribution.
- The approach uses batch normalization, weight decay, and learning rate scheduling to stabilize training across all settings.
- The method avoids the need for straight-through gradients or separate stochastic weight updates, instead relying on a continuous, differentiable approximation of the pre-activation.
Experimental results
Research questions
- RQ1Can a smooth, differentiable approximation of discrete pre-activations enable effective training of binary and ternary weight networks?
- RQ2How does the performance of the proposed method compare to existing approaches like straight-through estimators or stochastic weight sampling?
- RQ3Does modeling the pre-activation distribution via the central limit theorem yield better optimization stability and accuracy than direct gradient approximation?
- RQ4Is there a significant performance gap between binary and ternary weight networks, and if so, why?
- RQ5Can the proposed method achieve state-of-the-art results on large-scale benchmarks like ImageNet with discrete weights?
Key findings
- On ImageNet, the proposed LR-net with ternary weights achieved a top-1 error rate of 36.5%, outperforming prior methods such as XNOR-Net (48.8%) and Binary-Weight-Network (40.1%).
- For ResNet-18 on ImageNet, the ternary LR-net achieved a top-5 error rate of 15.2%, compared to 17.7% for the binary version and 26.8% for XNOR-Net.
- On MNIST and CIFAR-10, the ternary LR-net achieved test error rates within 1-2% of the full-precision reference model, demonstrating strong generalization.
- The ternary network trained more stably and required less hyperparameter tuning than the binary network, indicating better optimization dynamics.
- The method achieved state-of-the-art results on all evaluated benchmarks, including ImageNet, with both binary and ternary weights.
- Kernel visualization showed that the LR-net preserved the structural patterns of full-precision filters, especially when using full-precision initialization for the discrete weights.
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.