LGMay 8, 2024

Custom Gradient Estimators are Straight-Through Estimators in Disguise

arXiv:2405.05171v38 citationsh-index: 3
Originality Incremental advance
AI Analysis

This work clarifies a fundamental issue in quantization-aware training for machine learning practitioners, showing that many proposed methods are incremental variations of STE.

The paper proves that many custom gradient estimators for quantization-aware training are equivalent to the straight-through estimator (STE) under small learning rates in SGD, requiring only adjustments to initialization and learning rate, and extends this to adaptive algorithms like Adam without modifications, with experimental validation on MNIST and ImageNet models.

Quantization-aware training comes with a fundamental challenge: the derivative of quantization functions such as rounding are zero almost everywhere and nonexistent elsewhere. Various differentiable approximations of quantization functions have been proposed to address this issue. In this paper, we prove that when the learning rate is sufficiently small, a large class of weight gradient estimators is equivalent with the straight through estimator (STE). Specifically, after swapping in the STE and adjusting both the weight initialization and the learning rate in SGD, the model will train in almost exactly the same way as it did with the original gradient estimator. Moreover, we show that for adaptive learning rate algorithms like Adam, the same result can be seen without any modifications to the weight initialization and learning rate. We experimentally show that these results hold for both a small convolutional model trained on the MNIST dataset and for a ResNet50 model trained on ImageNet.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes