通过双层竞争机制与核化稀疏微调,实现高效低内存视觉模型适配。
Kernelized Sparse Fine-Tuning with Bi-level Parameter Competition for Vision Models
- 引入核化低秩分解,提升参数更新灵活性。
- 双层稀疏分配机制实现端到端任务相关权重定位。
- 在多种视觉任务上达成最佳性能,内存降低超30%。
参数高效微调(PEFT)旨在将预训练视觉模型适配至下游任务。现有方法多采用两阶段范式:首先利用梯度信息定位任务相关权重,但忽略微调过程中的参数调整;其次仅对定位权重应用稀疏掩码更新,导致优化器需存储全部权重矩阵,内存开销大。本文提出单阶段方法SNELLA,通过将权重矩阵与由两个低秩可学习矩阵合并的稀疏矩阵相加,实现选择性更新,降低内存占用。扩展低秩分解并引入非线性核函数,提升合并后矩阵的秩,缓解权重更新间的依赖性,增强任务适应能力。同时提出自适应双层稀疏分配机制,基于重要性得分在层间与层内激励权重竞争,实现端到端优化。在分类、分割与生成任务上使用多种预训练视觉模型进行实验,结果表明SNELLA在保持低内存消耗的同时达到最优性能。尤其在FGVC基准上,相比SPT-LoRA提升1.8%(91.9% vs. 90.1% Top-1准确率),在86M至632M参数规模模型上内存减少31.1%-39.9%。源代码已开源于https://github.com/ssfgunner/SNELL。
原文摘要 · Abstract (English)
Parameter-efficient fine-tuning (PEFT) aims to adapt pre-trained vision models to downstream tasks. Among PEFT paradigms, sparse tuning achieves remarkable performance by adjusting only the weights most relevant to downstream tasks, rather than densely tuning the entire weight matrix. Current methods follow a two-stage paradigm. First, it locates task-relevant weights by gradient information, which overlooks the parameter adjustments during fine-tuning and limits the performance. Second, it updates only the located weights by applying a sparse mask to the gradient of the weight matrix, which results in high memory usage due to the storage of all weight matrices in the optimizer. In this paper, we propose a one-stage method named SNELLA to overcome the above limitations. For memory usage, SNELLA selectively updates the weight matrix by adding it to another sparse matrix that is merged by two low-rank learnable matrices. We extend the low-rank decomposition by introducing nonlinear kernel functions, thereby increasing the rank of the resulting merged matrix to prevent the interdependency among weight updates, enabling better adaptation to downstream tasks. For locating task-relevant weights, we propose an adaptive bi-level sparsity allocation mechanism that encourages weights to compete across and inside layers based on their importance scores in an end-to-end manner. Extensive experiments are conducted on classification, segmentation, and generation tasks using different pre-trained vision models. The results show that SNELLA achieves SOTA performance with low memory usage. Notably, SNELLA obtains 1.8% (91.9% v.s. 90.1%) higher Top-1 accuracy on the FGVC benchmark compared to SPT-LoRA. Compared to previous methods, SNELLA achieves a memory reduction of 31.1%-39.9% across models with parameter scales from 86M to 632M. Our source codes are available at https://github.com/ssfgunner/SNELL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。