[论文解读] Decoupling Knowledge from Memorization: Retrieval-augmented Prompt Learning
RetroPrompt 构建来自训练数据的 open-book knowledge-store,并使用检索来增强 prompt learning,提升 few-shot/zero-shot 泛化并降低对 memorization 的依赖。
Prompt learning approaches have made waves in natural language processing by inducing better few-shot performance while they still follow a parametric-based learning paradigm; the oblivion and rote memorization problems in learning may encounter unstable generalization issues. Specifically, vanilla prompt learning may struggle to utilize atypical instances by rote during fully-supervised training or overfit shallow patterns with low-shot data. To alleviate such limitations, we develop RetroPrompt with the motivation of decoupling knowledge from memorization to help the model strike a balance between generalization and memorization. In contrast with vanilla prompt learning, RetroPrompt constructs an open-book knowledge-store from training instances and implements a retrieval mechanism during the process of input, training and inference, thus equipping the model with the ability to retrieve related contexts from the training corpus as cues for enhancement. Extensive experiments demonstrate that RetroPrompt can obtain better performance in both few-shot and zero-shot settings. Besides, we further illustrate that our proposed RetroPrompt can yield better generalization abilities with new datasets. Detailed analysis of memorization indeed reveals RetroPrompt can reduce the reliance of language models on memorization; thus, improving generalization for downstream tasks. Code is available in https://github.com/zjunlp/PromptKG/tree/main/research/RetroPrompt.
研究动机与目标
- 推动提示学习在超越 rote memorization(机械化记忆)方面的泛化能力。
- 通过从训练数据中创建一个 open-book knowledge-store,将知识与记忆脱钩。
- 在输入、训练和推理阶段启用检索驱动的增强,以引导学习和预测。
提出的方法
- 从训练实例中构建一个密集检索式的 knowledge-store,作为键值对 (h_hat_c, v),其中 h_hat_c 是 [MASK] token embedding。
- 通过聚合每个类别的最近邻的 m 个样本来检索神经演示,并将它们的表示注入到输入中。
- 使用 k-nearest neighbors (kNN) 来通过基于 kNN 派生的概率对交叉熵损失进行再加权,从而在训练阶段提供引导。
- 在推理阶段将 kNN 分布与 PLM MLM 输出进行插值,以产生最终预测。
- 在训练过程中异步刷新 knowledge-store,使嵌入与模型更新保持对齐。
- 与强基线 prompt-learning 进行对比并进行消融分析,以验证各组件的贡献。
实验结果
研究问题
- RQ1与标准 prompt tuning 相比,检索增强的提示学习在 few-shot 和 zero-shot 设置中是否提高了性能?
- RQ2一个内部、由训练集派生的 knowledge-store 是否能够将知识与记忆分离并提升对新领域/数据集的泛化能力?
- RQ3神经演示和基于 kNN 的训练如何影响记忆化以及对长尾分布的鲁棒性?
- RQ4在训练和推理阶段更新/引用 knowledge-store 对性能有何影响?
主要发现
- RetroPrompt 在九个 NLU 任务的 few-shot 与 zero-shot 设置中表现优于基线。
- 从开放式知识库中检索可减少对记忆化的依赖并提升泛化能力,包括在完全监督的长尾分布中。
- 神经演示和 kNN 指导的训练对提升具有显著贡献,特别是在 few-shot 情况下,单独使用 kNN-test 的增益有限。
- RetroPrompt 在跨领域评估中展现出比基线更强的跨域泛化能力。
- memorization 分析显示相较于微调和传统 prompt-tuning,RetroPrompt 降低了记忆化分数。
- 消融研究证实每个组件——神经演示、kNN 指导训练和基于 kNN 的预测——都对性能提升有贡献。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。