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

TeZO: Empowering the Low-Rankness on the Temporal Dimension in the Zeroth-Order Optimization for Fine-tuning LLMs

Yan Sun, Tiansheng Huang, Liang Ding, Li Shen, Dacheng Tao · DOI

Introduction

Fine-tuning Large Language Models (LLMs) using standard First-Order (FO) methods like backpropagation is extremely memory-intensive, primarily due to the need to store activations and gradients. Zeroth-Order (ZO) optimization has emerged as a promising alternative, estimating gradients using only forward passes. However, existing ZO methods often suffer from high variance and significant computational overhead, particularly when generating random perturbations at every training step.

TeZO (Temporal Zeroth-Order) addresses these challenges by exploiting "temporal low-rankness." The authors observe that gradients share a similar subspace across training iterations, allowing for a more efficient representation of perturbations over time.

The TeZO Framework

The core innovation of TeZO is treating the sequence of perturbations as a 3D tensor (Model Dimension $m \times$ Model Dimension $n \times$ Training Steps $T$). By applying Canonical Polyadic Decomposition (CPD), TeZO decomposes this tensor into spatial factor vectors ($u, v$) and temporal factor vectors ($\chi$).

TeZO constructs perturbations using a 3D tensor approach compared to previous 2D matrix-based methods like LOZO and SubZO.

Unlike previous methods like LOZO or SubZO, which generate new random factor vectors at every step, TeZO fixes the spatial components at the start and only samples a small temporal factor at each iteration. This "decoupled sampling" reduces the computational cost of generating random variables from $O(\sqrt{d}T)$ to $O(\sqrt{d} + T)$. Additionally, TeZO-Adam applies adaptivity within this low-rank temporal subspace, maintaining the benefits of Adam optimization with minimal memory overhead.

Experimental Evaluation

TeZO was validated across models including RoBERTa-large, OPT (125M to 30B), and LLaMA-7B on 16 diverse datasets. The results demonstrate that the joint low-rankness across both model layers and training iterations is a robust property that TeZO effectively leverages.

Validation of low-rankness on both model and temporal dimensions, alongside a comparison of GPU memory usage.

Key Results

  • Memory Efficiency: TeZO-Adam requires only ~35% of the memory of MeZO-Adam. For an OPT-13B model, TeZO-Adam's memory footprint is comparable to standard MeZO-SGD while providing the performance benefits of an adaptive optimizer.
  • Computational Speedup: On an H100 GPU, TeZO-Adam is 1.63x faster per iteration than MeZO-Adam, largely due to the reduced overhead in perturbation generation.
  • Performance: TeZO achieves state-of-the-art performance for ZO methods. On OPT-13B, it significantly narrowed the performance gap to FO fine-tuning compared to the MeZO baseline, reducing the gap from -5.4% to just -2.5%.

Conclusion

TeZO represents a significant step forward in making LLM fine-tuning more accessible. By recognizing and exploiting temporal low-rankness, it provides a framework that is both memory-efficient and computationally fast without sacrificing accuracy. Future work may explore re-initialization strategies to handle potential subspace drift in extremely long training runs.

Summary updated

BibTeX
@misc{sun2025tezo,
  author = {Yan Sun and Tiansheng Huang and Liang Ding and Li Shen and Dacheng Tao},
  title = {{TeZO: Empowering the Low-Rankness on the Temporal Dimension in the Zeroth-Order Optimization for Fine-tuning LLMs}},
  year = {2025},
  eprint = {2501.19057},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.19057},
}
Figure