Recurrence of Optimum for Training Weight and Activation Quantized Networks

Ziang Long, Penghang Yin, Jack XinarXiv 2020

Introduction

Training neural networks with binary or ternary weights and activations is notoriously difficult. Standard gradients vanish because quantized activations are step functions, forcing researchers to rely on "fake" gradient heuristics like the Straight-Through Estimator (STE). While these methods work empirically, their mathematical behavior has remained poorly understood. This paper provides the first theoretical proof that a popular training algorithm, QUANT, does not converge to a single point; instead, it exhibits a "recurrence" phenomenon where it visits the global optimum infinitely often while oscillating between sub-optimal states.

Theoretical Framework and the QUANT Algorithm

The authors analyze the QUANT algorithm, which combines two established techniques: BinaryConnect, which maintains a latent set of high-precision floating-point weights, and a ReLU-based Straight-Through Estimator to generate coarse gradients. This coarse gradient acts as a search direction that ignores the zero-gradient problem of quantized activations.

One-hidden-layer network architecture used for theoretical analysis.

By treating the training process as a discrete dynamical system on a one-hidden-layer network, the authors prove that the sequence of quantized weights is generically divergent—it won't settle on one spot—but recurrent, meaning it keeps coming back to the best configuration.

Key Insights: The End of Convergence

In traditional deep learning, the goal is for weights to settle into a stable valley. This paper argues that for quantized networks, "convergence" is the wrong goal. Because the ideal weights are likely not perfectly binary or ternary, the algorithm will naturally jump between the closest discrete states.

Visualization of weight flipping during the training of quantized networks, illustrating the dynamic equilibrium.

This recurrence ensures that the algorithm visits the global optimum of the discrete problem infinitely many times under mild conditions. Furthermore, the study shows that ternary weights ({-1, 0, 1}) are mathematically more stable than binary weights ({-1, 1}), visiting fewer sub-optimal states during their oscillations. Visualizations of weight signs "flipping" back and forth even after the training loss has plateaued confirm that the network exists in a state of "dynamic equilibrium."

Empirical Validation and Results

The authors validated their theoretical findings using synthetic high-dimensional Gaussian data and standard benchmarks:

  • MNIST: Training the classic LeNet-5 architecture with ternary weights reached 99.34% accuracy, virtually identical to the 99.37% full-precision baseline.
  • CIFAR-10: More complex models like ResNet-20 and VGG-11 showed that the oscillation phenomenon persists in modern, deep architectures. ResNet-20 achieved 90.86% accuracy with ternary weights, compared to 92.33% for the full-precision version.

These results demonstrate that despite the lack of traditional convergence, the QUANT algorithm is guaranteed to hit the global optimum repeatedly if the "teacher" parameters are close enough to a quantized state.

Limitations and Future Work

The primary limitation is that the rigorous mathematical proof for recurrence is currently limited to one-hidden-layer networks. While empirical results on ResNet and VGG suggest the phenomenon holds for deeper networks, the formal proof for multi-layer recurrence remains an open challenge. Future work could involve extending these proofs to more complex data distributions and exploring how to "freeze" the weights at the optimal point of the recurrence cycle to simplify deployment on edge devices.

Summary updated

BibTeX
@misc{long2020recurrence,
  author = {Ziang Long and Penghang Yin and Jack Xin},
  title = {{Recurrence of Optimum for Training Weight and Activation Quantized Networks}},
  year = {2020},
  eprint = {2012.05529},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.05529},
}
Figure