arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2601.10058cs.LG
收藏

未标记数据可以证明性地增强Transformer的上下文学习

Unlabeled Data Can Provably Enhance In-Context Learning of Transformers

University of Virginia(弗吉尼亚大学)

Renpu Liu, Jing Yang

AI总结:

本文提出了一种增强ICL框架,通过结合标记和未标记数据,利用CoT提示使Transformer模拟EM算法,从而证明性地提升ICL性能。

摘要:

大型语言模型(LLMs)表现出令人印象深刻的上下文学习(ICL)能力,但其预测质量从根本上受到能够放入提示中的少量昂贵标记示例的限制。同时,存在大量且持续增长的未标记数据,可能与ICL任务密切相关。如何利用此类未标记数据来证明性地提高ICL性能,因此成为一项新兴的基本问题。在本工作中,我们提出了一种新的增强ICL框架,其中提示包括一小部分标记示例和一个未标记输入块。我们专注于多类线性分类设置,并证明,通过链式思维(CoT)提示,多层Transformer可以有效模拟期望最大化(EM)算法。这使Transformer能够隐式地从标记和未标记数据中提取有用信息,从而在ICL准确性上实现证明性改进。此外,我们还表明,此类Transformer可以通过教师强迫进行训练,其参数以线性速率收敛到期望的解。实验表明,增强的ICL框架在常规少样本ICL上表现一致更优,为我们的理论发现提供了实证支持。据我们所知,这是首次关于未标记数据对Transformer ICL性能影响的理论研究。

英文摘要:

Large language models (LLMs) exhibit impressive in-context learning (ICL) capabilities, yet the quality of their predictions is fundamentally limited by the few costly labeled demonstrations that can fit into a prompt. Meanwhile, there exist vast and continuously growing amounts of unlabeled data that may be closely related to the ICL task. How to utilize such unlabeled data to provably enhance the performance of ICL thus becomes an emerging fundamental question. In this work, we propose a novel augmented ICL framework, in which the prompt includes a small set of labeled examples alongside a block of unlabeled inputs. We focus on the multi-class linear classification setting and demonstrate that, with chain-of-thought (CoT) prompting, a multi-layer transformer can effectively emulate an expectation-maximization (EM) algorithm. This enables the transformer to implicitly extract useful information from both labeled and unlabeled data, leading to provable improvements in ICL accuracy. Moreover, we show that such a transformer can be trained via teacher forcing, with its parameters converging to the desired solution at a linear rate. Experiments demonstrate that the augmented ICL framework consistently outperforms conventional few-shot ICL, providing empirical support for our theoretical findings. To the best of our knowledge, this is the first theoretical study on the impact of unlabeled data on the ICL performance of transformers.

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

↑