arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.02544cs.LGstat.ML
收藏

预训练Transformer在上下文中高效学习低维目标函数

Pretrained transformer efficiently learns low-dimensional target functions in-context

University of California, Berkeley(加州大学伯克利分校);RIKEN AIP(理化学研究所人工智能项目);University of Tokyo(东京大学);New York University(纽约大学);Flatiron Institute(弗拉蒂伦研究所)

Kazusato Oko, Yujin Song, Taiji Suzuki, Denny Wu

AI总结:

本文证明预训练Transformer通过非线性MLP层,在单指标函数类上实现样本高效的上下文学习,提示长度仅取决于目标函数的低维结构,优于直接学习算法。

摘要:

Transformer能够从示例演示中高效地进行上下文学习。现有的大多数理论分析研究了Transformer对线性函数类的上下文学习(ICL)能力,其中通常表明预训练损失的最小化器在最小二乘目标上执行一步梯度下降。然而,这种简化的线性设置可以说并不能展示ICL的统计效率,因为预训练Transformer在测试提示上并不优于直接求解线性回归。在本文中,我们通过带有非线性MLP层的Transformer研究非线性函数类的ICL:给定一类\textit{单指标}目标函数$f_*(\boldsymbol{x}) = σ_*(\langle\boldsymbol{x},\boldsymbol\beta\rangle)$,其中指标特征$\boldsymbol\beta\in\mathbb{R}^d$从$r$维子空间中抽取,我们证明通过梯度下降优化的非线性Transformer(其预训练样本复杂度取决于链接函数$σ_*$的\textit{信息指数})能够在上下文中学习$f_*$,且提示长度仅取决于目标函数分布的维度$r$;相比之下,任何在测试提示上直接学习$f_*$的算法都会产生随环境维度$d$缩放的统计复杂度。我们的结果突出了预训练Transformer对函数类低维结构的适应性,这使得样本高效的ICL能够优于仅能访问上下文数据的估计器。

英文摘要:

Transformers can efficiently learn in-context from example demonstrations. Most existing theoretical analyses studied the in-context learning (ICL) ability of transformers for linear function classes, where it is typically shown that the minimizer of the pretraining loss implements one gradient descent step on the least squares objective. However, this simplified linear setting arguably does not demonstrate the statistical efficiency of ICL, since the pretrained transformer does not outperform directly solving linear regression on the test prompt. In this paper, we study ICL of a nonlinear function class via transformer with nonlinear MLP layer: given a class of \textit{single-index} target functions $f_*(\boldsymbol{x}) = σ_*(\langle\boldsymbol{x},\boldsymbolβ\rangle)$, where the index features $\boldsymbolβ\in\mathbb{R}^d$ are drawn from a $r$-dimensional subspace, we show that a nonlinear transformer optimized by gradient descent (with a pretraining sample complexity that depends on the \textit{information exponent} of the link functions $σ_*$) learns $f_*$ in-context with a prompt length that only depends on the dimension of the distribution of target functions $r$; in contrast, any algorithm that directly learns $f_*$ on test prompt yields a statistical complexity that scales with the ambient dimension $d$. Our result highlights the adaptivity of the pretrained transformer to low-dimensional structures of the function class, which enables sample-efficient ICL that outperforms estimators that only have access to the in-context data.

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

↑