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

线性回归混合模型的上下文学习:存在性、泛化性与训练动态

In-context Learning for Mixture of Linear Regressions: Existence, Generalization and Training Dynamics

University of California, Davis(加州大学戴维斯分校)

Yanhao Jin, Krishnakumar Balasubramanian, Lifeng Lai

AI总结:

本文从理论上证明了Transformer能对线性回归混合模型进行上下文学习,给出预测误差和超额风险界,并分析了梯度流训练可收敛到全局最优,仿真显示其表现优于期望最大化等基线方法。

摘要:

我们研究了Transformer在$d$维线性回归混合模型上的上下文学习能力,并对其存在性、泛化界和训练动态提供了理论见解。具体而言,我们证明存在一个Transformer,能够在高信噪比(SNR)条件下以高概率实现$\mathcal{O}(\sqrt{d/n})$量级的预测误差,其中$n$表示训练提示的长度。此外,针对两个混合成分的情形,我们推导出$\mathcal{O}(L/\sqrt{B})$量级的上下文超额风险界,其中$B$表示训练提示的数量,$L$表示注意力层数。$L$对SNR的依赖关系被明确刻画,在低SNR和高SNR设置下有所不同。我们进一步分析了具有单层线性自注意力的Transformer的训练动态,证明在参数初始化适当的情况下,对总体均方损失的梯度流优化会收敛到全局最优。大量仿真实验表明,Transformer在该任务上表现良好,并可能优于其他基线方法,例如期望最大化算法。

英文摘要:

We investigate the in-context learning capabilities of transformers for the $d$-dimensional mixture of linear regression model, providing theoretical insights into their existence, generalization bounds, and training dynamics. Specifically, we prove that there exists a transformer capable of achieving a prediction error of order $\mathcal{O}(\sqrt{d/n})$ with high probability, where $n$ represents the training prompt size in the high signal-to-noise ratio (SNR) regime. Moreover, we derive in-context excess risk bounds of order $\mathcal{O}(L/\sqrt{B})$ for the case of two mixtures, where $B$ denotes the number of training prompts, and $L$ represents the number of attention layers. The dependence of $L$ on the SNR is explicitly characterized, differing between low and high SNR settings. We further analyze the training dynamics of transformers with single linear self-attention layers, demonstrating that, with appropriately initialized parameters, gradient flow optimization over the population mean square loss converges to a global optimum. Extensive simulations suggest that transformers perform well on this task, potentially outperforming other baselines, such as the Expectation-Maximization algorithm.

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

↑