Improving the Straight-Through Estimator with Zeroth-Order Information

Ningfeng Yang, Tor M. Aamodt
10/27/2025
cs.LG

Official code: 1733116199/fogzo (1 star, last commit 2025-10-31).

Abstract

We study the problem of training neural networks with quantized parameters. Learning low-precision quantized parameters by enabling computation of gradients via the Straight-Through Estimator (STE) can be challenging. While the STE enables back-propagation, which is a first-order method, recent works have explored the use of zeroth-order (ZO) gradient descent for fine-tuning. We note that the STE provides high-quality biased gradients, and ZO gradients are unbiased but can be expensive. We thus propose First-Order-Guided Zeroth-Order Gradient Descent (FOGZO) that reduces STE bias while reducing computations relative to ZO methods. Empirically, we show FOGZO improves the tradeoff between quality and training time in Quantization-Aware Pre-Training. Specifically, versus STE at the same number of iterations, we show a 1-8\% accuracy improvement for DeiT Tiny/Small, 1-2\% accuracy improvement on ResNet 18/50, and 1-22 perplexity point improvement for LLaMA models with up to 0.3 billion parameters. For the same loss, FOGZO yields a 796$\times$ reduction in computation versus n-SPSA for a 2-layer MLP on MNIST. Code is available at https://github.com/1733116199/fogzo.

View on arXivView PDF

Code Implementations(1)

1733116199/fogzoOfficial100%
10C++, CudaOct 21, 202511 months ago

Similar Papers

Cite this paper

@article{yang2025improving,
  title  = {Improving the Straight-Through Estimator with Zeroth-Order Information},
  author = {Ningfeng Yang and Tor M. Aamodt},
  year   = {2025},
  eprint = {2510.23926},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.23926v1}
}

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/2510.23926.svg)](https://codeofpaper.com/paper/2510.23926)

Discussion