arXiv:2409.17137cs.LGcs.CV2024-09NeurIPS被引 23

提出PACE方法,让高效微调模型既性能好又泛化强。

PACE: Marrying generalization in PArameter-efficient fine-tuning with Consistency rEgularization

  • 用乘性噪声扰动适配器特征,保持输入不变时输出一致
  • 在多个视觉和文本任务上超越现有高效微调方法
  • 适合资源受限下追求泛化能力的模型优化场景

参数高效微调(PEFT)能有效将预训练变换器适配到下游任务,但往往以牺牲模型泛化能力为代价。本文从理论上揭示:训练期间权重梯度范数越小、数据集越大,模型泛化能力越强。受此启发,我们提出通过减小梯度范数提升泛化,并使微调模型与预训练模型对齐以保留大规模预训练知识。然而,直接对齐无法保证梯度减小,可能引发梯度爆炸。为此,我们提出PACE,融合参数高效微调的泛化性与一致性正则化。通过在适配器学习的特征上加入乘性噪声,并确保同一样本在不同扰动下的输出保持一致。理论分析表明,PACE不仅能隐式正则化梯度以增强泛化,还能隐式对齐微调与预训练模型以保留知识。实验验证了理论,PACE在视觉适应任务(VTAB-1k、FGVC、少样本学习、域自适应)中优于现有PEFT方法,同时在文本分类(GLUE)和数学推理(GSM-8K)中改进了LoRA。代码已开源。

原文摘要 · Abstract (English)

Parameter-Efficient Fine-Tuning (PEFT) effectively adapts pre-trained transformers to downstream tasks. However, the optimization of tasks performance often comes at the cost of generalizability in fine-tuned models. To address this issue, we theoretically connect smaller weight gradient norms during training and larger datasets to the improvements in model generalization. Motivated by this connection, we propose reducing gradient norms for enhanced generalization and aligning fine-tuned model with the pre-trained counterpart to retain knowledge from large-scale pre-training data. Yet, naive alignment does not guarantee gradient reduction and can potentially cause gradient explosion, complicating efforts to manage gradients. To address such an issue, we propose PACE, marrying generalization of PArameter-efficient fine-tuning with Consistency rEgularization. We perturb features learned from the adapter with the multiplicative noise and ensure the fine-tuned model remains consistent for same sample under different perturbations. Theoretical analysis shows that PACE not only implicitly regularizes gradients for enhanced generalization, but also implicitly aligns the fine-tuned and pre-trained models to retain knowledge. Experimental evidence supports our theories. PACE surpasses existing PEFT methods in visual adaptation tasks (VTAB-1k, FGVC, few-shot learning, domain adaptation) showcasing its potential for resource-efficient fine-tuning. It also improves LoRA in text classification (GLUE) and mathematical reasoning (GSM-8K). The code is available at https://github.com/MaxwellYaoNi/PACE

高效微调泛化能力一致性正则模型对齐

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