Dominant-Layer ZO: A Single Layer Dominates Zeroth-Order Fine-Tuning of LLMs

Wanhao Yu, Ziyan Wang, Zheng Wang, Abeer Matar Almalky, Yihang Zuo, Shuteng Niu, Sen Lin, Adnan Siraj Rakin, Deliang Fan, Li Yang

TL;DR

Zeroth-order (ZO) fine-tuning of Large Language Models (LLMs) is sharply dominated by a single decoding layer. By identifying and tuning just this one "dominant layer"—which perfectly aligns with the first layer where activation outliers emerge—you can match or exceed full-model ZO fine-tuning performance while achieving up to a 4.52× training speedup.

What Problem Does This Paper Address?

Fine-tuning Large Language Models (LLMs) using standard first-order (FO) optimizers like AdamW requires massive amounts of memory because backpropagation forces the system to store intermediate activations. Zeroth-order (ZO) optimization methods, such as MeZO, offer a memory-efficient alternative by estimating gradients using only forward passes. They do this by applying random perturbations to the model parameters and measuring the resulting differences in the final loss.

However, existing ZO methods treat fine-tuning as a full-model process, blindly perturbing all layers. This paper addresses a fundamental, unanswered question: Under forward-only updates, where does useful optimization actually occur inside LLM architectures?

Methods

The authors first conduct a systematic layer-wise analysis by freezing the entire network except for one layer at a time, fine-tuning that single layer using ZO updates.

Upon discovering that a single layer dominates the optimization process, they introduce a lightweight, inference-only selection method to identify this "dominant layer" before training even begins. Instead of running expensive training trials for every layer, they pass a small calibration dataset through the pre-trained LLM and measure layer-wise activation statistics. The dominant layer is identified as the very first layer where activation outliers (dimensions with abnormally large magnitudes) emerge. Once found, ZO fine-tuning is restricted entirely to this single layer.

Datasets

The method was evaluated across nine standard NLP benchmarks spanning classification, multiple-choice, and generation tasks:

  • Classification: SST-2, RTE, CB, BoolQ, WSC, MultiRC
  • Multiple-Choice: COPA
  • Generation: SQuAD, DROP

Key Insights and Ideas

  • The ZO vs. FO Asymmetry: In standard first-order (FO) training, adaptation is distributed relatively evenly across the network. In ZO training, performance gains are highly concentrated in just one layer, while most other layers contribute next to nothing.

    Figure 1: Layer-wise fine-tuning on Llama2-7B results across three representative datasets.
  • Task-Agnostic but Model-Specific: The dominant layer does not change when you switch tasks, but it does change depending on the model architecture. For instance, it is Layer 1 in LLaMA2-7B, but Layer 6 in Qwen3-8B.

  • The Outlier Connection: The dominant layer consistently aligns with the first layer where massive activation outliers appear in the pre-trained model.

    Figure 2: Mean and Maximum of Layer-wise output activation magnitudes for LLaMA2-7B and Qwen3-8B on COPA and WSC training samples. The highlighted point indicates the first activation-outlier layer, where the maximum output activation magnitude shows a clear jump.
  • Why the Dominant Layer Dominates: Because ZO optimization relies entirely on final loss differences, a layer can only contribute significantly if its perturbations strongly impact the final output. The dominant layer combines high perturbation sensitivity with an early position in the model's residual stream. Perturbations introduced here propagate through all subsequent decoding layers, repeatedly transforming and accumulating to create a strong, stable optimization signal.

Key Results

  • Better Performance with Fewer Parameters: Restricting updates to the dominant layer consistently matched or outperformed full-model MeZO. On average, dominant-layer ZO improved scores by 0.57% on LLaMA2-7B and 1.15% on Qwen3-8B compared to full-model ZO. It also outperformed LoRA-based ZO frameworks.
  • Substantial Training Speedups: Updating a single layer reduces parameter-side perturbation and update overhead by roughly 27× to 31×. For tasks with short inputs (like COPA), where parameter operations bottleneck the runtime, this translates to an end-to-end wall-clock training speedup of up to 4.52×. For long-input tasks where the forward pass dominates, the speedup is more modest (around 1.12× to 1.24×).

Limitations and Future Work

Despite its efficiency, a performance gap still remains between dominant-layer ZO fine-tuning and standard first-order backpropagation. Additionally, ZO optimization inherently requires a large number of training steps to converge, which remains a challenge for practical deployment.

The authors note that they only evaluated two model families (LLaMA2 and Qwen3) using a standard MeZO framework. They suggest that future work should explore combining the dominant-layer approach with more advanced ZO optimizers, such as ZO-AdaMM or FZOO, and validating the phenomenon across a wider variety of pre-trained LLMs.

Summary updated

BibTeX
@inproceedings{yu2026dominant,
  author = {Wanhao Yu and Ziyan Wang and Zheng Wang and Abeer Matar Almalky and Yihang Zuo and Shuteng Niu and Sen Lin and Adnan Siraj Rakin and Deliang Fan and Li Yang},
  title = {{Dominant-Layer ZO: A Single Layer Dominates Zeroth-Order Fine-Tuning of LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=LEaZsZB1xF},
}
Figure