arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.12186stat.MLcs.LG
收藏

Transformer 是极小极大最优的非参数上下文学习器

Transformers are Minimax Optimal Nonparametric In-Context Learners

University of Tokyo(东京大学);Center for Advanced Intelligence Project, RIKEN(理化学研究所先进智能项目中心)

Juno Kim, Tai Nakamaki, Taiji Suzuki

AI总结:

本文从统计学习理论证明,含线性注意力层的 Transformer 在非参数回归预训练后可达到甚至改进极小极大最优 ICL 风险,并给出任务数与示例数的信息论下界。

摘要:

大型语言模型的上下文学习(ICL)已被证明是一种仅需少量演示示例即可学习新任务的惊人有效方法。本文从统计学习理论的视角研究 ICL 的有效性。我们针对由深度神经网络和一个线性注意力层组成的 Transformer,建立了近似误差与泛化误差界;该模型在从一般函数空间(包括 Besov 空间和分段 γ-光滑类)采样的非参数回归任务上进行预训练。我们表明,经过充分训练的 Transformer 能够通过在预训练期间编码最相关的基表示,在上下文中达到甚至改进极小极大最优估计风险。我们的分析扩展到高维或序列数据,并区分了预训练泛化间隙与上下文泛化间隙。此外,我们针对元学习器建立了关于任务数量和上下文示例数量的信息论下界。这些发现揭示了任务多样性与表示学习对 ICL 的作用。

英文摘要:

In-context learning (ICL) of large language models has proven to be a surprisingly effective method of learning a new task from only a few demonstrative examples. In this paper, we study the efficacy of ICL from the viewpoint of statistical learning theory. We develop approximation and generalization error bounds for a transformer composed of a deep neural network and one linear attention layer, pretrained on nonparametric regression tasks sampled from general function spaces including the Besov space and piecewise $γ$-smooth class. We show that sufficiently trained transformers can achieve -- and even improve upon -- the minimax optimal estimation risk in context by encoding the most relevant basis representations during pretraining. Our analysis extends to high-dimensional or sequential data and distinguishes the \emph{pretraining} and \emph{in-context} generalization gaps. Furthermore, we establish information-theoretic lower bounds for meta-learners w.r.t. both the number of tasks and in-context examples. These findings shed light on the roles of task diversity and representation learning for ICL.

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

↑