arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.23926cs.LG
收藏

利用零阶信息改进直通估计器

Improving the Straight-Through Estimator with Zeroth-Order Information

University of British Columbia(不列颠哥伦比亚大学)

Ningfeng Yang, Tor M. Aamodt

AI总结:

针对量化参数神经网络训练中STE有偏、零阶梯度计算成本高的问题,提出一阶引导零阶梯度下降方法FOGZO,在多个模型和数据集上实现了训练质量与效率的更好权衡。

摘要:

我们研究了量化参数神经网络的训练问题。通过直通估计器(Straight-Through Estimator, STE)计算梯度来学习低精度量化参数颇具挑战。尽管STE支持反向传播这一一阶方法,近期研究已探索使用零阶(zeroth-order, ZO)梯度下降进行微调。我们注意到STE能提供高质量的有偏梯度,而ZO梯度虽无偏但计算成本较高。因此我们提出一阶引导零阶梯度下降(First-Order-Guided Zeroth-Order Gradient Descent, FOGZO),该方法可降低STE的偏差,同时相比ZO方法减少计算量。实验结果表明,FOGZO改善了量化感知预训练中模型质量与训练时间的权衡。具体而言,在相同迭代次数下,相比STE,FOGZO在DeiT Tiny/Small模型上实现1-8%的准确率提升,在ResNet 18/50上实现1-2%的准确率提升,在参数规模最高达3亿的LLaMA模型上实现1-22的困惑度点下降。在相同损失下,针对MNIST数据集上的2层MLP,FOGZO的计算量相比n-SPSA降低了796倍。代码可在https://github.com/1733116199/fogzo获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑