NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Zeroth-Order Sharpness-Aware Learning with Exponential Tilting

Xuchen Gong, Tian Li · DOI

Introduction

Fine-tuning Large Language Models (LLMs) is a resource-intensive process, often limited by the massive memory requirements of backpropagation. Zeroth-order (ZO) optimization has emerged as a compelling alternative, estimating gradients using only forward passes (function evaluations). While memory-efficient, standard ZO methods like MeZO often struggle with generalization because they optimize for average neighborhood loss rather than the "flatness" of the minima.

This paper introduces ZEST (Zeroth-order Exponential-tilted Sharpness-aware Training), a framework that bridges the gap between memory-efficient ZO optimization and the generalization benefits of Sharpness-Aware Minimization (SAM). By employing "exponential tilting," ZEST identifies flatter regions in the loss landscape, leading to superior performance on complex fine-tuning tasks.

Methodology: Exponential Tilting and ZEST

The core innovation of ZEST is the use of an exponential tilting parameter $t$ to transform the optimization objective. This "t-SAM" objective allows the algorithm to interpolate between standard ZO (minimizing average loss as $t \to 0$) and SAM-like behavior (minimizing max loss as $t \to \infty$).

Comparison of optimization methods, objectives, and memory requirements. ZEST achieves SAM-like objectives with the minimal memory footprint of zeroth-order methods.

To implement this without direct gradient access, the authors derived a novel estimator based on Stein’s Lemma and the divergence theorem. ZEST maintains extreme memory efficiency—requiring only $2|x|$ memory—by regenerating random perturbations on the fly using synchronized random seeds. This allows it to scale to models as large as OPT-1.3B without the overhead typical of first-order sharpness-aware methods. To ensure stability with a small number of perturbations ($k$), ZEST utilizes a Bias-Corrected Plug-In estimator for the tilted gradient ratio.

Key Insights: Navigating the Loss Landscape

A critical challenge in optimization is the "stationary pitfall," where multiple local minima may have similar average curvatures (Hessian trace) but vastly different peak curvatures (sharpness). Standard ZO methods are often "blind" to this difference, as they primarily respond to the trace of the Hessian.

Optimization trajectories of MeZO and ZEST on a surface with one sharp and one flat minimum. ZEST successfully navigates to the flatter region, whereas MeZO converges to the sharp minimum.

As shown in Figure 3, ZEST is specifically designed to be sensitive to the largest eigenvalue of the Hessian. This sensitivity allows it to "feel" the sharpness of a minimum and steer the optimization toward flatter, more robust regions that generalize better to unseen data. Post-training analysis confirmed that ZEST consistently finds solutions with lower neighborhood loss compared to MeZO.

Experimental Results and Robustness

The researchers evaluated ZEST across the GLUE benchmark and various LLM tasks using RoBERTa-base and OPT-1.3B models.

  • Superior Accuracy: ZEST consistently outperformed MeZO, with improvements of up to 1.7% on clean GLUE tasks.
  • Noise Robustness: In scenarios with 30% label noise, ZEST demonstrated remarkable stability, outperforming baselines by up to 5.9%. This suggests that the "flat path" found by ZEST is inherently more resistant to data perturbations.
  • LLM Fine-tuning: On the OPT-1.3B model, ZEST matched or exceeded the performance of first-order Adam/SGD on several multiple-choice QA and generation benchmarks (COPA, ReCoRD, SQuAD), proving that zeroth-order methods can be competitive even in high-stakes LLM applications.

Conclusion

ZEST represents a significant step forward for memory-efficient optimization. By integrating exponential tilting into the zeroth-order framework, it enables the discovery of flat minima previously accessible only to more resource-heavy first-order methods. While it introduces a new hyperparameter $t$ and requires more iterations than gradient-based methods, its ability to improve generalization and robustness makes it a powerful tool for the next generation of LLM fine-tuning.

Summary updated

BibTeX
@inproceedings{gong2026zeroth,
  author = {Xuchen Gong and Tian Li},
  title = {{Zeroth-Order Sharpness-Aware Learning with Exponential Tilting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=8LXSBQlinu},
}
Figure