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

Hi-ZFO:通过重要性引导的张量选择实现层次化零阶和一阶LLM微调

Hi-ZFO: Hierarchical Zeroth- and First-Order LLM Fine-Tuning via Importance-Guided Tensor Selection

School of Intelligence Science and Technology, Peking University(智能科学与技术学院,北京大学);State Key Laboratory of General Artificial Intelligence(通用人工智能国家重点实验室)

Feihu Jin, Ying Tan

AI总结:

Hi-ZFO通过结合一阶和零阶优化,提升LLM微调的精度与探索能力,有效解决训练中的局部极小值问题。

摘要:

使用标准的一阶(FO)优化对大型语言模型(LLMs)进行微调往往会将训练推向尖锐且泛化能力差的极小值点。相反,零阶(ZO)方法在不依赖显式梯度的情况下提供更强的探索行为,但收敛速度较慢。更关键的是,我们的分析揭示,在生成任务中,庞大的输出和搜索空间显著放大了估计方差,使ZO方法变得嘈杂且低效。为了解决这些挑战,我们提出了Hi-ZFO(Hierarchical Zeroth- and First-Order optimization),一种混合框架,旨在协同FO梯度的精度与ZO估计的探索能力。Hi-ZFO通过层间重要性分析来适应性地划分模型,对关键层应用精确的FO更新,同时利用ZO优化处理不敏感的层。值得注意的是,Hi-ZFO中的ZO并非仅仅是内存节省的替代品;它是故意引入的“有益的随机性”来源,帮助模型逃离纯FO优化容易停滞的局部极小值点。在多样化的生成、数学和代码推理任务中得到验证,Hi-ZFO始终表现出优越的性能,同时显著减少了训练时间。这些结果展示了层次化混合优化在LLM微调中的有效性。

英文摘要:

Fine-tuning large language models (LLMs) using standard first-order (FO) optimization often drives training toward sharp, poorly generalizing minima. Conversely, zeroth-order (ZO) methods offer stronger exploratory behavior without relying on explicit gradients, yet suffer from slow convergence. More critically, our analysis reveals that in generative tasks, the vast output and search space significantly amplify estimation variance, rendering ZO methods both noisy and inefficient. To address these challenges, we propose \textbf{Hi-ZFO} (\textbf{Hi}erarchical \textbf{Z}eroth- and \textbf{F}irst-\textbf{O}rder optimization), a hybrid framework designed to synergize the precision of FO gradients with the exploratory capability of ZO estimation. Hi-ZFO adaptively partitions the model through layer-wise importance profiling, applying precise FO updates to critical layers while leveraging ZO optimization for less sensitive ones. Notably, ZO in Hi-ZFO is not merely a memory-saving surrogate; it is intentionally introduced as a source of "beneficial stochasticity" to help the model escape the local minima where pure FO optimization tends to stagnate. Validated across diverse generative, mathematical, and code reasoning tasks, Hi-ZFO consistently achieves superior performance while significantly reducing the training time. These results demonstrate the effectiveness of hierarchical hybrid optimization for LLM fine-tuning.

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

↑