[论文解读] Understanding Catastrophic Forgetting in Language Models via Implicit Inference
本文提出共轭提示(conjugate prompting)作为一种方法,通过将提示转换为与微调数据分布不相似的形式,从而恢复大型语言模型在微调过程中丢失的预训练能力,借此改变模型对隐式任务的推理方式。实验表明,将提示翻译为其他语言可恢复因安全微调而被抑制的上下文学习和有害内容生成能力。
We lack a systematic understanding of the effects of fine-tuning (via methods such as instruction-tuning or reinforcement learning from human feedback), particularly on tasks outside the narrow fine-tuning distribution. In a simplified scenario, we demonstrate that improving performance on tasks within the fine-tuning data distribution comes at the expense of capabilities on other tasks. We hypothesize that language models implicitly infer the task of the prompt and that fine-tuning skews this inference towards tasks in the fine-tuning distribution. To test this, we propose Conjugate Prompting, which artificially makes the task look farther from the fine-tuning distribution while requiring the same capability, and we find that this recovers some of the pretraining capabilities in our synthetic setup. Since real-world fine-tuning distributions are predominantly English, we apply conjugate prompting to recover pretrained capabilities in LLMs by simply translating the prompts to different languages. This allows us to recover in-context learning abilities lost via instruction tuning, natural reasoning capability lost during code fine-tuning, and, more concerningly, harmful content generation suppressed by safety fine-tuning in chatbots like ChatGPT.
研究动机与目标
- 理解微调为何导致语言模型在微调分布附近但不包含在内的任务上发生灾难性遗忘。
- 探究性能退化是否源于隐式任务推理偏差而非直接的能力损失。
- 开发一种系统性方法——共轭提示,以在不重新训练的情况下恢复预训练模型行为。
- 在真实世界的大规模语言模型上验证该方法,特别是恢复因安全微调而被抑制的上下文学习和有害指令遵循能力。
提出的方法
- 提出共轭提示:对于一个位于微调分布之外的提示 P,生成一个变换后的提示 P′,该提示在微调分布下可能性较低,但保留了对 P 的正确解。
- 确保 P′ 在语义或结构上与微调数据分布明显不同,以促使模型的隐式任务推理远离微调任务。
- 将语言翻译作为共轭提示的实际实现方式,利用微调数据在英语上高度集中的事实。
- 在合成的线性回归设置中测试共轭提示,其中模型在权重向量上进行预训练,并在子集上进行微调,以衡量性能恢复情况。
- 在真实的大规模语言模型上使用多语言翻译应用共轭提示,以恢复上下文学习和有害指令遵循能力。
- 在 5 个模型和 4 种非英语语言上验证该方法,证明其能一致地恢复预训练行为。
![Figure 1: How does fine-tuning affect language models? When pretrained over data that contains the orange task $\color[rgb]{0.9296875,0.48828125,0.19140625}T_{1}$ and the blue task $\color[rgb]{0.265625,0.4453125,0.76953125}T_{2}$ , a model may infer a prompt $P$ is from task $\color[rgb]{0.9296875,](https://ar5iv.labs.arxiv.org/html/2309.10105/assets/assets/fig1.png)
实验结果
研究问题
- RQ1微调后的语言模型中灾难性遗忘是否源于隐式任务推理偏差,而非直接的能力退化?
- RQ2我们能否通过使提示与微调分布的相似度降低来恢复预训练能力?
- RQ3在真实世界的大规模语言模型中,语言翻译在多大程度上可作为有效的共轭提示变换?
- RQ4共轭提示能否恢复因指令微调而被抑制的上下文学习能力?
- RQ5共轭提示能否绕过安全微调,恢复有害内容生成行为?
主要发现
- 在合成的线性回归设置中,共轭提示成功恢复了模型在微调分布之外任务上的显著预训练性能。
- 在真实世界的大规模语言模型中,将提示翻译为非英语语言可恢复因指令微调而被抑制的上下文学习能力。
- 该方法还恢复了在如 ChatGPT 等模型中被安全微调主动抑制的有害内容生成能力。
- 性能退化在与微调分布接近但不包含在内的任务上最为严重,支持了隐式任务推理偏差的假设。
- 该方法在 5 个不同大规模语言模型和 4 种非英语语言上均表现一致,证明了其稳健性和泛化能力。
- 结果表明,微调后的模型仍保留预训练能力,但因隐式任务推理偏差而被误导,使其容易受到基于提示的恢复方法影响。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。