arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.16451cs.LGcs.AI
收藏

StructZO:用于内存高效大语言模型微调的结构化零阶优化

StructZO: Structured Zeroth-Order Optimization for Memory-Efficient LLM Fine-Tuning

Peking University(北京大学);Beijing Normal University(北京师范大学)

Xuanlin Yang, Jia Li, Zhouchen Lin

AI总结:

StructZO是一种结构化零阶优化框架,通过激活诱导子空间的ZO估计与谱控制,在内存高效的前提下大幅缩小了零阶优化与一阶优化的性能差距,在LLM微调任务上表现优异。

摘要:

大规模微调大语言模型(LLM)的内存成本日益受到反向传播的限制。零阶(ZO)优化器仅依赖前向函数评估即可降低这一负担,但它们与一阶(FO)优化器(如Adam)之间仍存在显著的性能差距。我们认为,该差距并非仅源于缺乏显式梯度:FO微调还受益于信息丰富的低秩优化几何结构、大规模信号聚合以及条件良好的更新方向。基于此,我们提出StructZO,这是一种用于内存高效LLM微调的结构化零阶优化框架。StructZO在激活诱导的信息子空间内执行大查询ZO估计,并对所得的降维空间更新应用谱控制,再将其映射回原始参数。这使ZO能在紧凑的几何感知空间中聚合有用的方向信号,同时避免反向传播的激活和优化器状态内存成本。我们从理论上证明,当诱导子空间捕获与优化相关的集中方向时,StructZO可将有效ZO估计维度从$mn$降至$mr$,剩余投影误差由激活Gram矩阵的谱尾控制。在OPT系列和Llama3.1-8B的各类下游任务上的实验表明,StructZO相较于现有最强ZO基线的平均相对提升达8.7%,单个任务的相对提升最高达26.9%,同时与FO-Adam的平均差距保持在1.5%以内。这些结果表明,结构化且受谱控制的ZO更新可大幅缩小ZO与FO优化之间的差距。

英文摘要:

Fine-tuning large language models at scale is increasingly limited by the memory cost of backpropagation. Zeroth-Order (ZO) optimizers reduce this burden by relying only on forward function evaluations, but they still exhibit a substantial performance gap to first-order (FO) optimizers such as Adam. We argue that this gap does not arise solely from the absence of explicit gradients: FO fine-tuning also benefits from informative low-rank optimization geometry, large-scale signal aggregation, and well-conditioned update directions. Motivated by this, we introduce StructZO, a structured Zeroth-Order optimization framework for memory-efficient LLM fine-tuning. StructZO performs large-query ZO estimation within an activation-induced informative subspace and applies spectral control to the resulting reduced-space update before mapping it back to the original parameters. This lets ZO aggregate useful directional signals in a compact, geometry-aware space while avoiding the activation and optimizer-state memory costs of backpropagation. We show theoretically that, when the induced subspace captures concentrated optimization-relevant directions, StructZO reduces the effective ZO estimation dimension from $mn$ to $mr$, with the remaining projection error governed by the spectral tail of the activation Gram matrix. Empirically, across OPT-series and Llama3.1-8B on diverse downstreamtasks, StructZO improves over the strongest existing ZO baselines by up to $8.7%$ relative on average and up to $26.9%$ relative on individual tasks, while remaining within $1.5%$ of FO-Adam on average. These results suggest that structured and spectrally controlled ZO updates can substantially narrow the gap between ZO and FO optimization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑