arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2211.03831cs.AI
收藏

多头适配器路由用于跨任务泛化

Multi-Head Adapter Routing for Cross-Task Generalization

University of Edinburgh(爱丁堡大学);University of Copenhagen(哥本哈根大学);Microsoft Research(微软研究院);McGill University(麦吉尔大学);MILA(米拉研究所);Université de Montréal(蒙特利尔大学)

Lucas Caccia, Edoardo Ponti, Zhan Su, Matheus Pereira, Nicolas Le Roux, Alessandro Sordoni

AI总结:

本文研究跨任务泛化中的适配器路由,提出多头路由MHR及其变体,发现路由主要在多任务预训练中起作用,并推出MHR-μ方法,实现高效单适配器微调和零样本迁移,准确率提升达3%。

摘要:

参数高效微调(PEFT)用于跨任务泛化,包括在多任务训练集上预训练适配器,然后对测试任务进行少样本适配。Polytropon [Ponti等人,2023]($\texttt{Poly}$)联合学习一个适配器库和一个路由函数,该函数在预训练和少样本适配期间为每个任务选择(可变大小的)适配器子集。在本文中,我们研究了适配器路由在其成功中所起的作用,并基于我们的发现设计了新的变体。首先,我们基于更细粒度的路由提供更强表达力的直觉。因此,我们提出了$\texttt{MHR}$(多头路由),它组合适配器参数的子集,并在可比较的参数预算下优于$\texttt{Poly}$;通过仅微调路由函数而不微调适配器($\texttt{MHR}$-$z$),我们以极端的参数效率实现了有竞争力的性能。其次,我们发现$\texttt{Poly}$/$\texttt{MHR}$的性能是多任务优化更好的结果,而不是像先前假设的那样,是促进适配器重组和局部适应的模块化归纳偏置。事实上,我们发现$\texttt{MHR}$在训练任务之间表现出高梯度对齐。我们发现路由在多任务预训练期间最有益,而不是在少样本适配期间,并提出了$\texttt{MHR}$-$\mu$,它丢弃路由并微调每个下游任务上预训练适配器的平均值。这确立了$\texttt{MHR}$-$\mu$作为单适配器微调的有效方法。我们还表明,$\texttt{MHR}$-$\mu$可以通过在多任务训练集上额外训练几步预训练适配器的平均值,用作有效的零样本迁移方法:与基线相比,这在绝对准确率上带来了高达3%的提升。

英文摘要:

Parameter-efficient fine-tuning (PEFT) for cross-task generalization consists in pre-training adapters on a multi-task training set before few-shot adaptation to test tasks. Polytropon [Ponti et al., 2023] ($\texttt{Poly}$) jointly learns an inventory of adapters and a routing function that selects a (variable-size) subset of adapters for each task during both pre-training and few-shot adaptation. In this paper, we investigate the role that adapter routing plays in its success and design new variants based on our findings. First, we build on the intuition that finer-grained routing provides more expressivity. Hence, we propose $\texttt{MHR}$ (Multi-Head Routing) which combines subsets of adapter parameters and outperforms $\texttt{Poly}$ under a comparable parameter budget; by only fine-tuning the routing function and not the adapters ($\texttt{MHR}$-$z$) we achieve competitive performance with extreme parameter efficiency. Second, we find that $\texttt{Poly}$/$\texttt{MHR}$ performance is a result of better multi-task optimization, rather than modular inductive biases that facilitate adapter recombination and local adaptation, as previously hypothesized. In fact, we find that $\texttt{MHR}$ exhibits high gradient alignment between training tasks. We find that routing is most beneficial during multi-task pre-training rather than during few-shot adaptation and propose $\texttt{MHR}$-$μ$, which discards routing and fine-tunes the average of the pre-trained adapters on each downstream tasks. This establishes $\texttt{MHR}$-$μ$ as an effective method for single-adapter fine-tuning. We also show that $\texttt{MHR}$-$μ$ can be used as an effective zero-shot transfer method by training the average of the pre-trained adapters for a few additional steps on the multi-task training set: this yields gains up to 3% on absolute accuracy w.r.t. the baselines.

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

↑