Towards Identifying Dominant Low-Rank Subspaces in Zeroth-Order Fine-Tuning

Jinjie Fang, Chengxun Jin, Yi Chang, Bin GuNeurIPS 2026

TL;DR

Fine-tuning massive language models without running out of GPU memory is possible using Zeroth-Order (ZO) optimization—which skips backpropagation entirely—but guessing gradients in billions of dimensions is notoriously noisy and slow. Instead of nudging weights in random directions like current methods do, the authors introduce AHZO, an algorithm that looks in the rearview mirror at recent parameter updates to figure out where the loss landscape is actually sloping. The result is a memory-sipping fine-tuning method that rivals traditional backpropagation in accuracy while keeping your GPU's memory footprint down at inference levels.

What Problem Does This Paper Address?

Standard fine-tuning uses first-order (FO) optimizers like Adam, which rely on backpropagation. The catch? Backpropagation forces you to store a mountain of intermediate activations in memory. Even Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA don't fully escape this activation bottleneck, often requiring several times the memory of simple inference.

To dodge backpropagation, researchers turned to Zeroth-Order (ZO) optimization. Think of ZO as hiking down a pitch-black mountain by tapping your cane slightly to the left and right, feeling which way slopes down, and taking a step—using only forward passes. While this matches the tiny memory footprint of inference, tapping a cane in a billion-dimensional parameter space triggers the curse of dimensionality: the gradient estimates suffer from massive variance, making training unstable and sluggish.

We know empirically that LLM gradients mostly live in low-rank subspaces (tiny slices of the massive parameter space). Recent ZO methods like LOZO try to exploit this by restricting perturbations to low-rank subspaces. However, they generate these subspaces randomly. In high-dimensional geometry, a randomly chosen low-rank subspace is almost guaranteed to be nearly orthogonal (perpendicular) to the true, optimal gradient subspace. You end up tapping your cane along a flat ridge while the real valley drops off right beside you.

Methods

To align their perturbations with the true steepest descent without paying for backpropagation, the authors propose AHZO (Average Historical Gradient Zeroth-Order optimization).

Instead of burning compute on dozens of forward-pass queries at a single step to get a clean gradient signal, AHZO uses the Average Historical Gradient (AHG). Over an optimization window of $\nu$ steps, individual ZO updates are noisy, but their accumulated path naturally cancels out zero-mean noise and points along the true trajectory of descent.

Instead of making expensive multiple queries at one point, AHZO averages historical steps along the trajectory for free.

Here is how AHZO upgrades the standard low-rank ZO loop:

  1. Memory-Light Tracking: Instead of storing huge full-sized weight displacements, AHZO tracks compact low-rank coefficient matrices during a period of $\nu$ steps.
  2. Distilling the Subspace (Exploitation): Every $\nu$ steps, AHZO reconstructs the accumulated historical displacement (the AHG) and runs Truncated Singular Value Decomposition (SVD) on it. The top-$p$ singular vectors capture the principal directions that drove the most loss reduction—forming the exploitation basis.
  3. Leaving Room for Discovery (Exploration): If you only look where you've been, you might get stuck. AHZO fills the remaining $r - p$ dimensions of its rank-$r$ subspace with random vectors made orthogonal (via QR decomposition) to the exploitation basis.
Comparison of LOZO (random subspaces) vs. AHZO, which periodically uses SVD on historical updates to align with the dominant gradient manifold.

Datasets

The authors evaluate AHZO on 11 established NLP benchmarks spanning three task types (no new datasets were introduced):

  • Classification & Natural Language Inference: SST-2, RTE, CB, BoolQ, WSC, WiC, and MultiRC (drawn from GLUE and SuperGLUE).
  • Multiple-Choice / Commonsense Reasoning: COPA and ReCoRD.
  • Generation / Reading Comprehension: SQuAD and DROP.

These are tested across four pre-trained LLMs scaling from 1.3B to 32B parameters: OPT-1.3B, OPT-13B, Qwen2.5-7B, and Qwen2.5-32B.

Key Insights and Ideas

  • Random subspaces go blind at scale: The authors prove mathematically that for a model with dimension $m$ and subspace rank $r$, a random subspace captures a fraction of gradient energy scaling with $r/m$. As LLMs grow, $r/m \to 0$, meaning random low-rank ZO updates get drowned out by noise. AHZO provides a deterministic lower bound on alignment that doesn't vanish with model size.
  • Optimization history is a "free" denoiser: Averaging steps across time acts as a proxy for averaging multiple queries in space, extracting the true gradient manifold with zero extra forward-pass queries.
  • Better alignment unlocks bigger step sizes: Because AHZO's gradient estimates have much lower variance, it can tolerate significantly higher learning rates than random-subspace methods like LOZO (which typically require tiny $10^{-7}$ to $10^{-6}$ learning rates), speeding up convergence.

Key Results

Across all four model scales, AHZO consistently beats state-of-the-art memory-efficient ZO baselines (MeZO, MeZO-LoRA, SubZero, HiZOO, and LOZO):

  • Consistent Gains: AHZO improves over the best competing ZO baseline by an average of +3.81 points on OPT-1.3B, +1.6 on Qwen2.5-7B, +1.6 on OPT-13B, and +2.2 on Qwen2.5-32B.
  • Matching Backprop at 1/12th the Memory: On OPT-13B, AHZO hits an average score of 72.5, tying full first-order fine-tuning (Adam) while avoiding Adam's 12× memory overhead. On Qwen2.5-7B, it reaches 83.8 (closing in on full fine-tuning's 85.3, which requires 11× more memory, and beating FT-LoRA's 79.0).
  • Subspace Updates Matter: In ablations across Qwen2.5-7B and OPT-13B, dynamic subspace alignment (87.9 average) clearly beat both static/fixed subspaces (85.1) and purely random subspaces (86.7) under the exact same query budget.

Limitations and Future Work

Not discussed in the paper. (Note: While the main text provided does not include a dedicated limitations or future work section, the theoretical guarantees in Corollary 1 rely on bounded parameter drift within each $\nu$-step period and a non-vanishing singular-value gap in the accumulated gradient matrices—conditions the authors note are empirically met in their tested regimes).

Summary updated

Abstract

Adapting Large Language Models (LLMs) to downstream tasks is increasingly bottlenecked by the staggering memory overhead of first-order (FO) backpropagation. Zeroth-order (ZO) optimization has emerged as a compelling, memory-efficient alternative; however, it suffers from the curse of dimensionality, which introduces prohibitively high variance in gradient estimation. While LLM gradients empirically reside in low-rank subspaces, existing state-of-the-art ZO methods typically rely on randomly generated low-rank subspaces, which often fail to align with the underlying dominant gradient manifold, fundamentally limiting optimization efficiency. To bridge this gap, we propose AHZO, an efficient low-rank ZO fine-tuning algorithm that dynamically identifies dominant subspaces via the Average Historical Gradient (AHG). Motivated by the directional coherence of optimization trajectories, AHZO leverages the average historical ZO gradient over a period as a principled proxy for the true gradient. By applying singular value decomposition to AHG matrices, AHZO distills principal spectral signatures to construct low-rank bases that tightly align with the true dominant subspaces. Theoretically, we prove that AHZO significantly mitigates estimation variance, yielding superior convergence guarantees compared to random-subspace ZO methods. Extensive evaluations across diverse LLM architectures and benchmarks demonstrate that AHZO consistently outperforms existing ZO baselines, achieving performance highly competitive with memory-intensive FO fine-tuning.
BibTeX
@inproceedings{fang2026towards,
  author = {Jinjie Fang and Chengxun Jin and Yi Chang and Bin Gu},
  title = {{Towards Identifying Dominant Low-Rank Subspaces in Zeroth-Order Fine-Tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Ko8MeBmiba},
}
Figure