Custom Gradient Estimators are Straight-Through Estimators in Disguise

Matt Schoenbauer, Daniele Moro, Lukasz Lew, Andrew Howard
5/8/2024
cs.LG

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{schoenbauer2024custom,
  title  = {Custom Gradient Estimators are Straight-Through Estimators in Disguise},
  author = {Matt Schoenbauer and Daniele Moro and Lukasz Lew and Andrew Howard},
  year   = {2024},
  eprint = {2405.05171},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.05171v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.05171.svg)](https://codeofpaper.com/paper/2405.05171)

Discussion