arXiv:2601.10058cs.LG2026-01NeurIPS被引 3

利用无标签数据可显著提升Transformer的上下文学习能力

Unlabeled Data Can Provably Enhance In-Context Learning of Transformers

  • 在提示中加入少量有标签样本和大量无标签输入,增强模型推理
  • 理论证明该方法能提升分类准确率,且训练收敛速度线性加快
  • 首次从理论上揭示无标签数据对上下文学习的增益作用

大型语言模型具备强大的上下文学习(ICL)能力,但其预测质量受限于能放入提示中的少量昂贵有标签示例。与此同时,存在大量与任务相关的无标签数据。如何利用这些数据来可证明地提升ICL性能成为关键问题。本文提出一种增强型ICL框架:提示包含少量有标签示例和一个无标签输入块。针对多类线性分类任务,我们证明,在思维链(CoT)提示下,多层Transformer可有效模拟期望最大化(EM)算法,从而隐式提取有标签与无标签数据中的有用信息,实现可证明的ICL准确率提升。此外,该Transformer可通过教师强制法训练,参数以线性速率收敛至理想解。实验表明,该框架持续优于传统少样本ICL,为理论发现提供实证支持。据我们所知,这是首个关于无标签数据对Transformer ICL性能影响的理论研究。

原文摘要 · Abstract (English)

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.

上下文学习无监督学习Transformer理论分析

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