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.
KletterMix: Climbing Toward High-Quality German Pretraining Data - The Full Report
AI & ML Group, TU Darmstadt(人工智能与机器学习小组,德累斯顿技术大学);Lab1141;Lamarr Institute(拉马尔研究所);Fraunhofer IAIS(弗劳恩霍夫人工智能研究所);hessian.AI(海斯坦.AI);German Research Center for AI (DFKI)(德国人工智能研究中心(DFKI));Centre for Cognitive Science, TU Darmstadt(认知科学中心,德累斯顿技术大学)
Tracing the Representation Geometry of Language Models from Pretraining to Post-training
Computer Science, McGill University(麦吉尔大学计算机科学系);Mila - Quebec AI Institute(魁北克人工智能研究所);UC Berkeley(加州大学伯克利分校);G o o g l e , Paradigms of Intelligence Team(谷歌,智能范式团队);Mathematics and Statistics, Université de Montréal(蒙特利尔大学数学与统计学系);Neurology & Neurosurgery and Montreal Neurological Institute, McGill University(神经病学与神经外科及蒙特利尔神经研究所,麦吉尔大学);CIFAR Learning in Machines & Brains Program(CIFAR 机器与大脑学习计划)
Multilingual Language Model Pretraining using Machine-translated Data
Centre for Artificial Intelligence, University College London(伦敦大学学院人工智能中心);Together AI;Mila, McGill University(米拉-麦吉尔大学);Research and Development Center for Large Language Models, National Institute of Informatics(国立信息学研究所大语言模型研发中心)
What do Language Models Learn and When? The Implicit Curriculum Hypothesis
Language Technologies Institute, Carnegie Mellon University(卡内基梅隆大学语言技术研究所);Department of Computer Science, Data Science and AI Institute, Johns Hopkins University(约翰霍普金斯大学计算机科学系、数据科学与人工智能研究所);Khoury College of Computer Science, Northeastern University(东北大学Khoury计算机科学学院);Department of Computer Science, University of Southern California(南加州大学计算机科学系)
School of Computer Science and Technology, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院);School of Software Engineering, Huazhong University of Science and Technology(华中科技大学软件学院)
Context and Diversity Matter: The Emergence of In-Context Learning in World Models
Shenzhen Institute of Artificial Intelligence and Robotics for Society(深圳人工智能与机器人社会研究院);University of Science and Technology of China(中国科学技术大学);Anhui Province Key Laboratory of Intelligent Low-Carbon Information Technology and Equipment(安徽省智能低碳信息技术与设备重点实验室)
Asymptotic theory of in-context learning by linear attention
The John A. Paulson School of Engineering and Applied Sciences, Harvard University(哈佛大学约翰·A·保罗森工程与应用科学学院);Center for Brain Science, Harvard University(哈佛大学脑科学中心);Society of Fellows, Harvard University(哈佛大学 fellows 会);Department of Physics, Harvard University(哈佛大学物理系);Perimeter Institute for Theoretical Physics, Waterloo, ON N2L 2Y5, Canada(理论物理研究所,滑铁卢,加拿大);The Kempner Institute for the Study of Natural and Artificial Intelligence, 150 Western Avenue, Alston, MA 02134(自然与人工智能研究 institute)
TAFFY: A Task-Adaptive Tabular Foundation Model with In-Context Diversity
Carnegie Mellon University(卡内基梅隆大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Guangdong University of Technology(广东工业大学);University of California, San Diego(加利福尼亚大学圣迭戈分校)
From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformers
The University of Tokyo(东京大学);RIKEN AIP(理化学研究所AIP);Flatiron Institute(Flatiron研究所);CNRS(法国国家科学研究中心);Université Côte d’Azur(蔚蓝海岸大学);New York University(纽约大学)
Pretrain-Test Task Alignment Governs Generalization in In-Context Learning
John A. Paulson School of Engineering and Applied Sciences, Harvard University, Cambridge, MA, USA(哈佛大学约翰·A·保罗森工程与应用科学学院);Kempner Institute for the Study of Natural and Artificial Intelligence, Harvard University, Cambridge, MA, USA(哈佛大学自然与人工智能研究 institute);Society of Fellows, Harvard University, Cambridge, MA, USA(哈佛大学 fellows 社会);Center for Brain Science, Harvard University, Cambridge, MA, USA(哈佛大学脑科学中心)