arXiv:2609.35257cs.LGSep 2026

Manuscript Offprint

arXiv:2609.35257

AIM-ZO: Activation-Informed Subspace Maintenance for Zeroth-Order LLM Fine-Tuning

Yue Xie, Zhi Zheng, Yunpeng Ba, Xuyang Wu, Xialiang Tong, Zhichao Lu, Tao Zhong, Zhenkun Wang

ABSTRACT

Zeroth-order (ZO) optimization offers a memory-efficient alternative for LLM fine-tuning by estimating updates only from forward evaluations of perturbed parameters, without backpropagation or activation storage. However, in billion-parameter LLMs, isotropic perturbations often waste many forward evaluations on weakly informative directions. To make these evaluations more informative, existing ZO methods restrict perturbations to low-dimensional subspaces. Yet the quality of these subspaces is critical: overly compressed or poorly maintained spaces can miss useful update directions. To obtain a high-quality subspace for ZO updates, this paper proposes AIM-ZO, a ZO fine-tuning method based on Activation-Informed Subspace Maintenance. AIM-ZO uses forward activations as local directional information and continuously integrates them into a broad, evolving subspace over training. To access broader gradient-relevant structure while keeping individual perturbations low-dimensional, AIM-ZO activates only a smaller set of shared and sampled directions, decoupling the maintained width from the active width. We evaluate AIM-ZO across 5 LLMs and 11 downstream tasks under matched forward-evaluation budgets; its six-task average exceeds the strongest fully evaluated ZO baseline by 1.26 percentage points on OPT-2.7B and MeZO by 2.85 percentage points on OPT-30B. Our code is available at https://github.com/EkkoXy/AIM-ZO

1 INTRODUCTION

Fine-tuning large language models (LLMs) requires substantial memory because backpropagation stores intermediate activations for gradient computation. Zeroth-order (ZO) optimization avoids this cost by estimating gradients from forward loss evaluations at perturbed parameter points (Ghadimi & Lan, 2013; Nesterov & Spokoiny, 2017; Zheng et al., 2026; Ba et al., 2026). MeZO shows that this approach can fine-tune LLMs with a memory footprint close to inference (Malladi et al., 2023). However, MeZO samples perturbation directions randomly from the full parameter space. As illustrated on the left of Figure 1, in billion-parameter models, many such random directions are poorly aligned with useful update directions, so a large fraction of forward evaluations provide only weak optimization signals.

Prior studies have shown that gradients can concentrate in low-dimensional subspaces that remain relatively stable over parts of training (Gur-Ari et al., 2018; Jaiswal et al., 2025). Building on this observation, recent ZO methods exploit low-dimensional structure through low-rank perturbations, random projections, or forward activations (Chen et al., 2025; Yu et al., 2025; Lin et al., 2026; Dong et al., 2026). Their effectiveness, however, depends critically on the quality of the perturbation subspace. Specifically, 1) random or overly compressed perturbation subspaces may miss useful gradient information; and 2) simply enlarging the perturbation subspace can capture more gradient information but also make finite-sample estimation more difficult as its width grows. These challenges motivate our central research question:

How can we obtain a high-quality subspace for low-dimensional ZO fine-tuning?

∗^{*}Equal contribution

Figure

Figure 1: Perturbation spaces. MeZO explores the full parameter space; AGZO constructs a subspace from current activations. AIM-ZO maintains a width-K subspace across training and activates a width-k subspace with h shared and k−hk - h sampled directions per perturbation.

AGZO constructs perturbation subspaces from current activations, rebuilding them at each step without accumulating activation structure across training (Lin et al., 2026). This repeated construction adds computational cost and can leave the subspace sensitive to stochastic variation; using the same subspace for perturbations also couples gradient coverage to estimation variance.

To address these limitations, we propose AIM-ZO, a ZO fine-tuning method based on Activation-Informed Subspace Maintenance. AIM-ZO continuously accumulates activation information across training into a broader width-K maintained subspace. Each perturbation then activates only k<Kk < K directions, combining h shared directions with k−hk - h directions sampled from the remaining maintained space. This decouples the amount of gradient-relevant information retained by the maintained subspace from the dimensionality used in each perturbation, allowing low-dimensional perturbations to access different parts of a broader subspace over time. A population-centered one-sided estimator aggregates these perturbations into the parameter update. We evaluate AIM-ZO across 5 LLMs, ranging from 0.6B to 30B parameters, and 11 downstream tasks. AIM-ZO achieves stronger overall performance than existing ZO baselines, including a 1.26 percentage-point improvement over the strongest fully evaluated baseline on OPT-2.7B and a 2.85 percentage-point improvement over MeZO on OPT-30B. Our contributions are as follows:

• We propose AIM-ZO, which accumulates forward activation information across training to maintain a broad, evolving perturbation subspace. Our analysis gives a lower bound on its gradient capture, which we also measure empirically.

• We decouple maintained and active subspace widths, allowing low-dimensional perturbations to access a broader space. Our analysis identifies when estimates from the active subspace align better with the gradient than estimates from the full maintained subspace.

• We comprehensively evaluate AIM-ZO across 5 LLMs and 11 downstream tasks. The results show stronger overall performance than existing ZO baselines, while peak-memory measurements on Qwen3-0.6B show only modest overhead relative to MeZO.

References (37)