arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.00053cs.CLcs.LG
收藏

双重过程学习:通过权重遗忘控制上下文与权重内策略的使用

Dual Process Learning: Controlling Use of In-Context vs. In-Weights Strategies with Weight Forgetting

Brown University(布朗大学)

Suraj Anand, Michael A. Lepori, Jack Merullo, Ellie Pavlick

AI总结:

本文研究了语言模型对新颖词元的结构性上下文学习能力,发现其在预训练早期迅速消失,并基于主动遗忘方法提出预训练与微调策略,成功实现上下文与权重内学习共存的双重过程策略。

摘要:

语言模型具备执行上下文学习(ICL)的能力,使其能够基于上下文灵活调整行为。这与权重内学习(IWL)形成对比,后者是在对数据进行迭代观察后,将记忆信息编码在模型参数中。理想的模型应该能够灵活运用这两种能力。尽管语言模型表面上具备上下文学习能力,但已知它们在面对未见或极少见的词元时会遇到困难(Land & Bartolo, 2024)。因此,我们研究了$\ extbf{结构性上下文学习}$,我们将其定义为模型对任意新颖词元执行上下文学习的能力——之所以这样称呼,是因为模型必须基于例如句子结构或任务结构进行泛化,而不是基于词元嵌入中编码的内容。我们使用玩具模型、掩码语言模型和自回归语言模型,在合成和自然任务上研究了结构性上下文算法。我们发现,结构性ICL在语言模型预训练早期出现后便迅速消失。虽然已有研究表明ICL在训练过程中会减弱(Singh et al., 2023),但我们发现先前的工作并未考虑结构性ICL。基于Chen et al. (2024)的主动遗忘方法,我们引入了预训练和微调方法,可以调节对结构性ICL和IWL的偏好。重要的是,这使我们能够引发一种$\ extit{双重过程策略}$,其中上下文和权重内的解决方案在单一模型中共存。

英文摘要:

Language models have the ability to perform in-context learning (ICL), allowing them to flexibly adapt their behavior based on context. This contrasts with in-weights learning (IWL), where memorized information is encoded in model parameters after iterated observations of data. An ideal model should be able to flexibly deploy both of these abilities. Despite their apparent ability to learn in-context, language models are known to struggle when faced with unseen or rarely seen tokens (Land & Bartolo, 2024). Hence, we study $\textbf{structural in-context learning}$, which we define as the ability of a model to execute in-context learning on arbitrary novel tokens -- so called because the model must generalize on the basis of e.g. sentence structure or task structure, rather than content encoded in token embeddings. We study structural in-context algorithms on both synthetic and naturalistic tasks using toy models, masked language models, and autoregressive language models. We find that structural ICL appears before quickly disappearing early in LM pretraining. While it has been shown that ICL can diminish during training (Singh et al., 2023), we find that prior work does not account for structural ICL. Building on Chen et al. (2024) 's active forgetting method, we introduce pretraining and finetuning methods that can modulate the preference for structural ICL and IWL. Importantly, this allows us to induce a $\textit{dual process strategy}$ where in-context and in-weights solutions coexist within a single model.

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

↑