This paper develops a finite-sample statistical theory for in-context learning (ICL), analyzed within a meta-learning framework that accommodates mixtures of diverse task types. We introduce a principled risk decomposition that separates the total ICL risk into two orthogonal components: Bayes Gap and Posterior Variance. The Bayes Gap quantifies how well the trained model approximates the Bayes-optimal in-context predictor. For a uniform-attention Transformer, we derive a non-asymptotic upper bound on this gap, which explicitly clarifies the dependence on the number of pretraining prompts and their context length. The Posterior Variance is a model-independent risk representing the intrinsic task uncertainty. Our key finding is that this term is determined solely by the difficulty of the true underlying task, while the uncertainty arising from the task mixture vanishes exponentially fast with only a few in-context examples. Together, these results provide a unified view of ICL: the Transformer selects the optimal meta-algorithm during pretraining and rapidly converges to the optimal algorithm for the true task at test time.


翻译:本文针对上下文学习(ICL)建立了一套有限样本统计理论,在可容纳异质任务类型混合的元学习框架下进行分析。我们引入一种原理性风险分解方法,将总体ICL风险分解为两个正交分量:贝叶斯差距与后验方差。其中贝叶斯差距量化了训练模型逼近贝叶斯最优上下文预测器的程度。针对均匀注意力Transformer,我们推导出该差距的非渐近上界,明确揭示了其与预训练提示数量及上下文长度之间的依赖关系。后验方差则是一个表示任务固有不确定性的模型无关风险。我们的核心发现是:该分量完全由真实底层任务的难度决定,而任务混合带来的不确定性仅需少量上下文样本即可指数级衰减。综合而言,这些结果为ICL提供了统一视角:Transformer在预训练阶段选择最优元算法,并在测试阶段快速收敛至真实任务的最优算法。

0
下载
关闭预览

相关内容

【经典书】贝叶斯强化学习概述,147页pdf
专知会员服务
115+阅读 · 2021年11月21日
【资源】元学习论文分类列表推荐
专知
19+阅读 · 2019年12月3日
元学习(Meta Learning)最全论文、视频、书籍资源整理
深度学习与NLP
22+阅读 · 2019年6月20日
【深度】让DL可解释?这一份66页贝叶斯深度学习教程告诉你
GAN生成式对抗网络
15+阅读 · 2018年8月11日
贝叶斯机器学习前沿进展
机器学习研究会
21+阅读 · 2018年1月21日
国家自然科学基金
16+阅读 · 2017年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Arxiv
0+阅读 · 6月4日
Arxiv
0+阅读 · 5月7日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
学习数据的几何:形状空间分析数学综述
专知会员服务
10+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
12+阅读 · 6月17日
相关VIP内容
【经典书】贝叶斯强化学习概述,147页pdf
专知会员服务
115+阅读 · 2021年11月21日
相关基金
国家自然科学基金
16+阅读 · 2017年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员