[论文解读] Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning
本论文表明,少样本参数高效微调(PEFT),具体是一种基于 IA3 的新方法并结合 T-Few 配方,在准确性上超越上下文学习(ICL),同时大幅降低计算、内存和存储成本;并在 RAFT 上实现超越人类的性能。
Few-shot in-context learning (ICL) enables pre-trained language models to perform a previously-unseen task without any gradient-based training by feeding a small number of training examples as part of the input. ICL incurs substantial computational, memory, and storage costs because it involves processing all of the training examples every time a prediction is made. Parameter-efficient fine-tuning (PEFT) (e.g. adapter modules, prompt tuning, sparse update methods, etc.) offers an alternative paradigm where a small set of parameters are trained to enable a model to perform the new task. In this paper, we rigorously compare few-shot ICL and PEFT and demonstrate that the latter offers better accuracy as well as dramatically lower computational costs. Along the way, we introduce a new PEFT method called (IA)$^3$ that scales activations by learned vectors, attaining stronger performance while only introducing a relatively tiny amount of new parameters. We also propose a simple recipe based on the T0 model called T-Few that can be applied to new tasks without task-specific tuning or modifications. We validate the effectiveness of T-Few on completely unseen tasks by applying it to the RAFT benchmark, attaining super-human performance for the first time and outperforming the state-of-the-art by 6% absolute. All of the code used in our experiments is publicly available.
研究动机与目标
- 为将预训练语言模型适应新任务、且可用极少标注数据的情况下,提供对 ICL 的数据效率替代方案。
- 提出一个具体的基于 PEFT 的配方,能够扩展到混合任务推理并且仅需极少的参数更新。
- 通过增加额外的损失项,提升少样本性能,使训练目标与基于排名的评估更好对齐。
提出的方法
- 以 T0-3B 作为基模型,应用一种新型 PEFT 方法(IA)3,对选定激活进行乘法调制。
- 引入三个可学习向量(l_k、l_v、l_ff),在逐层的方式中重新缩放键、值和前馈激活。
- 使用一个联合目标 L = L_LM + L_UL + L_LN 进行训练,以提高正确选项的排序,同时抑制错误选项。
- 在用于 T0 的多任务混合数据上对 IA3 参数进行预训练,然后在下游任务上进行微调。
- 应用固定提示模板(P3),并使用 Adafactor 进行 1,000 步训练,对各任务采用统一的配方,而不进行逐任务超参数调优。
实验结果
研究问题
- RQ1在极少样本设置下,带有轻量级、基于激活的适应(IA3)的 PEFT 是否能够达到或超过全模型微调的效果?
- RQ2T-Few 配方是否能在未见任务上泛化,实现小标注数据集的混合任务推理?
- RQ3额外的损失项(非似然性和长度归一化)如何影响少样本学习的性能?
- RQ4在跨任务的情况下,T-Few 与上下文学习相比,计算、内存和存储成本有何差异?
- RQ5该方法在 RAFT 等真实世界少样本基准测试上是否有效?
主要发现
- T-Few 在 Held-out T0 任务上持续超越强基线 ICL,包括 GPT-3 变体。
- T-Few 在 held-out 任务上的准确率为 72.4%,对比 GPT-3 175B 的 66.6% 和 T0 的 66.9%。
- 在 RAFT 上,T-Few 达到 75.8% 的准确率,超过人类基线 73.5%。
- IA3 是在所测试的 PEFT 方法中唯一在更新参数显著更少(最多低至 10,000×)的情况下,准确性仍然超过全模型微调的方法。
- 训练 T-Few(IA3)在磁盘上的额外占用约 4.2 MB,而推理成本远低于 ICL(GPT-3 175B 在 41-shot 情境下的 FLOPs 远超 1e15)。
- 在任务特定微调前对 IA3 参数进行预训练可提高准确性(从 64.6 提升到 65.8)。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。