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}$-$\mu$, which discards routing and fine-tunes the average of the pre-trained adapters on each downstream tasks. This establishes $\texttt{MHR}$-$\mu$ as an effective method for single-adapter fine-tuning. We also show that $\texttt{MHR}$-$\mu$ 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.
翻译:参数高效微调(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% 的提升。