Skip to main content
QUICK REVIEW

[论文解读] Lifelong Language Pretraining with Distribution-Specialized Experts

Wuyang Chen, Yanqi Zhou|arXiv (Cornell University)|May 20, 2023
Topic Modeling被引用 6
一句话总结

本文提出 Lifelong-MoE,一种用于大型语言模型在流式数据分布上持续预训练的专家混合(Mixture-of-Experts)架构,可有效避免灾难性遗忘。通过动态扩展专家并为冻结的旧组件应用正则化,该方法在保持推理成本恒定的同时,在19项下游NLP任务上维持了优异性能。

ABSTRACT

Pretraining on a large-scale corpus has become a standard method to build general language models (LMs). Adapting a model to new data distributions targeting different downstream tasks poses significant challenges. Naive fine-tuning may incur catastrophic forgetting when the over-parameterized LMs overfit the new data but fail to preserve the pretrained features. Lifelong learning (LLL) aims to enable information systems to learn from a continuous data stream across time. However, most prior work modifies the training recipe assuming a static fixed network architecture. We find that additional model capacity and proper regularization are key elements to achieving strong LLL performance. Thus, we propose Lifelong-MoE, an extensible MoE (Mixture-of-Experts) architecture that dynamically adds model capacity via adding experts with regularized pretraining. Our results show that by only introducing a limited number of extra experts while keeping the computation cost constant, our model can steadily adapt to data distribution shifts while preserving the previous knowledge. Compared to existing lifelong learning approaches, Lifelong-MoE achieves better few-shot performance on 19 downstream NLP tasks.

研究动机与目标

  • 解决在新数据分布按顺序到达时,持续语言模型预训练中灾难性遗忘的挑战。
  • 实现在无需从头重新训练或产生高计算成本的前提下,对在线流式数据分布的持续适应。
  • 在预训练数据分布发生变化的情况下,仍能保持在下游NLP任务上的强性能。
  • 探索稀疏专家扩展与正则化在保留随演化数据流变化的知识方面的有效性。
  • 证明可通过新增专家逐步扩展模型容量,同时保持推理成本恒定。

提出的方法

  • 提出 Lifelong-MoE,一种可扩展的MoE架构,通过动态添加专家以适应新的数据分布。
  • 冻结先前训练过的专家和门控机制,以保留来自先前分布的知识。
  • 引入在线L2正则化,约束新专家的参数更新,防止其偏离预训练权重。
  • 通过从先前模型进行知识蒸馏,对输出层应用正则化,以稳定在新数据上的学习过程。
  • 采用稀疏激活的MoE推理机制,确保每个标记仅激活固定数量的专家,从而维持恒定的计算成本。
  • 在预训练过程中,随着新数据分布的引入,逐步扩展专家数量(例如,从16个增至28个再增至32个)。
Figure 1: Overview of our Lifelong-MoE method: 1) During pretraining, the expanded experts (and gatings) are specialized for each data distribution; 2) We freeze the pretrained old experts and gatings; 3) We further introduce regularizations to the MoE to avoid the catastrophic forgetting.
Figure 1: Overview of our Lifelong-MoE method: 1) During pretraining, the expanded experts (and gatings) are specialized for each data distribution; 2) We freeze the pretrained old experts and gatings; 3) We further introduce regularizations to the MoE to avoid the catastrophic forgetting.

实验结果

研究问题

  • RQ1专家混合架构能否被有效扩展,以支持在演化数据分布上的持续预训练?
  • RQ2如何在不增加推理成本的前提下,逐步增加模型容量?
  • RQ3在持续预训练过程中,哪些正则化策略最有效防止灾难性遗忘?
  • RQ4与单一统一模型相比,分布专用专家是否能提升下游任务的性能?
  • RQ5在泛化能力和遗忘缓解方面,Lifelong-MoE与密集模型及现有持续学习方法相比表现如何?

主要发现

  • Lifelong-MoE在19项下游NLP任务上的 few-shot 性能优于现有持续学习方法。
  • 尽管最初未在 TriviaQA 数据分布上预训练,Lifelong-MoE 仍保持了与密集模型基准(dense oracle)相近的 F1 分数,表现优异。
  • 在 WMT16 和 Ubuntu 对话任务上,Lifelong-MoE 取得了最佳解码结果,并在切换到新数据分布时表现出最低的性能下降。
  • 该方法显著减少了遗忘,表现为在适应新分布时性能退化极小。
  • 在线L2正则化与输出层知识蒸馏共同作用,实现了稳定学习并提升了泛化能力。
  • 即使仅增加有限数量的额外专家,Lifelong-MoE 在下游任务上的表现仍优于 GShard 和 GLaM 等密集基线模型,尤其在预训练数据发生分布变化时优势更明显。
Figure 2: Overview of our lifelong pretraining method for the MoE model ( $\mathcal{M}$ ): 1) When pretraining on each data distribution ( $\bm{x}^{(t)}$ ), we expand the number of experts and gatings (from $E^{(t-1)}$ to $E^{(t)}$ ) for larger model capacity; 2) We freeze the pretrained old experts
Figure 2: Overview of our lifelong pretraining method for the MoE model ( $\mathcal{M}$ ): 1) When pretraining on each data distribution ( $\bm{x}^{(t)}$ ), we expand the number of experts and gatings (from $E^{(t-1)}$ to $E^{(t)}$ ) for larger model capacity; 2) We freeze the pretrained old experts

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。