The transformer's emergent ability to perform in-context learning (ICL) has sparked a wide range of studies designed to understand its underlying mechanisms. Existing works often study how training task diversity, defined either as the number of ICL training task vectors or as the number of function classes from which the task vectors are drawn, shapes both the learning dynamics and generalization capabilities of ICL. While both definitions have uncovered many interesting phenomena, many observations under the latter definition remain theoretically unexplained. This paper presents a minimal analytical model under which these phenomena provably emerge from the properties of the training data. By modeling the training task vectors as a mixture of low-rank Gaussians, we show how training task diversity, defined by the number of non-overlapping columns between subspaces that parameterize the covariance matrices, improves both the generalization and optimization trajectory of ICL with linear attention. In particular, we show that our model can explain (i) why training with task diversity shortens the ICL plateau and (ii) why ICL appears to achieve out-of-distribution generalization. We conclude by empirically demonstrating how our results extend to nonlinear transformers and nonlinear function classes. Overall, our work presents a tractable framework to unify existing observations.


翻译:摘要:Transformer通过上下文学习(ICL)展现出的涌现能力引发了对其潜在机制的大量研究。现有工作通常研究训练任务多样性(定义为ICL训练任务向量的数量或提取任务向量的函数类别数量)如何塑造ICL的学习动态和泛化能力。尽管两种定义都揭示了许多有趣现象,但在后一种定义下观察到的许多现象仍缺乏理论解释。本文提出了一个最小解析模型,在此模型下这些现象可从训练数据的特性中严格推导得出。通过将训练任务向量建模为低秩高斯混合分布,我们展示了以参数化协方差矩阵的子空间之间非重叠列数量所定义的训练任务多样性,如何改进线性注意力ICL的泛化性能和优化轨迹。特别地,我们证明该模型能够解释:(i)为何任务多样性训练能缩短ICL的平稳期,(ii)为何ICL似乎实现了分布外泛化。最后通过实验证明了我们的结论可推广至非线性Transformer和非线性函数类别。总体上,本文提出了一个可处理的框架来统一解释现有观察结果。

0
下载
关闭预览

相关内容

【博士论文】基于多模态基础模型的上下文学习
专知会员服务
24+阅读 · 2025年12月17日
【阿姆斯特丹博士论文】缓解多任务学习中的偏差
专知会员服务
23+阅读 · 2024年11月1日
《多任务学习》最新综述论文,20页pdf
专知会员服务
127+阅读 · 2021年4月6日
【斯坦福大学】Gradient Surgery for Multi-Task Learning
专知会员服务
47+阅读 · 2020年1月23日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
一文读懂文本处理中的对抗训练
PaperWeekly
22+阅读 · 2019年6月5日
多模态多任务学习新论文
专知
46+阅读 · 2019年2月9日
半监督多任务学习:Semisupervised Multitask Learning
我爱读PAMI
18+阅读 · 2018年4月29日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
14+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
Arxiv
0+阅读 · 6月4日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
5+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关基金
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
14+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员