arXiv:2602.13659cs.LGmath.OC2026-02

通过可学习方向采样,让大模型微调零阶优化更高效省显存。

Zero-Order Optimization for LLM Fine-Tuning via Learnable Direction Sampling

  • 将方向采样设为可学习策略,动态降低梯度估计方差。
  • 在多个大模型微调任务上表现优于传统零阶方法。
  • 适合显存受限场景下的大模型轻量化微调。

大型预训练语言模型(LLMs)的微调是现代自然语言处理的核心,但其高昂的内存开销(源于反向传播和大型优化器状态)限制了在资源受限环境中的部署。零阶(ZO)方法通过前向评估估算方向导数,避免反向传播,实现显著的内存节省。然而,经典零阶估计器存在方差高、与参数维度 $d$ 呈负面依赖的问题,使其仅适用于低维问题。本文提出一种基于策略驱动的零阶框架,将扰动方向的采样分布视为可学习策略,并通过更新该策略来降低方向估计的方差。我们设计了一种实用算法并提供理论分析,表明学习到的采样分布能提升梯度信息质量,并弱化收敛界中对 $d$ 的显式依赖。实验验证了该方法在挑战性大模型微调基准上的有效性,性能显著优于标准零阶基线。结果表明,自适应方向采样是实现大规模零阶微调的可行路径。代码已开源:https://github.com/brain-lab-research/zo_ldsd。

原文摘要 · Abstract (English)

Fine-tuning large pretrained language models (LLMs) is a cornerstone of modern NLP, yet its growing memory demands (driven by backpropagation and large optimizer States) limit deployment in resource-constrained settings. Zero-order (ZO) methods bypass backpropagation by estimating directional derivatives from forward evaluations, offering substantial memory savings. However, classical ZO estimators suffer from high variance and an adverse dependence on the parameter dimensionality $d$, which has constrained their use to low-dimensional problems. In this work, we propose a policy-driven ZO framework that treats the sampling distribution over perturbation directions as a learnable policy and updates it to reduce the variance of directional estimates. We develop a practical algorithm implementing this idea and provide a theoretical analysis, showing that learned sampling distributions improve the quality of gradient information and relax the explicit dependence on $d$ in convergence bounds. Empirically, we validate the approach on challenging LLM fine-tuning benchmarks, demonstrating substantially improved performance compared to standard ZO baselines. Our results suggest that adaptive direction sampling is a promising route to make ZO fine-tuning viable at scale. The source code is available at https://github.com/brain-lab-research/zo_ldsd

零阶优化大模型微调显存优化可学习采样

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。