arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2301.07067cs.LGcs.CLstat.ML
收藏

作为算法的Transformers:上下文学习中的泛化和稳定性

Transformers as Algorithms: Generalization and Stability in In-context Learning

University of California, Riverside(加州大学河滨分校);University of Wisconsin-Madison(威斯康星大学麦迪逊分校)

Yingcong Li, M. Emrullah Ildiz, Dimitris Papailiopoulos, Samet Oymak

摘要:

上下文学习(ICL)是一种提示类型,其中Transformer模型对(输入,输出)示例序列进行操作,并在运行中执行推理。在这项工作中,我们正式的上下上下文学习作为一个算法学习的问题,其中一个Transformer模型隐式地构造一个假设函数在推理时间。我们首先通过多任务学习的镜头探索这种抽象的统计方面:当输入提示是(1)i.i.d.序列时,我们获得了ICL的泛化界限。(输入,标签)对或(2)从动力系统产生的轨迹。我们分析的关键是将超额风险与由Transformer实现的算法的稳定性相关联。当Transformer/attention结构可证明地服从稳定性条件时,我们表征,并提供经验验证。对于不可见任务的泛化,我们识别出一种归纳偏差现象,其中迁移学习风险以高度可预测的方式由任务复杂性和MTL任务的数量决定。最后,我们提供了数值评估,(1)证明Transformers确实可以实现接近最优算法的经典回归问题的独立同分布。和动态数据,(2)提供关于稳定性的见解,(3)验证我们的理论预测。

英文摘要:

In-context learning (ICL) is a type of prompting where a transformer model operates on a sequence of (input, output) examples and performs inference on-the-fly. In this work, we formalize in-context learning as an algorithm learning problem where a transformer model implicitly constructs a hypothesis function at inference-time. We first explore the statistical aspects of this abstraction through the lens of multitask learning: We obtain generalization bounds for ICL when the input prompt is (1) a sequence of i.i.d. (input, label) pairs or (2) a trajectory arising from a dynamical system. The crux of our analysis is relating the excess risk to the stability of the algorithm implemented by the transformer. We characterize when transformer/attention architecture provably obeys the stability condition and also provide empirical verification. For generalization on unseen tasks, we identify an inductive bias phenomenon in which the transfer learning risk is governed by the task complexity and the number of MTL tasks in a highly predictable manner. Finally, we provide numerical evaluations that (1) demonstrate transformers can indeed implement near-optimal algorithms on classical regression problems with i.i.d. and dynamic data, (2) provide insights on stability, and (3) verify our theoretical predictions.

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

↑