跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 机器学习

arXiv:2306.04637 (cs)
[提交于 2023年7月7日]

标题:Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection

作者:Yu Bai, Fan Chen, Huan Wang, Caiming Xiong, Song Mei
查看论文《Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Neural sequence models based on the transformer architecture have demonstrated remarkable \emph{in-context learning} (ICL) abilities, where they can perform new tasks when prompted with training and test examples, without any parameter update to the model. This work first provides a comprehensive statistical theory for transformers to perform ICL. Concretely, we show that transformers can implement a broad class of standard machine learning algorithms in context, such as least squares, ridge regression, Lasso, learning generalized linear models, and gradient descent on two-layer neural networks, with near-optimal predictive power on various in-context data distributions. Using an efficient implementation of in-context gradient descent as the underlying mechanism, our transformer constructions admit mild size bounds, and can be learned with polynomially many pretraining sequences. Building on these ``base'' ICL algorithms, intriguingly, we show that transformers can implement more complex ICL procedures involving \emph{in-context algorithm selection}, akin to what a statistician can do in real life -- A \emph{single} transformer can adaptively select different base ICL algorithms -- or even perform qualitatively different tasks -- on different input sequences, without any explicit prompting of the right algorithm or task. We both establish this in theory by explicit constructions, and also observe this phenomenon experimentally. In theory, we construct two general mechanisms for algorithm selection with concrete examples: pre-ICL testing, and post-ICL validation. As an example, we use the post-ICL validation mechanism to construct a transformer that can perform nearly Bayes-optimal ICL on a challenging task -- noisy linear models with mixed noise levels. Experimentally, we demonstrate the strong in-context algorithm selection capabilities of standard transformer architectures.
评论: V2 releases code
主题: 机器学习 (cs.LG); 人工智能 (cs.AI); 计算与语言 (cs.CL); 统计理论 (math.ST); 机器学习 (stat.ML); 统计理论 (stat.TH)
引用方式: arXiv:2306.04637 [cs.LG]
  (或者 arXiv:2306.04637v1 [cs.LG] 对于此版本)
  https://doi.org/10.48550/arXiv.2306.04637

提交历史

来自:Yu Bai
[v1] 2023年7月7日 星期五 00:00:00 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.LG
< 上一篇   |   下一篇 >
最新 | 近期 | 2023-07
切换浏览方式为:
cs
cs.AI
cs.CL
math.ST
stat.ML
stat.TH

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站