Skip to main content
QUICK REVIEW

[论文解读] K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapters

Ruize Wang, Duyu Tang|arXiv (Cornell University)|Feb 5, 2020
Topic Modeling参考文献 43被引用 135
一句话总结

K-Adapter 保持原始预训练模型不动,添加知识特定的适配器以注入事实性和语言知识,实现持续的、解耦的知识注入,并提升下游任务表现。

ABSTRACT

We study the problem of injecting knowledge into large pre-trained models like BERT and RoBERTa. Existing methods typically update the original parameters of pre-trained models when injecting knowledge. However, when multiple kinds of knowledge are injected, the historically injected knowledge would be flushed away. To address this, we propose K-Adapter, a framework that retains the original parameters of the pre-trained model fixed and supports the development of versatile knowledge-infused model. Taking RoBERTa as the backbone model, K-Adapter has a neural adapter for each kind of infused knowledge, like a plug-in connected to RoBERTa. There is no information flow between different adapters, thus multiple adapters can be efficiently trained in a distributed way. As a case study, we inject two kinds of knowledge in this work, including (1) factual knowledge obtained from automatically aligned text-triplets on Wikipedia and Wikidata and (2) linguistic knowledge obtained via dependency parsing. Results on three knowledge-driven tasks, including relation classification, entity typing, and question answering, demonstrate that each adapter improves the performance and the combination of both adapters brings further improvements. Further analysis indicates that K-Adapter captures versatile knowledge than RoBERTa.

研究动机与目标

  • 推动在不覆盖先前学习知识的情况下向大规模预训练模型注入知识的需求。
  • 提出一个灵活的基于适配器的框架(K-Adapter),保持主干固定并学习独立的知识适配器。
  • 证明可以独立训练多个适配器并将它们结合起来以提升知识驱动的任务。
  • 展示持续的知识注入,其中新适配器不会影响现有适配器。

提出的方法

  • 引入知识特定的适配器,插在 RoBERTa 之外,输入采用主干的中间隐藏状态。
  • 在训练适配器时保持 RoBERTa 参数不变,适配器参数量很小(每个适配器约 42M)。
  • 分别在不同任务上独立预训练适配器:facAdapter 用于关系分类(事实知识),linAdapter 用于依存关系预测(语言知识)。
  • 通过将适配器输出与 RoBERTa 的输出拼接来融合表示,用于下游任务层;可以将多个适配器组合用于任务。
  • 以 RoBERTa-LARGE 作为 backbone,配置适配器为 N=2 个变换器层,隐藏维度 H_A=768,H_d=768,H_u=1024,A_A=12。
  • 在实体类型、问答和关系分类上进行评估,以评估单个适配器及其组合带来的收益。

实验结果

研究问题

  • RQ1知识是否可以通过外部适配器注入到固定的预训练模型中,而不发生灾难性遗忘?
  • RQ2独立的事实性和语言性适配器是否在知识驱动任务上提供互补的改进?
  • RQ3将多个适配器结合起来是否比单个适配器带来增量或协同效应?
  • RQ4与 RoBERTa 和多任务基线相比,K-Adapter 在实体类型、QA 和关系分类上表现如何?
  • RQ5通过探针(LAMA)测量,K-Adapter 是否提升了模型对事实性知识的记忆力?

主要发现

  • 每个适配器(事实和/或语言)在知识驱动的任务上相对于 RoBERTa 基线有改进。
  • 事实性和语言性适配器的组合在单个适配器之上带来进一步改进。
  • K-Adapter(F+L)在所测试任务中的若干数据集上达到最新的最佳结果。
  • 探针分析表明 K-Adapter 比 RoBERTa 记忆了更丰富的事实性知识,表明知识捕捉能力增强。
  • 解耦的适配器允许持续的知识注入,而不需要重新训练或削弱先前注入的知识。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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