PAMS: Preconditioned Activation-Metric Subspace for Zeroth-Order LLM Fine-tuning
Organizations: School of Computing, University of Georgia, Athens, USA
Abstract
Zeroth-order (ZO) optimization provides a computationally efficient approach to fine-tuning large language models (LLMs), but conventional methods typically rely on isotropic perturbations that ignore the anisotropic structure of neural-network parameter spaces. We introduce Preconditioned Activation-Metric Subspace (PAMS), a ZO optimization framework that uses forward-pass activation statistics to construct structured, layer-wise perturbation geometries without computing gradients or forming dense curvature matrices. PAMS tracks a low-rank approximation of the dominant activation subspace and its associated spectrum online, and uses the spectrum to softly reweight perturbation variance while preserving exploration in directions outside the retained subspace. A trace normalization separates the perturbation geometry from its overall scale, enabling consistent perturbation magnitudes across layers. We show theoretically that the resulting perturbation covariance induces right-side preconditioning of the gradient of the corresponding Gaussian-smoothed objective. We further characterize the estimator's smoothing bias and second moment and derive a nonconvex convergence guarantee that captures the effects of the perturbation geometry and smoothing radius. The proposed low-rank tracking procedure requires persistent memory for a layer with input dimension nl and retained rank r, avoiding the memory required by a dense activation covariance. Experiments on transformer-based language-model fine-tuning tasks across GLUE and SuperGLUE demonstrate that PAMS improves the effectiveness and stability of zeroth-order optimization while retaining its gradient-free and objective-evaluation-based advantages.
Figures & tables
| Method | SST-2 | SST-5 | SNLI | MNLI | RTE | TREC | Avg. |
|---|---|---|---|---|---|---|---|
| MeZO | |||||||
| LOZO | |||||||
| HiZOO | |||||||
| PAMS |
| Method | SST-2 | RTE | CB | BoolQ | WiC | MultiRC | COPA | Mean (gain %p) |
|---|---|---|---|---|---|---|---|---|
| MeZO | ||||||||
| LOZO | ||||||||
| HiZOO | ||||||||
| PAMS |
| Method | SST-2 | RTE | CB | BoolQ | WSC | Mean (gain %p) |
|---|---|---|---|---|---|---|
| MeZO | ||||||
| LOZO | ||||||
| HiZOO | ||||||
| PAMS |
| Ablation Setting | Task | Ablated PAMS | Full PAMS |
|---|---|---|---|
| No reweighting | SST-2 | ||
| No reweighting | RTE | ||
| Frozen Random subspace | SST-2 | ||
| Static Activation Covariance | SST-5 |
| MeZO | LOZO | HiZOO | PAMS | |
|---|---|---|---|---|
| Time / Step (ms) | 297 | 327 | 446 | 402 |
| Peak Mem. (GB) | 1.72 | 1.80 | 3.30 | 2.16 |
| Test acc | 91.05% | 91.50% | 91.05% | 92.78% |
Zeroth-Order Optimization
Zeroth-order optimization uses function values or comparisons, rather than gradients, to optimize objectives when differentiation is unavailable or costly.
See all 105 papers