Understanding Clipping In Zeroth-Order Optimization
Abstract
Zeroth-order optimization has emerged as a resource-efficient alternative to Stochastic Gradient Descent (SGD) when fine-tuning LLMs, thanks to the inherent low dimensionality of the loss landscape. It relies on a two-point estimate of the gradient that only accesses the function value and not the gradient, bypassing the resource-heavy backpropagation. Recently, it was accidentally discovered that per-sample clipping can improve the performance of the trained model, while running a differentially private version of zeroth-order optimization \cite{zhang2024dpzero} with a very large privacy parameter (corresponding to very little privacy). In this paper, we systematically investigate this phenomenon and demonstrate that () the optimal choice of learning rate is inversely proportional to the clipping threshold , satisfying constant; () clipping drives the zeroth-order optimization to a different solution with higher test accuracy; and () this phenomenon is only observed with per-sample clipped zeroth-order optimization and not other zeroth-order alternatives that also provide robust estimates of the gradient. Further analyses with artificially injected label noise reveals that clipping leads to more robust predictions, which stems from the implicit down weighting of hard-to-fit training examples. Our code is available at https://github.com/SewoongLab/ClipZero
Create a lesson
Related papers
Understanding Failure Patterns in LLM-Based Mathematical Optimization Modeling
Shared title terminologycs.LGRyoichi Takase, Xian Yeow Lee, Hikaru Tomonari et al.
When High Capacity Becomes Undeployable: Pore-Filling Constraints for Multi-Objective Optimization of Direct Air Capture Sorbents
Shared title terminologycs.LGYujie Liu, Xuehua Shen, Zuotai Zhang
SOC-Net: Second-Order-Cone-Constrained Neural Networks
Shared title terminologycs.LGSeungseok Oh, Youngjae Min, Navid Azizan et al.
CARROT: Competitive Adaptive Graph Clustering via Semi-Relaxed Optimal Transport
Shared title terminologycs.LGChing Fan Chiang, Jia-Yu Pan, Wen-Chieh Lin
BReD: Block Replay Dithering for Stable Low-Bit EMA Optimizer States
Shared title terminologycs.LGHeshen Zhan, Youhan Huang, Yunke Peng et al.
Don't Waste the Population: Post-Anneal Refinement for Combinatorial Optimization
Shared title terminologycs.LGYuma Ichikawa