Trust the Direction, Search the Step: Zero-and-First-Order Methods for LLM Fine-Tuning

Cristian McGee, El Houcine Bergou, Aritra Dutta
10/1/2026
cs.LGmath.OC

Official code: nizswan/Zeroth-First-Order-Framework (4 stars, Jupyter Notebook, last commit 2026-10-21).

Abstract

Step-size selection remains a central challenge in large-scale neural network optimization; conservative steps slow convergence, while aggressive steps can destabilize it. We combine \textbf{Z}ero-and-\textbf{F}irst-\textbf{O}rder optimization~(ZFO) and propose a lightweight framework that decouples direction selection from step-size.

Show full abstract

ZFO uses a trusted first-order optimizer to determine the direction and performs zeroth-order evaluations only along this one-dimensional subspace to choose how far to move. Using the current {gradient information} and two additional objective function evaluations, ZFO instances construct a local model of the objective function along the proposed direction and select a curvature-aware step within a bounded search interval. This yields an adaptive step-selection mechanism that costs less than a full line search. We provide theoretical guarantees to show that shared-sample evaluations produce reliable finite-difference curvature estimates, that the induced local model selects a near-optimal step along the search interval, and that ZFO converges to a neighborhood of a stationary point. Across the evaluated settings, language models and datasets, ZFO frequently improves optimization and final performance relative to fixed-step first-order baselines, with the magnitude and preferred local model depending on the objective. Our code is publicly available at: https://github.com/nizswan/Zeroth-First-Order-Framework.

View on arXivView PDF

Code Implementations(1)

ZFO implementations, baselines, and reproducibility configurations for large language model fine-tuning with intelligent step selection.

40Jupyter Notebook, PythonSep 24, 20261 months ago

Similar Papers

Cite this paper

@article{mcgee2026trust,
  title  = {Trust the Direction, Search the Step: Zero-and-First-Order Methods for LLM Fine-Tuning},
  author = {Cristian McGee and El Houcine Bergou and Aritra Dutta},
  year   = {2026},
  eprint = {2610.02190},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.02190v1}
}

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

Discussion