arXiv:2606.06814stat.MLcs.LG2026-06

揭示训练任务多样性如何通过低维子空间提升上下文学习性能

The Effect of Training Task Diversity on In-Context Learning through the Lens of Low-Dimensional Subspaces

论文配图:The Effect of Training Task Diversity on In-Context Learning through the Lens of Low-Dimensional Subspaces
图 1 · 摘自论文原文
  • 用低秩高斯混合模型模拟任务向量,定义任务多样性为子空间非重叠列数
  • 任务多样性越高,上下文学习的泛化能力越强,优化路径更优
  • 理论可解释模型外泛化现象,适用于线性与非线性变换器

Transformer 的上下文学习(ICL)能力引发了大量研究,试图揭示其内在机制。现有工作常从任务向量数量或函数类别数量来定义训练任务多样性,但后者许多现象缺乏理论解释。本文提出一个最小化分析模型,将训练任务向量建模为低秩高斯混合分布,证明了任务多样性(由协方差矩阵参数化子空间间的非重叠列数决定)能显著提升线性注意力下的 ICL 泛化能力和优化轨迹。具体而言,模型可严格解释:(i) 任务多样性缩短 ICL 平台期;(ii) ICL 实现分布外泛化。最后通过实验证明该结论可推广至非线性 Transformer 和非线性函数类。整体工作提供了一个统一解释现有现象的可解析框架。

原文摘要 · Abstract (English)

The transformer's emergent ability to perform in-context learning (ICL) has sparked a wide range of studies designed to understand its underlying mechanisms. Existing works often study how training task diversity, defined either as the number of ICL training task vectors or as the number of function classes from which the task vectors are drawn, shapes both the learning dynamics and generalization capabilities of ICL. While both definitions have uncovered many interesting phenomena, many observations under the latter definition remain theoretically unexplained. This paper presents a minimal analytical model under which these phenomena provably emerge from the properties of the training data. By modeling the training task vectors as a mixture of low-rank Gaussians, we show how training task diversity, defined by the number of non-overlapping columns between subspaces that parameterize the covariance matrices, improves both the generalization and optimization trajectory of ICL with linear attention. In particular, we show that our model can explain (i) why training with task diversity shortens the ICL plateau and (ii) why ICL appears to achieve out-of-distribution generalization. We conclude by empirically demonstrating how our results extend to nonlinear transformers and nonlinear function classes. Overall, our work presents a tractable framework to unify existing observations.

上下文学习低维子空间理论分析Transformer

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。