arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.04081cs.LGstat.ML
收藏

一种用于上下文学习的因果和掩码语言模型统一框架

A Unified Framework for In-Context Learning with Causal and Masked Language Models

Beijing Normal University at Zhuhai(北京师范大学珠海分校);Hunan University(湖南大学)

Chenrui Liu, Chuanlong Xie, Falong Tan, Yicheng Zeng, Lixing Zhu

AI总结:

研究上下文学习,提出统计学习框架,将自回归和掩码预训练目标置于共同风险分析中,在特定条件下得出推理时MASK和自回归目标的同阶上界等成果,做了实验验证。

摘要:

上下文学习(ICL)已成为预训练语言模型的核心能力,但其理论分析主要集中在自回归语言模型。掩码语言模型在ICL中的作用尚不清楚。我们开发了一个统计学习框架,将上下文示例表示为它们的经验分布,并将预测建模为上下文和查询的函数。在特定条件下,我们将预训练与推理时的k-shot额外风险联系起来,还研究了任务分布转移,实验表明掩码对编码器(MPE)性能可媲美GPT-2风格的因果变换器。

英文摘要:

In-context learning (ICL) has emerged as a central capability of pretrained language models, yet its theoretical analysis has focused primarily on causal language models trained by left-to-right autoregressive prediction, such as GPT-style models. Masked language models instead recover masked tokens from bidirectional context, and their role in ICL remains less understood. We develop a statistical learning framework that represents the context examples by their empirical measure and models prediction as a function of the context and the query. This formulation places autoregressive and masked pretraining objectives within a common excess-risk analysis. Under Wasserstein-type regularity conditions, we relate pretraining with T tasks and N samples per task to k-shot excess risk at inference, obtaining same-order upper bounds for masked and autoregressive objectives. We also study task-distribution shift, where pretraining tasks are sampled from P and inference tasks from Q; the resulting bound contains an additional term controlled by the lifted Wasserstein distance between P and Q. The bounds further imply an order-optimal allocation under a fixed pretraining data budget and refined rates under intrinsic low-dimensional structure. Experiments on controlled function-learning tasks show that the Masked Pair Encoder (MPE) can achieve performance comparable to GPT-2-style causal Transformers, suggesting that ICL behavior is not specific to causal language models.

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

↑