Test-time training (TTT) enhances model performance by explicitly updating designated parameters prior to each prediction to adapt to the test data. While TTT has demonstrated considerable empirical success, its theoretical underpinnings remain limited, particularly for nonlinear models. In this paper, we investigate the combination of TTT with in-context learning (ICL), where the model is given a few examples from the target distribution at inference time. We analyze this framework in the setting of single-index models $y=σ_*(\langle β, \mathbf{x} \rangle)$, where the feature vector $β$ is drawn from a hidden low-dimensional subspace. For single-layer transformers trained with gradient-based algorithms and adopting TTT, we establish an upper bound on the prediction risk. Our theory reveals that TTT enables the single-layer transformers to adapt to both the feature vector $β$ and the link function $σ_*$, which vary across tasks. This creates a sharp contrast with ICL alone, which is theoretically difficult to adapt to shifts in the link function. Moreover, we provide the convergence rate with respect to the data length, showing the predictive error can be driven arbitrarily close to the noise level as the context size and the network width grow.


翻译:测试时训练通过在每个预测前显式更新指定参数以适应测试数据,从而提升模型性能。尽管TTT在实证中取得了显著成功,但其理论基础仍较为有限,尤其对于非线性模型。本文研究了TTT与情境学习的结合框架,其中模型在推理时从目标分布中获取少量示例。我们在单索引模型$y=σ_*(\langle β, \mathbf{x} \rangle)$设定下分析该框架,其中特征向量$β$从隐藏的低维子空间中采样。针对采用基于梯度算法训练并实施TTT的单层Transformer,我们建立了预测风险的上界。理论分析表明,TTT使单层Transformer能够适应跨任务变化的特征向量$β$与链接函数$σ_*$。这与单纯ICL形成鲜明对比——理论上ICL难以适应链接函数的偏移。此外,我们给出了关于数据长度的收敛速率,证明随着上下文规模与网络宽度的增加,预测误差可被驱动至任意接近噪声水平。

0
下载
关闭预览

相关内容

【CVPR2024】视觉-语言模型的高效测试时间调整
专知会员服务
20+阅读 · 2024年3月30日
「知识增强预训练语言模型」最新研究综述
专知
18+阅读 · 2022年11月18日
【学界】虚拟对抗训练:一种新颖的半监督学习正则化方法
GAN生成式对抗网络
10+阅读 · 2019年6月9日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Arxiv
0+阅读 · 2月5日
Arxiv
0+阅读 · 1月22日
VIP会员
相关VIP内容
【CVPR2024】视觉-语言模型的高效测试时间调整
专知会员服务
20+阅读 · 2024年3月30日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员