(写在文章前,我是一个对NLP感兴趣的小白,这篇文章是阅读论文时的粗略笔记~~)
百度的ERNIE系列模型,其没有对网络模型本身进行结构上的大改动,而是着重于如何构造合理的预训练任务,以及如何更好地利用数据构造无监督的训练集。本文主要从各模型的原理、优点、缺点、解决了什么问题等方面来讲述百度ERNIE1.0\ ERNIE2.0\ ERNIE3.0的进化历程,并对比了模型之间的区别与联系。个人理解浅显,希望与读者交流。
ERNIE: Enhanced Representation through Knowledge Integration
Sun Y, Wang S, Li Y, et al. Ernie: Enhanced representation through knowledge integration[J]. arXiv preprint arXiv:1904.09223, 2019.
关键词: a multi-stage knowledge masking strategy ,对phrase(短语)和entity(实体)做mask,间接的加入知识图谱
1、Knowledge masking strategies(知识完形填空策略)
1.1、Stage1: Basic masking strategy
处理级别:English word or Chinese character
处理方法:randomly mask 15%
结果:Based on basic level mask, we can obtain a basic word representation.
缺点:Because it is trained on a random mask of basic semantic units, high level semantic knowledge is hard to be fully modeled.
最基础的级别,和bert一样
1.2、Stage2: phrase-level strategy
处理级别:分词工具分词,得到phrase。短语级别的mask, 属于知识级别的mask
处理方法:以phrase 为单元随机mask,并对整个phrase中的每个词进行预测。
结果: phrase information is encoded into the word embedding.
1.3、Stage3: entity-level strategy
处理级别:Name entities contain persons, locations, organizations, products, etc. 实体级别的mask, 属于知识级别的mask
处理方法:first analyze the named entities in a sen- tence, and then mask and predict all slots in the entities.
处理结果: a word representation 获得 richer semantic information
2、多轮对话
- NSP任务的升级版
- 在预测Mask token的同时判断输入的多轮对话(QRQ、QRR、QQR三种模式)是否真实
- 与基本的MLM任务交替训练,提升了大概1%
Bert中的NSP 任务,后续很多研究中都证明了并没有多大作用,而 MLM 是比较关键的任务,通过 MLM 让模型拥有了融合上下文信息的能力。