Leveraging Coordinate Momentum in SignSGD and Muon: Memory-Optimized Zero-Order

Egor Petrov, Grigoriy Evseev, Aleksey Antonov, Andrey Veprikov, Nikolay Bushkov, Stanislav Moiseev, Aleksandr Beznosikov

TL;DR

Fine-tuning Large Language Models (LLMs) traditionally requires massive GPU memory to store gradients during backpropagation. This paper introduces JAGUAR SignSGD and JAGUAR Muon, two zero-order optimization algorithms that eliminate backpropagation entirely by estimating gradients using only forward passes. By cleverly incorporating a low-memory "coordinate momentum" mechanism, these algorithms match or exceed the accuracy of traditional first-order methods while cutting memory usage by up to 3x.

What Problem Does This Paper Address?

Fine-tuning is the standard way to adapt pre-trained LLMs to specific downstream tasks. However, standard first-order (FO) optimizers like SGD and Adam rely on backpropagation to calculate gradients. Backpropagation requires storing intermediate network activations and optimizer states, creating a massive memory bottleneck that scales poorly with model size. For example, fine-tuning a 13-billion-parameter model can require an order of magnitude more memory than simply running inference on it.

Zero-Order (ZO) optimization is a promising alternative. Instead of backpropagation, ZO methods estimate gradients by running forward passes with tiny random perturbations to the model's weights (finite differences). While highly memory-efficient, standard ZO methods struggle to converge efficiently on complex, non-convex LLM landscapes. Adding traditional momentum to stabilize them usually requires storing massive history vectors, which defeats the memory-saving purpose of using zero-order methods in the first place.

Methods

The authors tackle this dilemma by introducing a memory-optimized coordinate momentum framework based on the JAGUAR gradient estimation technique.

Instead of perturbing all parameters at once or using dense random vectors, the algorithms sample a single coordinate (a one-hot basis vector) at each step. Crucially, rather than discarding information from unselected coordinates, they maintain a running history using a SAGA-like update rule. This historical memory is controlled by a momentum parameter ($\beta$), allowing the optimizer to smooth out stochastic noise without an explicit memory explosion.

The paper introduces two novel algorithms built on this core idea:

  1. JAGUAR SignSGD: Combines coordinate momentum with the sign operator (updating weights based only on the direction of the gradient, not its magnitude). It requires only $2d+1$ parameters (where $d$ is the total number of model parameters) and just $\mathcal{O}(1)$ function evaluations per iteration.
  2. JAGUAR Muon: Extends this concept to matrix-valued parameters by adapting the state-of-the-art Muon optimizer. It projects the estimated coordinate-momentum gradient matrix onto a space of semi-orthogonal matrices using the Newton-Schulz algorithm, better capturing the structural properties of LLM weight matrices.

The authors provide a comprehensive taxonomy of how these new approaches fit into the broader landscape of zero-order optimization literature:

Table 1: Summary of relevant results from the existing zero-order literature.

Datasets

The algorithms were evaluated across a variety of standard LLM fine-tuning benchmarks:

  • SST2: A benchmark for binary sentiment classification.
  • WinoGrande: A large-scale dataset for commonsense reasoning.
  • COPA (Choice of Plausible Alternatives): A task evaluating causal reasoning.

Experiments were conducted using both Full Fine-Tuning (FT) and Low-Rank Adaptation (LoRA) across multiple prominent model families, including RoBERTa-Large, OPT-1.3B, Llama2-7B, and OPT-13B.

Key Insights and Ideas

  • The Power of Coordinate History: You don't need to estimate the entire gradient vector at every single step to benefit from momentum. Keeping a historical running average of individual coordinate updates provides the variance reduction needed for non-convex convergence while maintaining a rock-bottom memory footprint.
  • First Guarantees for ZO SignSGD: This work provides the first rigorous theoretical proof of convergence for SignSGD in a stochastic, zero-order setting under arbitrary noise.
  • Orthogonalization Translates to ZO: Adapting the Muon optimizer shows that matrix orthogonalization principles remain highly effective for LLMs, even when the underlying gradients are noisy, zero-order approximations.

Key Results

  • Matching First-Order Accuracy: On the SST2 dataset using an OPT-1.3B model under Full Fine-Tuning, JAGUAR SignSGD achieved 94.0% accuracy, outperforming standard first-order SGD (91.1%) and significantly beating standard zero-order SignSGD (87.2%).
  • Dramatic Memory Reductions: For full fine-tuning of the OPT-1.3B model, traditional first-order SGD consumed 12.246 GB of GPU memory. In contrast, JAGUAR SignSGD required only 4.172 GB—matching the bare-minimum memory footprint of basic ZO-SGD while delivering vastly superior convergence quality.
  • Scalability to Large Models: When evaluating LoRA fine-tuning on the 7-billion-parameter Llama2 model (WinoGrande dataset), JAGUAR SignSGD achieved 64.9% accuracy, outperforming baseline zero-order methods (64.3%) and closing the gap with first-order optimization.

Limitations and Future Work

  • Degradation on Non-Matrix Parameters: JAGUAR Muon showed slightly lower performance during Full Fine-Tuning compared to LoRA. The authors attribute this to the presence of non-matrix parameters (like biases and embedding layers) in full fine-tuning, which do not conform well to Muon's matrix-orthogonalization steps.
  • Dimensionality Dependence: Theoretically, coordinate-descent methods introduce a factor of the dimension $d$ into their convergence bounds because they update one direction at a time. While layer-wise updates and LoRA mitigate this empirically, it remains a theoretical bottleneck for massive parameter counts.
  • Future Directions: The authors suggest exploring non-uniform coordinate sampling strategies (e.g., importance sampling based on layer sensitivity) to further accelerate convergence.

Summary updated

BibTeX
@inproceedings{petrov2025leveraging,
  author = {Egor Petrov and Grigoriy Evseev and Aleksey Antonov and Andrey Veprikov and Nikolay Bushkov and Stanislav Moiseev and Aleksandr Beznosikov},
  title = {{Leveraging Coordinate Momentum in SignSGD and Muon: Memory-Optimized Zero-Order}},
  booktitle = {TTODLer-FM @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=WIeHAXEWLk},
}
Figure