arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.15063cs.LGcs.AIcs.CL
收藏

预训练任务多样性与非贝叶斯上下文学习在回归任务中的涌现

Pretraining task diversity and the emergence of non-Bayesian in-context learning for regression

Stanford University(斯坦福大学)

Allan Raventós, Mansheej Paul, Feng Chen, Surya Ganguli

AI总结:

该研究通过实验发现预训练Transformer的上下文学习存在任务多样性阈值,超过阈值后模型能以非贝叶斯方式最优解决全新回归任务,揭示了任务多样性对ICL涌现的关键作用。

摘要:

预训练Transformer展现出卓越的上下文学习(ICL)能力:仅通过提示中提供的少量示例就能学习任务,且无需更新任何权重。这引出了一个根本性问题:ICL能否解决与预训练期间所见任务截然不同的全新任务?为探究这一问题,我们在改变预训练数据集中任务多样性的同时,检验了ICL在线性回归任务上的性能。我们通过实验证明,ICL的涌现存在一个任务多样性阈值。低于该阈值时,预训练Transformer无法解决未见过的回归任务,其表现反而类似于以非多样化预训练任务分布为先验的贝叶斯估计器。超过该阈值后,Transformer的性能显著优于该估计器;其行为与岭回归一致,对应于覆盖所有任务(包括预训练期间未见过的任务)的高斯先验。因此,当在任务多样性高于阈值的数据上预训练时,Transformer能够在上下文中最优地解决全新任务。重要的是,这一能力的关键在于它偏离了以预训练分布为先验的贝叶斯最优估计器。本研究还探讨了正则化、模型容量和任务结构的影响,并通过具体示例强调了任务多样性与数据规模、模型规模一同在ICL涌现中的关键作用。代码可在https://github.com/mansheej/icl-task-diversity获取。

英文摘要:

Pretrained transformers exhibit the remarkable ability of in-context learning (ICL): they can learn tasks from just a few examples provided in the prompt without updating any weights. This raises a foundational question: can ICL solve fundamentally $\textit{new}$ tasks that are very different from those seen during pretraining? To probe this question, we examine ICL's performance on linear regression while varying the diversity of tasks in the pretraining dataset. We empirically demonstrate a $\textit{task diversity threshold}$ for the emergence of ICL. Below this threshold, the pretrained transformer cannot solve unseen regression tasks, instead behaving like a Bayesian estimator with the $\textit{non-diverse pretraining task distribution}$ as the prior. Beyond this threshold, the transformer significantly outperforms this estimator; its behavior aligns with that of ridge regression, corresponding to a Gaussian prior over $\textit{all tasks}$, including those not seen during pretraining. Thus, when pretrained on data with task diversity greater than the threshold, transformers $\textit{can}$ optimally solve fundamentally new tasks in-context. Importantly, this capability hinges on it deviating from the Bayes optimal estimator with the pretraining distribution as the prior. This study also explores the effect of regularization, model capacity and task structure and underscores, in a concrete example, the critical role of task diversity, alongside data and model scale, in the emergence of ICL. Code is available at https://github.com/mansheej/icl-task-diversity.

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

↑